aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/widget_helper.rb
blob: e604954feef98cb2c34e673bbdf3e2dfe4dd53d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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