-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ProjectCodebaseView to browse project codebase tree #744
Signed-off-by: Thomas Druez <[email protected]>
- Loading branch information
Showing
4 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 13 additions & 8 deletions
21
scanpipe/templates/scanpipe/includes/project_codebase.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
<nav class="panel is-info"> | ||
<nav id="codebase-navigation" class="panel is-info"> | ||
<p class="panel-heading py-2 is-size-6"> | ||
Codebase | ||
</p> | ||
{% for path in paths %} | ||
<a class="panel-block"> | ||
<span class="panel-icon"> | ||
<i class="{% if path.is_dir %}fas fa-folder{% else %}far fa-file{% endif %}"></i> | ||
</span> | ||
{{ path.name }} | ||
</a> | ||
{% for node in codebase_tree %} | ||
{% if node.is_dir %} | ||
<a class="panel-block" href="#" hx-target="#codebase-navigation" hx-swap="outerHTML" hx-get="{{ project.get_absolute_url }}codebase/?current_dir={{ node.location }}"> | ||
<span class="panel-icon"><i class="fas fa-folder"></i></span> | ||
{{ node.name }} | ||
</a> | ||
{% else %} | ||
<a class="panel-block" href="{% url "resource_detail" project.uuid node.location %}" target="_blank"> | ||
<span class="panel-icon"><i class="far fa-file"></i></span> | ||
{{ node.name }} | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters