Browse Source

Merge branch 'master' into fix/532/webdav_apache_documentation

Bastien Sevajol 6 years ago
parent
commit
1be086e080

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

22
 
22
 
23
 from tracim.model.serializers import Context, CTX, DictLikeClass
23
 from tracim.model.serializers import Context, CTX, DictLikeClass
24
 
24
 
25
+from urllib.parse import urlparse
25
 
26
 
26
 class UserWorkspaceRestController(TIMRestController):
27
 class UserWorkspaceRestController(TIMRestController):
27
 
28
 
100
         )
101
         )
101
 
102
 
102
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
103
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
104
+
105
+        # INFO - G.M - 15-02-2018 - Deal with url scheme for dav link
106
+        # TODO - G.M - 15-02-2018 - Find better solution to deal with url ?
103
         webdav_url = CFG.get_instance().WSGIDAV_CLIENT_BASE_URL
107
         webdav_url = CFG.get_instance().WSGIDAV_CLIENT_BASE_URL
108
+        website_protocol = urlparse(CFG.get_instance().WEBSITE_BASE_URL).scheme
109
+        dav_protocol = 'dav'
110
+        if website_protocol == "https":
111
+            dav_protocol = 'davs'
104
 
112
 
105
         return DictLikeClass(
113
         return DictLikeClass(
106
             result=dictified_workspace,
114
             result=dictified_workspace,
107
             fake_api=fake_api,
115
             fake_api=fake_api,
108
             webdav_url=webdav_url,
116
             webdav_url=webdav_url,
117
+            website_protocol = website_protocol,
118
+            dav_protocol = dav_protocol,
109
             show_deleted=show_deleted,
119
             show_deleted=show_deleted,
110
             show_archived=show_archived,
120
             show_archived=show_archived,
111
         )
121
         )

+ 2 - 2
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.po View File

1403
 
1403
 
1404
 #: tracim/templates/admin/workspace_getall.mak:48
1404
 #: tracim/templates/admin/workspace_getall.mak:48
1405
 msgid "<u>Note</u>: members will be added during next step."
1405
 msgid "<u>Note</u>: members will be added during next step."
1406
-msgstr "<u>Note</u> : les membres seront ajoutées à la prochaine étape."
1406
+msgstr "<u>Note</u> : les membres seront ajouté(e)s à la prochaine étape."
1407
 
1407
 
1408
 #: tracim/templates/admin/workspace_getall.mak:75
1408
 #: tracim/templates/admin/workspace_getall.mak:75
1409
 msgid "User Nb"
1409
 msgid "User Nb"
1433
 "This workspace offers a calendar that you can configure in your software:"
1433
 "This workspace offers a calendar that you can configure in your software:"
1434
 " Outlook, Thunderbird, etc."
1434
 " Outlook, Thunderbird, etc."
1435
 msgstr ""
1435
 msgstr ""
1436
-"Cet espace de travaille propose un calendrier que vous pouvez configurer "
1436
+"Cet espace de travail propose un calendrier que vous pouvez configurer "
1437
 "dans votre logiciel : Outlook, Thunderbird, etc."
1437
 "dans votre logiciel : Outlook, Thunderbird, etc."
1438
 
1438
 
1439
 #: tracim/templates/admin/workspace_getone.mak:46
1439
 #: tracim/templates/admin/workspace_getone.mak:46

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

129
             <div class="col-md-6">
129
             <div class="col-md-6">
130
                 <div class="input-group">
130
                 <div class="input-group">
131
                     <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-windows"></i> Windows</span>
131
                     <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-windows"></i> Windows</span>
132
-                    <div class="form-control webdavconfig__input">http://${webdav_url}</div>
132
+                    <div class="form-control webdavconfig__input">${website_protocol}://${webdav_url}</div>
133
                 </div>
133
                 </div>
134
                 <p></p>
134
                 <p></p>
135
                 <div class="input-group">
135
                 <div class="input-group">
136
                     <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-linux"></i> Linux</span>
136
                     <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-linux"></i> Linux</span>
137
-                    <div class="form-control webdavconfig__input">dav://${webdav_url}</div>
137
+                    <div class="form-control webdavconfig__input">${dav_protocol}://${webdav_url}</div>
138
                 </div>
138
                 </div>
139
             </div>
139
             </div>
140
             <div class="col-md-6">
140
             <div class="col-md-6">