Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Fix empty alert box when show project in logged out state
Browse files Browse the repository at this point in the history
  • Loading branch information
kuro610 committed Jun 5, 2022
1 parent 3a041e7 commit 90aef6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion root/static/css/local_bootstrap_modifications.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ login logout header color

.bg-header {
background-color: var(--cc-green);
}
}
14 changes: 8 additions & 6 deletions root/templates/project/show.tt
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[% IF project.archived %]
<div class="alert alert-success">
[% IF project.archived;
IF can_unarchive %]
[% IF can_unarchive %]
<form id="unarchive" method="post" action="[% project_urls.unarchive %]"></form>
<p class="m-0">
📁 This project is archived (read-only). You can
<button class="alert-link" type="submit" form="unarchive">Un-archive this project</button>
</p>
[% ELSE %]
<p class="m-0">📁 This project has been archived.</p>
[% END;
ELSIF can_edit %]
[% END %]
</div>
[% ELSIF can_edit %]
<div class="alert alert-success">
<p class="m-0">
[% IF inventory.quantities == 0
AND inventory.articles == 0
Expand Down Expand Up @@ -45,9 +47,9 @@ ELSIF can_edit %]
</form>
[% ELSE %]
Once you’ve finished this project you can <a class="alert-link" href="[% project_urls.print %]">print documents</a> to take action.
[% END;
END %]
[% END %]
</div>
[% END %]

[% INCLUDE 'print/project.tt' %]

Expand Down

0 comments on commit 90aef6a

Please sign in to comment.