Browse Source

[WIP] added frontend to display the webdav link

Come 8 years ago
parent
commit
6fca576776

+ 5 - 1
tracim/tracim/controllers/workspace.py View File

@@ -65,7 +65,11 @@ class UserWorkspaceRestController(TIMRestController):
65 65
 
66 66
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
67 67
 
68
-        return DictLikeClass(result = dictified_workspace, fake_api=fake_api)
68
+        return DictLikeClass(
69
+            result=dictified_workspace,
70
+            fake_api=fake_api,
71
+            webdav_url='@TODO-BASTIEN'
72
+        )
69 73
 
70 74
 
71 75
     @tg.expose('json')

+ 8 - 0
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.po View File

@@ -2042,6 +2042,14 @@ msgstr "Cet espace de travail compte {a_open}un membre{a_close}"
2042 2042
 msgid "This workspace has {a_open}{member_nb} members{a_close}"
2043 2043
 msgstr "Cet espace de travail compte {a_open}{member_nb} membres{a_close}"
2044 2044
 
2045
+#: tracim/templates/workspace/getone.mak:77
2046
+msgid "This workspace is {a_open}accessible with webdav{a_close}"
2047
+msgstr "Cet espace de travail est {a_open}accessible via webdav{a_close}"
2048
+
2049
+#: tracim/templates/workspace/getone.mak:78
2050
+msgid "Adress to connect to webdav with:"
2051
+msgstr "Adresses pour se connecter à webdav sous :"
2052
+
2045 2053
 #: tracim/templates/workspace/getone.mak:76
2046 2054
 msgid "whose"
2047 2055
 msgstr "dont"

+ 11 - 0
tracim/tracim/templates/workspace/getone.mak View File

@@ -113,6 +113,17 @@
113 113
             </div>
114 114
         % endif
115 115
 
116
+            <p>
117
+                ${_('This workspace is {a_open}accessible with webdav{a_close}').format(a_open='<a data-toggle="collapse" href="#webdavConfig" aria-expanded="false" aria-controls="webdavConfig">', a_close='</a>')|n}
118
+            </p>
119
+            <div class="collapse" id="webdavConfig">
120
+                <p>${_('Adress to connect to webdav with:')}</p>
121
+                <p>Linux : </p>
122
+                <p class="form-control">dav://${webdav_url}</p>
123
+                <p>Windows : </p>
124
+                <p class="form-control">http://${webdav_url}</p>
125
+            </div>
126
+
116 127
     </div>
117 128
 </div>
118 129