Quellcode durchsuchen

Disable non working feature in webdav html render

Bastien Sevajol (Algoo) vor 8 Jahren
Ursprung
Commit
9b56376403
1 geänderte Dateien mit 25 neuen und 18 gelöschten Zeilen
  1. 25 18
      tracim/tracim/lib/webdav/design.py

+ 25 - 18
tracim/tracim/lib/webdav/design.py Datei anzeigen

65
                        label,
65
                        label,
66
                        date,
66
                        date,
67
                        event.owner.display_name,
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
     histHTML += '</table>'
72
     histHTML += '</table>'
72
 
73
 
73
     file = '''
74
     file = '''
93
             </div>
94
             </div>
94
             <div class="pull-right">
95
             <div class="pull-right">
95
                 <div class="btn-group btn-group-vertical">
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
                 </div>
101
                 </div>
100
             </div>
102
             </div>
101
         </div>
103
         </div>
113
             file_location = file_location.replace(/\/[^/]*$/, '')
115
             file_location = file_location.replace(/\/[^/]*$/, '')
114
             file_location = file_location.replace(/\/.history\/[^/]*$/, '')
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
     </script>
123
     </script>
121
 </body>
124
 </body>
197
                            t.owner.display_name,
200
                            t.owner.display_name,
198
                            t.create_readable_date(),
201
                            t.create_readable_date(),
199
                            label,
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
         page = '''
210
         page = '''
206
 <html>
211
 <html>
222
             </div>
227
             </div>
223
             <div class="pull-right">
228
             <div class="pull-right">
224
                 <div class="btn-group btn-group-vertical">
229
                 <div class="btn-group btn-group-vertical">
230
+                    <!-- NOTE: Not omplemented yet, don't display not working link
225
                     <a class="btn btn-default" onclick="hide_elements()">
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
                     <a class="btn btn-default">
234
                     <a class="btn btn-default">
229
                         <i class="fa fa-external-link"></i> View in tracim</a>
235
                         <i class="fa fa-external-link"></i> View in tracim</a>
230
                     </a>
236
                     </a>
244
             file_location = file_location.replace(/\/[^/]*$/, '')
250
             file_location = file_location.replace(/\/[^/]*$/, '')
245
             file_location = file_location.replace(/\/.history\/[^/]*$/, '')
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
         function hide_elements() {
259
         function hide_elements() {