Bläddra i källkod

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

Guénaël Muller 6 år sedan
förälder
incheckning
7a89104c13

+ 2 - 0
tracim/tracim/controllers/workspace.py Visa fil

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

+ 1 - 1
tracim/tracim/templates/workspace/getone.mak Visa fil

@@ -20,7 +20,7 @@
20 20
 </%def>
21 21
 
22 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 24
 </%def>
25 25
 
26 26
 <%def name="REQUIRED_DIALOGS()">

+ 3 - 1
tracim/tracim/templates/workspace/toolbar.mak Visa fil

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