File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
templates/scanpipe/panels Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 3434 </ tr >
3535 </ thead >
3636 < tbody >
37+ {% if parent_path is not None %}
38+ < tr class ="expand-in-tree is-clickable "
39+ data-path ="{{ parent_path|default_if_none:'' }} "
40+ hx-get ="{% url 'codebase_resource_table' project.slug %}{% if parent_path %}?path={{ parent_path }}{% endif %} "
41+ hx-target ="#right-pane "
42+ hx-push-url ="{% url 'codebase_resource_tree' project.slug %}{% if parent_path %}?path={{ parent_path }}{% endif %} ">
43+ < td class ="is-flex is-align-items-center break-all " style ="min-width: 100px; ">
44+ < span class ="icon is-small mr-2 ">
45+ < i class ="fas fa-folder "> </ i >
46+ </ span >
47+ < span class ="has-text-weight-medium "> ..</ span >
48+ </ td >
49+ < td > </ td >
50+ < td > </ td >
51+ < td > </ td >
52+ < td > </ td >
53+ </ tr >
54+ {% endif %}
3755 {% for resource in resources %}
3856 < tr >
3957 < td class ="is-flex is-align-items-center break-all " style ="min-width: 100px; ">
Original file line number Diff line number Diff line change @@ -2844,4 +2844,11 @@ def get_context_data(self, **kwargs):
28442844 context ["path_segments" ] = [
28452845 ("/" .join (segments [: i + 1 ]), segment ) for i , segment in enumerate (segments )
28462846 ]
2847+
2848+ if path and "/" in path :
2849+ parent_segments = path .rstrip ("/" ).split ("/" )[:- 1 ]
2850+ context ["parent_path" ] = "/" .join (parent_segments )
2851+ else :
2852+ context ["parent_path" ] = None
2853+
28472854 return context
You can’t perform that action at this time.
0 commit comments