some ezc functions from templates/item.cpp moved to Item and ItemContent

methods HasAccess() HasReadAccess() and similar moved from System to Item and ItemContent
This commit is contained in:
2021-06-18 19:18:13 +02:00
parent ebd791a256
commit ec94dff7d7
32 changed files with 1255 additions and 544 deletions

View File

@@ -1,5 +1,8 @@
<div class="winix"[if winix_function_param_is "ckeditor_browse"] style="padding: 1.5em;"[end]>
[# we can add a winix function called 'image_browser' or similar]
[# such a function can be used for ckeditor and for ordinary browsing]
[# !! IMPROVE ME: move this html code to a ckeditor template]
[if winix_function_param_is "ckeditor_browse"]
@@ -9,9 +12,9 @@
<ul class="uk-breadcrumb">
[for request.dirs]
<li>
<a href="[doc_base_url][request.dirs.link]ls/ckeditor_browse/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">
[if cmp request.dirs.url ""]
[# !! IMPROVE ME it would be better to have a flag of some kind to indicate that this is a root dir]
<a href="[request.dirs.link]/ls/ckeditor_browse/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">
[if request.dirs.is_root_dir]
[# rename ls_root_dir_name to root_dir_name as it can be used by other functions]
{ls_root_dir_name}
[else]
[request.dirs.url]
@@ -23,7 +26,7 @@
</div>
<div class="uk-flex uk-margin-medium">
<div class="uk-width-1-4">
<div class="" style="margin-right: 40px;"> [# workaround: margin from first item from child_dirs overflows here]
[if child_dirs]
<ul class="uk-list uk-list-disc uk-list-collapse">
@@ -65,7 +68,7 @@
<h1>{ls_header}</h1>
[# !! improve me: we need a 'l' flag to a file too, now it's working for dirs only]
[if not item_is]
[if not request.is_item]
[if winix_function_param_is "l"]
@@ -83,9 +86,9 @@
[for child_dirs]
<tr>
<td>d</td>
<td>[child_dirs_privileges]</td>
<td>[child_dirs_user]</td>
<td>[child_dirs_group]</td>
<td>[child_dirs.content.privileges_octal]</td>
<td>[child_dirs.content.user_name]</td>
<td>[child_dirs.content.group_name]</td>
<td>
[if child_dirs.is_parent_for_current_dir]
<a href="[doc_base_url][dir_parent_without_slash][if winix_function_param_is "dirls"]/ls/l/dirls[end]">../</a>
@@ -98,11 +101,11 @@
[for items]
<tr>
<td>[if items_type_is_symlink]l[else][if items_has_static_file]s[else]-[end][end]</td>
<td>[items_privileges]</td>
<td>[items_user]</td>
<td>[items_group]</td>
<td><a href="[doc_base_url][dir][items.url]">[items.url]</a>[if items_type_is_symlink] -> [items_link_to][end]</td>
<td>[if items.type_is_symlink]l[else][if items.has_static_file]s[else]-[end][end]</td>
<td>[items.content.privileges_octal]</td>
<td>[items.content.user_name]</td>
<td>[items.content.group_name]</td>
<td><a href="[doc_base_url][dir][items.url]">[items.url]</a>[if items.type_is_symlink] -> [items.content.link_to][end]</td>
</tr>
[end]
</table>