<%inherit file="local:templates.master"/> <%namespace name="POD" file="pod.templates.pod"/> <%def name="HistoryTabContent(poNode)">

${_('Revisions')}

<%def name="AccessManagementTab(poNode, user_rights, user)"> ###### ## ## THIS WIDGET IS INTENDED TO BE USED ONE TIME ONLY IN A PAGE ##

${_('Share options')}

% if poNode.is_shared==False: ${_('This document is not shared')} % else: ${_('This document is shared.')} % endif

% if poNode.is_shared==True: % for loGroupRightsOnNode in real_group_rights: % if loGroupRightsOnNode.hasSomeAccess(): % endif % endfor % for loGroupRightsOnNode in user_specific_group_rights: % if loGroupRightsOnNode.hasSomeAccess(): % endif % endfor
${_('Groups')}
${loGroupRightsOnNode.display_name} % if loGroupRightsOnNode.hasReadAccess(): R % endif % if loGroupRightsOnNode.hasWriteAccess(): W % endif
${_('Individual users')}
${loGroupRightsOnNode.display_name} % if loGroupRightsOnNode.hasReadAccess(): R % endif % if loGroupRightsOnNode.hasWriteAccess(): W % endif
% endif

###### ## ## 2014-05-06 - D.A. We do not share documents on internet yet. ## ##

## % if poNode.is_public==False: ## ${_('This document is not shared on internet')|n} ## % else: ## ${_('This document is shared on internet')|n}. ## ${_('The associated url is:')} ${poNode.public_url_key} ## % endif ##

% if user.user_id==poNode.owner_id or (user_rights and user_rights.hasWriteAccess()): ${_('Edit share options')} % endif <%def name="FileTabContent(poNode)">

${_('Attachments')}

% if len(poNode.getFiles())<=0:

${_("There is currently no attachment.")}

${POD.OpenModalButton(h.ID.AddFileModalForm(poNode), _(' Attach first file'))}

% else:

${POD.OpenModalButton(h.ID.AddFileModalForm(poNode), _(' Attach a file'))}

% endif
% if len(poNode.getFiles())>0: % for loFile in poNode.getFiles():

${loFile.getTruncatedLabel(50)} ## FIXME SHOW IMAGE THUMBNAIL

% endfor % endif
<%def name="SubdocumentContent(poNode)">

${_('Sub-documents')}

% if len(poNode.getChildren())<=0:

${_("There is currently no child documents.")}

% endif

${POD.OpenModalButton(h.ID.AddDocumentModalForm(poNode), _('Add a document'))}

% if len(poNode.getChildren())>0:
% for subnode in poNode.getChildren():

${subnode.data_label}

% endfor
% endif <%def name="EventTabContent(current_user, poNode)">

${_('Calendar')}

% if len(poNode.getEvents())<=0:

${_("The calendar is empty.")}

${POD.OpenModalButton(h.ID.AddEventModalForm(poNode), _(' Add first event'))}

% else:

${POD.OpenModalButton(h.ID.AddEventModalForm(poNode), _(' Add an event'))}

% endif % if len(poNode.getEvents())>0: % for event in poNode.getEvents(): % if event.is_shared or event.owner_id==current_user.user_id: ## ## TODO - D.A. - Sharing groups are not checked here : a shared event is share with everybody ## % endif % endfor
Date Time Event
${event.getFormattedDate(event.data_datetime)} ${event.getFormattedTime(event.data_datetime)} ${event.data_label}
% endif <%def name="ContactTabContent(poNode)">

${_('Address book')}

% if len(poNode.getContacts())<=0:

${_("The address book is empty.")}

${POD.OpenModalButton(h.ID.AddContactModalForm(poNode), _('Add first contact'))}

% else:

${POD.OpenModalButton(h.ID.AddContactModalForm(poNode), _('Add a contact'))}

% endif % for contact in poNode.getContacts():
${contact.data_label} ## TODO - 2013-11-20 - Use the right form in order to update meta-data
## FIXME - D.A. - 2013-11-15 - Implement localisation stuff ${contact.data_content|n}
% endfor <%def name="CommentTabContent(current_user, poNode)">

${_('Comment thread')}

% if len(poNode.getComments())<=0:

${_("The comment thread is empty.")}

% endif % if len(poNode.getComments())>0: % if len(poNode.getComments())>5: ## ## We show a "direct down" button in case the page is too long ##

${POD.OpenLinkButton(h.ID.AddCommentInlineForm(), _('Add a comment'))}

% endif
% for comment in poNode.getComments(): % if comment.is_shared or comment.owner_id==current_user.user_id: ## ## FIXME - 2014-05-29 ## We do not check specific rights on comment but on document instead ## In the future full-API architecture, it should be fixed ##

${comment._oOwner.display_name} ${_('the')} ${comment.getFormattedDate(comment.updated_at)} ${_('at')} ${comment.getFormattedTime(comment.updated_at)}
% if comment.owner_id==current_user.user_id: % if comment.is_shared: ${h.ICON.Shared|n} % else: ${h.ICON.Private|n} % endif % endif ${comment.data_content|n}

% endif % endfor
% endif
% if len(poNode.getComments())<=0: ${POD.SaveButton('current-document-add-comment-save-button', True, _('Add first comment'))} % else: ${POD.SaveButton('current-document-add-comment-save-button', True, _('Comment'))} % endif