<%def name="IconCssClass(psNodeType)" > % if psNodeType=='data': fa fa-file-text-o % elif psNodeType=='folder': fa fa-folder-open % elif psNodeType=='node': fa fa-file-text-o % elif psNodeType=='file': fa fa-paperclip % elif psNodeType=='event': fa fa-calendar % elif psNodeType=='contact': fa fa-user % elif psNodeType=='comment': fa fa-comments-o % endif <%def name="DocumentTypeLabel(psNodeType)" ><% labels = dict() labels['data'] = 'document' labels['folder'] = 'folder' labels['node'] = 'node' labels['file'] = 'file' labels['event'] = 'event' labels['contact'] = 'contact' labels['comment'] = 'comment' return labels[psNodeType] %> <%def name="DocumentUrl(piNodeId, psHighlight)" >${tg.url('/document/%i?highlight=%s'%(piNodeId, psHighlight))} <%def name="DocumentUrlWithAnchor(piNodeId, psHighlight, psAnchor)" >${tg.url('/document/%i?highlight=%s#%s'%(piNodeId, psHighlight, psAnchor))} <%def name="Button(piId, pbWithLabel, psButtonCssClass, psButtonTitle, psButtonIcon, psButtonLabel)" > <%def name="SaveButton(piId, pbWithLabel=False, psLabel='Save')" > ## FIXME - Make the default value use _() in order to be translated ${Button(piId, pbWithLabel, 'btn btn-small btn-success', psLabel, ' icon-g-ok-2 icon-g-white', psLabel)} <%def name="EditButton(piId, pbWithLabel=False)" > ${Button(piId, pbWithLabel, 'btn btn-small', _('Edit'), 'fa fa-edit', _('Edit'))} <%def name='CancelButton(piId, pbWithLabel=False)'> ${Button(piId, pbWithLabel, 'btn btn-small', _('Cancel'), 'icon-g-ban', _('Cancel'))} <%def name='AddButton(piId, pbWithLabel=False, psLabel=None, pbIsCallToAction=True)'> % if pbIsCallToAction: ${Button(piId, pbWithLabel, 'btn btn-small btn-success', psLabel or _('New'), 'fa fa-plus', psLabel or _('New'))} % else: ${Button(piId, pbWithLabel, 'btn btn-small', psLabel or _('New'), 'fa fa-plus', psLabel or _('New'))} % endif ### ## ## GREEN CALL-TO-ACTION BUTTONS IN THE INTERFACE ## ## <%def name="OpenModalButton(psModalAnchor, psLabel)"> ${psLabel} <%def name="OpenLinkButton(psModalAnchor, psLabel)"> ${psLabel} ## END OF GREEN CALL-TO-ACTION BUTTONS <%def name='Badge(psLabel, psCssClass="")'> ${psLabel} <%def name='ItemNb(plItemList)'> % if len(plItemList)>0: ${len(plItemList)} % endif <%def name='SignUpForm(psCssMinHeight="1em")'>
${_('Create an account')}




<%def name='RichTextEditorToolbar(psRichTextEditorNodeId, psMenuOptions="styles|boldanditalic|lists|justifiers|links|images|undoredo|fullscreen")'>
% if psMenuOptions.find('styles')>=0:
% endif % if psMenuOptions.find('boldanditalic')>=0:
% endif % if psMenuOptions.find('lists')>=0:
% endif % if psMenuOptions.find('justifiers')>=0:
% endif ####### ## ## LINK MENU ; NOT WORKING FOR NOW (links are auto-generated at render time) ## ## % if psMenuOptions.find('links')>=0: ##
## ## ## ##
## % endif ####### ## ## IMAGES MENU ; NOT WORKING FOR NOW ## ## % if psMenuOptions.find('images')>=0: ##
## ## ##
## % endif % if psMenuOptions.find('undoredo')>=0:
% endif % if psMenuOptions.find('fullscreen')>=0:
## TODO - D.A. - 2013-11-13 - Use jQuery instead of static JS call ## >The previous button "onclick" should be replaced by a jquery dynamic link finding parent node with the right id
% endif ## ## FIXME - D.A. - 2013-11-15 - FIX THIS ## The voiceBtn button input field is visible in case we add the rich text editor multiple times in the same page ## This is probably due to the use of #voiceBtn id (which should be unique... and which is not) ## This fix will be required for mobile phone compatible user interface ## See bug #13 - https://bitbucket.org/lebouquetin/pod/issue/13/voicebtn-input-widget-shown-in-meta-data ##
<%def name='RichTextEditor(psRichTextEditorNodeId, psRichTextEditorContent="", psMenuOptions="styles|boldanditalic|lists|justifiers|links|images|undoredo|fullscreen")'>
${RichTextEditorToolbar(psRichTextEditorNodeId, psMenuOptions)}
${psRichTextEditorContent|n}
<%def name="AddDocumentModalFormId(poNode)">add-document-modal-form-${poNode.node_id if poNode!=None else ''}