|
@@ -30,8 +30,8 @@ def get_wrapper_class(full_path):
|
30
|
30
|
}.get(get_item_type(full_path), base_view)
|
31
|
31
|
|
32
|
32
|
|
33
|
|
-def get_wrapper_instance(full_path, request):
|
34
|
|
- return get_wrapper_class(full_path)(request, full_path)
|
|
33
|
+def get_wrapper_instance(full_path, request, is_nxt_prv_item=False):
|
|
34
|
+ return get_wrapper_class(full_path)(request, full_path, is_nxt_prv_item)
|
35
|
35
|
|
36
|
36
|
|
37
|
37
|
def random_copy(request, lst):
|
|
@@ -46,9 +46,10 @@ def random_copy(request, lst):
|
46
|
46
|
|
47
|
47
|
|
48
|
48
|
class base_view(object):
|
49
|
|
- def __init__(self, request, full_path):
|
|
49
|
+ def __init__(self, request, full_path, is_nxt_prv_item):
|
50
|
50
|
self.request = request
|
51
|
51
|
self.full_path = full_path
|
|
52
|
+ self.is_nxt_prv_item = is_nxt_prv_item
|
52
|
53
|
#
|
53
|
54
|
self.item = get_item_by_rel_path(pygal.get_rel_path(full_path))
|
54
|
55
|
if self.item is None:
|
|
@@ -227,7 +228,10 @@ class base_view(object):
|
227
|
228
|
|
228
|
229
|
@property
|
229
|
230
|
def url_userview(self):
|
230
|
|
- return pygal.url_userview(self.request, self.item.rel_path, search=pygal.SEARCH_KEEP)
|
|
231
|
+ if self.is_nxt_prv_item:
|
|
232
|
+ return pygal.url_userview(self.request, self.item.rel_path, search=pygal.SEARCH_KEEP, repeat=pygal.REPEAT_KEEP)
|
|
233
|
+ else:
|
|
234
|
+ return pygal.url_userview(self.request, self.item.rel_path, search=pygal.SEARCH_KEEP, repeat=pygal.REPEAT_DISABLE)
|
231
|
235
|
|
232
|
236
|
@property
|
233
|
237
|
def url_webnail(self):
|
|
@@ -256,7 +260,7 @@ class base_view(object):
|
256
|
260
|
for i in range(i + direction, i + direction * lgt, direction):
|
257
|
261
|
full_path = fp_il[i % lgt]
|
258
|
262
|
if get_item_type(full_path) != TYPE_FOLDER:
|
259
|
|
- return get_wrapper_instance(full_path, self.request)
|
|
263
|
+ return get_wrapper_instance(full_path, self.request, is_nxt_prv_item=True)
|
260
|
264
|
return self
|
261
|
265
|
|
262
|
266
|
@property
|