Browse Source

do not show videconf button when jitsi-meet feature is disabled

Guénaël Muller 6 years ago
parent
commit
7a89104c13

+ 2 - 0
tracim/tracim/controllers/workspace.py View File

100
                 show_archived=show_archived,
100
                 show_archived=show_archived,
101
             )
101
             )
102
         )
102
         )
103
+        videoconf_enabled = CFG.get_instance().JITSI_MEET_ACTIVATED
103
 
104
 
104
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
105
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
105
         webdav_url = CFG.get_instance().WSGIDAV_CLIENT_BASE_URL
106
         webdav_url = CFG.get_instance().WSGIDAV_CLIENT_BASE_URL
108
             result=dictified_workspace,
109
             result=dictified_workspace,
109
             fake_api=fake_api,
110
             fake_api=fake_api,
110
             webdav_url=webdav_url,
111
             webdav_url=webdav_url,
112
+            videoconf_enabled=videoconf_enabled,
111
             show_deleted=show_deleted,
113
             show_deleted=show_deleted,
112
             show_archived=show_archived,
114
             show_archived=show_archived,
113
         )
115
         )

+ 1 - 1
tracim/tracim/templates/workspace/getone.mak View File

20
 </%def>
20
 </%def>
21
 
21
 
22
 <%def name="SIDEBAR_RIGHT_CONTENT()">
22
 <%def name="SIDEBAR_RIGHT_CONTENT()">
23
- ${TOOLBAR.WORKSPACE_USER(fake_api.current_user, result.workspace)}
23
+ ${TOOLBAR.WORKSPACE_USER(fake_api.current_user, result.workspace, videoconf_enabled)}
24
 </%def>
24
 </%def>
25
 
25
 
26
 <%def name="REQUIRED_DIALOGS()">
26
 <%def name="REQUIRED_DIALOGS()">

+ 3 - 1
tracim/tracim/templates/workspace/toolbar.mak View File

24
     ## SIDEBAR RIGHT [END]
24
     ## SIDEBAR RIGHT [END]
25
 </%def>
25
 </%def>
26
 
26
 
27
-<%def name="WORKSPACE_USER(current_user, workspace)">
27
+<%def name="WORKSPACE_USER(current_user, workspace, videoconf_enabled)">
28
     <div>
28
     <div>
29
+        % if videoconf_enabled:
29
         ${JITSI_MEET_BUTTON(current_user, workspace)}
30
         ${JITSI_MEET_BUTTON(current_user, workspace)}
31
+       % endif
30
     </div> <!-- # End of side bar right -->
32
     </div> <!-- # End of side bar right -->
31
 </%def>
33
 </%def>
32
 
34