diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-04-28 10:12:16 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-28 10:12:16 +0100 |
commit | c884121722919307984dd2080f01268b271ea1d7 (patch) | |
tree | b5ddeca65d5d4b9c1724d1d87d6a6e6a2661b9c5 /app/helpers/widget_helper.rb | |
parent | d1e666da6fde288bebaea9ade9a6978bcc796ece (diff) | |
parent | 527c0010cad17f043663ea21b8e58395eac72e02 (diff) |
Merge branch 'add-widget' into rails-3-develop
Diffstat (limited to 'app/helpers/widget_helper.rb')
-rw-r--r-- | app/helpers/widget_helper.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/app/helpers/widget_helper.rb b/app/helpers/widget_helper.rb new file mode 100644 index 000000000..e604954fe --- /dev/null +++ b/app/helpers/widget_helper.rb @@ -0,0 +1,46 @@ +module WidgetHelper + def status_description(info_request, status) + case status + when 'waiting_classification' + _('Awaiting classification') + when 'waiting_response' + _('Awaiting response') + when 'waiting_response_overdue' + _('Delayed') + when 'waiting_response_very_overdue' + _('Long overdue') + when 'not_held' + _('Not held') + when 'rejected' + _('Rejected') + when 'successful' + _('Successful') + when 'partially_successful' + _('Partial success') + when 'waiting_clarification' + _('Awaiting clarification') + when 'gone_postal' + _('Handled by post') + when 'internal_review' + _('Internal review') + when 'error_message' + _('Delivery error') + when 'requires_admin' + _('Unusual response') + when 'user_withdrawn' + _('Withdrawn') + when 'attention_requested' + _('Needs admin attention') + when 'vexatious' + _('Vexatious') + when 'not_foi' + _('Not an FOI request') + else + if info_request.respond_to?(:theme_display_status) + info_request.theme_display_status(status) + else + _('Unknown') + end + end + end +end
\ No newline at end of file |