Browse Source

Disable non working feature in webdav html render

Bastien Sevajol (Algoo) 8 years ago
parent
commit
9b56376403
1 changed files with 25 additions and 18 deletions
  1. 25 18
      tracim/tracim/lib/webdav/design.py

+ 25 - 18
tracim/tracim/lib/webdav/design.py View File

@@ -65,9 +65,10 @@ def designPage(content: data.Content, content_revision: data.ContentRevisionRO)
65 65
                        label,
66 66
                        date,
67 67
                        event.owner.display_name,
68
-                       '<i class="fa fa-caret-left"></i> shown' if event.id == content_revision.revision_id else '''<span><a class="revision-link" href="/.history/%s/(%s - %s) %s.html">(View revision)</a></span>''' % (
69
-                       content.label, event.id, event.type.id, event.ref_object.label) if event.type.id in ['revision', 'creation', 'edition'] else '')
70
-
68
+                       # NOTE: (WABDAV_HIST_DEL_DISABLED) Disabled for beta 1.0
69
+                       '<i class="fa fa-caret-left"></i> shown'  if event.id == content_revision.revision_id else '' # '''<span><a class="revision-link" href="/.history/%s/(%s - %s) %s.html">(View revision)</a></span>''' % (
70
+                       # content.label, event.id, event.type.id, event.ref_object.label) if event.type.id in ['revision', 'creation', 'edition'] else '')
71
+                   )
71 72
     histHTML += '</table>'
72 73
 
73 74
     file = '''
@@ -93,9 +94,10 @@ def designPage(content: data.Content, content_revision: data.ContentRevisionRO)
93 94
             </div>
94 95
             <div class="pull-right">
95 96
                 <div class="btn-group btn-group-vertical">
96
-                    <a class="btn btn-default">
97
-                        <i class="fa fa-external-link"></i> View in tracim</a>
98
-                    </a>
97
+                    <!-- NOTE: Not omplemented yet, don't display not working link
98
+                     <a class="btn btn-default">
99
+                         <i class="fa fa-external-link"></i> View in tracim</a>
100
+                     </a>-->
99 101
                 </div>
100 102
             </div>
101 103
         </div>
@@ -113,9 +115,10 @@ def designPage(content: data.Content, content_revision: data.ContentRevisionRO)
113 115
             file_location = file_location.replace(/\/[^/]*$/, '')
114 116
             file_location = file_location.replace(/\/.history\/[^/]*$/, '')
115 117
 
116
-            $('.revision-link').each(function() {
117
-                $(this).attr('href', file_location + $(this).attr('href'))
118
-            });
118
+            // NOTE: (WABDAV_HIST_DEL_DISABLED) Disabled for beta 1.0
119
+            // $('.revision-link').each(function() {
120
+            //    $(this).attr('href', file_location + $(this).attr('href'))
121
+            // });
119 122
         }
120 123
     </script>
121 124
 </body>
@@ -197,10 +200,12 @@ def designThread(content: data.Content, content_revision: data.ContentRevisionRO
197 200
                            t.owner.display_name,
198 201
                            t.create_readable_date(),
199 202
                            label,
200
-                            '<i class="fa fa-caret-left"></i> shown' if t.id == content_revision.revision_id else '''<span><a class="revision-link" href="/.history/%s/%s-%s">(View revision)</a></span>''' % (
201
-                               content.label,
202
-                               t.id,
203
-                               t.ref_object.label) if t.type.id in ['revision', 'creation', 'edition'] else '')
203
+                            # NOTE: (WABDAV_HIST_DEL_DISABLED) Disabled for beta 1.0
204
+                            '<i class="fa fa-caret-left"></i> shown' if t.id == content_revision.revision_id else '' # else '''<span><a class="revision-link" href="/.history/%s/%s-%s">(View revision)</a></span>''' % (
205
+                               # content.label,
206
+                               # t.id,
207
+                               # t.ref_object.label) if t.type.id in ['revision', 'creation', 'edition'] else '')
208
+                           )
204 209
 
205 210
         page = '''
206 211
 <html>
@@ -222,9 +227,10 @@ def designThread(content: data.Content, content_revision: data.ContentRevisionRO
222 227
             </div>
223 228
             <div class="pull-right">
224 229
                 <div class="btn-group btn-group-vertical">
230
+                    <!-- NOTE: Not omplemented yet, don't display not working link
225 231
                     <a class="btn btn-default" onclick="hide_elements()">
226
-                        <i id="hideshow" class="fa fa-eye-slash"></i> <span id="hideshowtxt" >Hide history</span></a>
227
-                    </a>
232
+                       <i id="hideshow" class="fa fa-eye-slash"></i> <span id="hideshowtxt" >Hide history</span></a>
233
+                    </a>-->
228 234
                     <a class="btn btn-default">
229 235
                         <i class="fa fa-external-link"></i> View in tracim</a>
230 236
                     </a>
@@ -244,9 +250,10 @@ def designThread(content: data.Content, content_revision: data.ContentRevisionRO
244 250
             file_location = file_location.replace(/\/[^/]*$/, '')
245 251
             file_location = file_location.replace(/\/.history\/[^/]*$/, '')
246 252
 
247
-            $('.revision-link').each(function() {
248
-                $(this).attr('href', file_location + $(this).attr('href'))
249
-            });
253
+            // NOTE: (WABDAV_HIST_DEL_DISABLED) Disabled for beta 1.0
254
+            // $('.revision-link').each(function() {
255
+            //     $(this).attr('href', file_location + $(this).attr('href'))
256
+            // });
250 257
         }
251 258
 
252 259
         function hide_elements() {