aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-04-14 15:29:37 +0100
committerLouise Crow <louise.crow@gmail.com>2015-04-28 09:07:25 +0100
commitca66d9b22bca71f4c0a62121e6bff7c7da93d20d (patch)
treeec4970007438cc240ec0ce248780eb8c911e28da /app/views
parentf77d5f9f70f4a0755a9772436357fc315124e92c (diff)
Use a helper to generate the status text.
This has length constraints, so we don't want to directly use InfoRequest.get_status_description (which also adds a full stop), but we want statuses that more closely correspond to get_status_description than those in the template, which are used in AskTheEU.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/widgets/show.html.erb36
1 files changed, 1 insertions, 35 deletions
diff --git a/app/views/widgets/show.html.erb b/app/views/widgets/show.html.erb
index 73b875fa7..fd2391035 100644
--- a/app/views/widgets/show.html.erb
+++ b/app/views/widgets/show.html.erb
@@ -10,41 +10,7 @@
</div>
<div class="alaveteli-widget__status <%= @info_request.calculate_status %>">
<p class="alaveteli-widget__status__status-label">Status</p>
- <% if @info_request.awaiting_description %>
- <%= _('Unknown Status') %>
- <% elsif @status == 'waiting_response' %>
- <%= _('Waiting Response') %>
- <% elsif @status == 'waiting_response_overdue' %>
- <%= _('Waiting Response') %>
- <% elsif @status == 'waiting_response_very_overdue' %>
- <%= _('Waiting Response') %>
- <% elsif @status == 'not_held' %>
- <%= _('Not Held') %>
- <% elsif @status == 'rejected' %>
- <%= _('Rejected') %>
- <% elsif @status == 'successful' %>
- <%= _('Successful') %>
- <% elsif @status == 'partially_successful' %>
- <%= _('Partial Success') %>
- <% elsif @status == 'waiting_clarification' %>
- <%= _('Waiting Clarification') %>
- <% elsif @status == 'gone_postal' %>
- <%= _('Gone Postal') %>
- <% elsif @status == 'internal_review' %>
- <%= _('Internal Review') %>
- <% elsif @status == 'error_message' %>
- <%= _('Error Message') %>
- <% elsif @status == 'requires_admin' %>
- <%= _('Requires Admin') %>
- <% elsif @status == 'user_withdrawn' %>
- <%= _('User Withdrawn') %>
- <% elsif @status == 'attention_requested' %>
- <%= _('Attention Requested') %>
- <% elsif @status == 'vexatious' %>
- <%= _('Vexatious') %>
- <% else %>
- <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
- <% end %>
+ <%= status_description(@info_request) %>
</div>
</div>
<div class="alaveteli-widget__people-count">