toolbar.mak 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <%namespace name="ICON" file="tracim.templates.widgets.icon"/>
  2. <%namespace name="TIM" file="tracim.templates.pod"/>
  3. <%def name="WORKSPACE(current_user, workspace)">
  4. ## SIDEBAR RIGHT
  5. <div>
  6. <div class="btn-group btn-group-vertical">
  7. <a title="${_('Edit current workspace')}" class="btn btn-default" data-toggle="modal" data-target="#workspace-edit-modal-dialog" data-remote="${tg.url('/admin/workspaces/{}/edit'.format(workspace.id))}" >${ICON.FA('fa-edit fa-fw t-less-visible')} ${_('Edit')}</a>
  8. </div>
  9. <p></p>
  10. ## TODO - D.A - 2014-09-16
  11. ## Hide the delete button if the user is not a TIM Manager
  12. % if current_user.profile.id>=2:
  13. ## if the user can see the toolbar, it means he is the workspace manager.
  14. ## So now, we need to know if he also has right to delete workspaces
  15. <div class="btn-group btn-group-vertical">
  16. <a title="${_('Delete current workspace')}" class="btn btn-default" href="${tg.url('/admin/workspaces/{}/delete'.format(result.workspace.id))}">${ICON.FA('fa-trash fa-fw t-less-visible')} ${_('Delete')}</a>
  17. </div>
  18. % endif
  19. ${JITSI_MEET_BUTTON(current_user, workspace)}
  20. </div> <!-- # End of side bar right -->
  21. ## SIDEBAR RIGHT [END]
  22. </%def>
  23. <%def name="WORKSPACE_USER(current_user, workspace, videoconf_enabled)">
  24. <div>
  25. % if videoconf_enabled:
  26. ${JITSI_MEET_BUTTON(current_user, workspace)}
  27. % endif
  28. </div> <!-- # End of side bar right -->
  29. </%def>
  30. <%def name="JITSI_MEET_BUTTON(current_user, workspace)">
  31. <div class="btn-group btn-group-vertical">
  32. <a title="${_('Video conference')}" class="btn btn-default" href="${tg.url('/workspaces/{}/videoconference'.format(result.workspace.id))}">${ICON.FA('fa-video-camera fa-fw t-less-visible')} ${_('Video Conference')}</a>
  33. </div>
  34. </%def>