Skip to content

Commit

Permalink
Improve go to form buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Aug 30, 2017
1 parent 830bc4d commit 0d883cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 8 additions & 8 deletions lowfat/templates/lowfat/blogs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h2>
Blog Posts
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
{% if claimant %}
<a class="btn btn-default" href="{% url 'blog' %}?claimant_id={{claimant.id}}">Submit a blog post</a>
{% elif fund %}
Expand Down Expand Up @@ -29,7 +29,7 @@ <h2>
<table class="table table-bordered sortable">
<tbody>
<tr>
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<th>
Submitted date
</th>
Expand All @@ -45,15 +45,15 @@ <h2>
Funding Request
</th>
{% endif %}
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<th>
Status
</th>
{% endif %}
<th>
Publish date
</th>
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<th>
Actions
</th>
Expand All @@ -72,7 +72,7 @@ <h2>
{% endif %}
{% endif %}
>
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<td>
{{ blog.added }}
</td>
Expand Down Expand Up @@ -103,7 +103,7 @@ <h2>
{% endif %}
</td>
{% endif %}
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<td>
{{ blog.get_status_display }}
</td>
Expand All @@ -115,7 +115,7 @@ <h2>
<strong>Unpublished</strong>
{% endif %}
</td>
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<td>
{% if user.is_staff %}
<a class="icon" href="mailto:{{ blog.author.email }}"><i class="fa fa-envelope" aria-hidden="true"></i></a>
Expand All @@ -137,7 +137,7 @@ <h2>
<td
{% if user.is_staff %}
colspan="7"
{% elif claimant and user == claimant.user %}
{% elif claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
colspan="5"
{% else %}
colspan="2"
Expand Down
12 changes: 8 additions & 4 deletions lowfat/templates/lowfat/expenses.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<h2>
Expenses
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
{% if fund %}
{% if fund.status not in "RF" %}
{% if fund.status not in "RFCX" %}
<a class="btn btn-default" href="{% url 'expense' %}{% if fund %}?fund_id={{fund.id}}{% endif %}">Submit expense claim</a>
{% else %}
<a class="btn btn-default" href="{% url 'expense' %}?claimant_id={{claimant.id}}">Submit expense claim</a>
{% endif %}
{% else %}
{% if user.is_staff and claimant %}
<a class="btn btn-default" href="{% url 'expense' %}?claimant_id={{claimant.id}}">Submit expense claim</a>
{% else %}
<a class="btn btn-default" href="{% url 'expense' %}">Submit expense claim</a>
{% endif %}
{% endif %}
{% endif %}
</h2>
{% if user.is_staff %}
<ul class="nav nav-tabs">
Expand Down Expand Up @@ -49,7 +53,7 @@ <h2>
<th>
Amount authorized for payment
</th>
{% if user.is_staff or claimant and user == claimant.user %}
{% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
<th>
Actions
</th>
Expand Down Expand Up @@ -141,7 +145,7 @@ <h2>
<td
{% if user.is_staff %}
colspan="8"
{% elif claimant and user == claimant.user %}
{% elif claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %}
colspan="6"
{% else %}
colspan="3"
Expand Down

0 comments on commit 0d883cb

Please sign in to comment.