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

Commit 4583e26

Browse files
committed
Fix empty alert box when show project in logged out state
1 parent 3a041e7 commit 4583e26

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

root/templates/project/show.tt

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
[% IF project.archived %]
12
<div class="alert alert-success">
2-
[% IF project.archived;
3-
IF can_unarchive %]
3+
[% IF can_unarchive %]
44
<form id="unarchive" method="post" action="[% project_urls.unarchive %]"></form>
55
<p class="m-0">
66
📁 This project is archived (read-only). You can
77
<button class="alert-link" type="submit" form="unarchive">Un-archive this project</button>
88
</p>
99
[% ELSE %]
1010
<p class="m-0">📁 This project has been archived.</p>
11-
[% END;
12-
ELSIF can_edit %]
11+
[% END %]
12+
</div>
13+
[% ELSIF can_edit %]
14+
<div class="alert alert-success">
1315
<p class="m-0">
1416
[% IF inventory.quantities == 0
1517
AND inventory.articles == 0
@@ -45,9 +47,9 @@ ELSIF can_edit %]
4547
</form>
4648
[% ELSE %]
4749
Once you’ve finished this project you can <a class="alert-link" href="[% project_urls.print %]">print documents</a> to take action.
48-
[% END;
49-
END %]
50+
[% END %]
5051
</div>
52+
[% END %]
5153

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

0 commit comments

Comments
 (0)