View | Details | Raw Unified | Return to bug 29491
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-103 / +102 lines)
Lines 15-128 Link Here
15
</head>
15
</head>
16
16
17
<body id="pat_notices" class="pat">
17
<body id="pat_notices" class="pat">
18
[% INCLUDE 'header.inc' %]
18
    [% INCLUDE 'header.inc' %]
19
[% INCLUDE 'patron-search.inc' %]
19
    [% INCLUDE 'patron-search.inc' %]
20
20
21
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21
    <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22
    <ol>
22
        <ol>
23
        <li>
23
            <li>
24
            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24
                <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25
        </li>
25
            </li>
26
        <li>
26
            <li>
27
            <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
27
                <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
28
        </li>
28
            </li>
29
        <li>
29
            <li>
30
            <a href="#" aria-current="page">
30
                <a href="#" aria-current="page">
31
                Sent notices for [% INCLUDE 'patron-title.inc' %]
31
                    Sent notices for [% INCLUDE 'patron-title.inc' %]
32
            </a>
32
                </a>
33
        </li>
33
            </li>
34
    </ol>
34
        </ol>
35
</nav>
35
    </nav>
36
36
37
<div class="main container-fluid">
37
    <div class="main container-fluid">
38
    <div class="row">
38
        <div class="row">
39
        <div class="col-sm-10 col-sm-push-2">
39
            <div class="col-sm-10 col-sm-push-2">
40
            <main>
40
                <main>
41
41
42
[% INCLUDE 'members-toolbar.inc' %]
42
                    [% INCLUDE 'members-toolbar.inc' %]
43
<h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
43
                    <h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
44
44
45
[% IF ( QUEUED_MESSAGES ) %]
45
                    [% IF ( QUEUED_MESSAGES ) %]
46
    <table id="noticestable">
46
                        <table id="noticestable">
47
        <thead>
47
                            <thead>
48
            <tr>
48
                                <tr>
49
                <th>Notice</th>
49
                                    <th>Notice</th>
50
                <th>Type</th>
50
                                    <th>Type</th>
51
                <th>Status</th>
51
                                    <th>Status</th>
52
                <th>Updated on</th>
52
                                    <th>Updated on</th>
53
                <th>Time created</th>
53
                                    <th>Time created</th>
54
                <th>Delivery note</th>
54
                                    <th>Delivery note</th>
55
            </tr>
55
                                </tr>
56
        </thead>
56
                            </thead>
57
	<tbody>
57
                            <tbody>
58
	    [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
58
                                [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
59
	    <tr>
59
                                    <tr>
60
		<td>
60
                                        <td>
61
            <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="#">[% QUEUED_MESSAGE.subject | html %]</a>
61
                                            <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="#">[% QUEUED_MESSAGE.subject | html %]</a>
62
            <div id="notice[% QUEUED_MESSAGE.message_id | html %]" class="notice">
62
                                            <div id="notice[% QUEUED_MESSAGE.message_id | html %]" class="notice">
63
                <iframe srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe>
63
                                                <iframe srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe>
64
            </div>
64
                                            </div>
65
        </td>
65
                                        </td>
66
		<td>
66
                                        <td>
67
            [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
67
                                            [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
68
            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'print' ) %]print
68
                                            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'print' ) %]print
69
            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'feed' ) %]feed
69
                                            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'feed' ) %]feed
70
            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'sms' ) %]sms
70
                                            [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'sms' ) %]sms
71
            [% ELSE %][% QUEUED_MESSAGE.message_transport_type | html %][% END %]
71
                                            [% ELSE %][% QUEUED_MESSAGE.message_transport_type | html %][% END %]
72
        </td>
72
                                        </td>
73
		<td>
73
                                        <td>
74
            [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
74
                                            [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
75
            [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
75
                                            [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
76
            [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
76
                                            [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
77
            [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
77
                                            [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
78
            [% ELSE %][% QUEUED_MESSAGE.status | html %][% END %]
78
                                            [% ELSE %][% QUEUED_MESSAGE.status | html %][% END %]
79
            [% IF ( QUEUED_MESSAGE.status != 'pending' ) %]
79
                                            [% IF ( QUEUED_MESSAGE.status != 'pending' ) %]
80
            <div id="resend_notice[% QUEUED_MESSAGE.message_id | html %]"  class="notice">
80
                                                <div id="resend_notice[% QUEUED_MESSAGE.message_id | html %]"  class="notice">
81
                <form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | html %]" method="POST">
81
                                                    <form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | html %]" method="POST">
82
                    <input type="hidden" name="op" value="resend_notice" />
82
                                                        <input type="hidden" name="op" value="resend_notice" />
83
                    <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
83
                                                        <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
84
                    <input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id | html %]" />
84
                                                        <input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id | html %]" />
85
                    <fieldset class="action">
85
                                                        <fieldset class="action">
86
                        <button class="btn btn-default btn-xs" type="submit">Resend</button>
86
                                                            <button class="btn btn-default btn-xs" type="submit">Resend</button>
87
                    </fieldset>
87
                                                        </fieldset>
88
                </form>
88
                                                    </form>
89
            </div>
89
                                                </div>
90
            [% END %]
90
                                            [% END %]
91
        </td>
91
                                        </td>
92
        <td data-order="[% QUEUED_MESSAGE.updated_on | html %]">[% QUEUED_MESSAGE.updated_on | $KohaDates  with_hours => 1 %]</td>
92
                                        <td data-order="[% QUEUED_MESSAGE.updated_on | html %]">[% QUEUED_MESSAGE.updated_on | $KohaDates  with_hours => 1 %]</td>
93
        <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates  with_hours => 1 %]</td>
93
                                        <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates  with_hours => 1 %]</td>
94
        <td>
94
                                        <td>
95
        [% IF ( QUEUED_MESSAGE.failure_code ) %]
95
                                            [% IF ( QUEUED_MESSAGE.failure_code ) %]
96
            [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %]
96
                                                [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]Invalid borrowernumber [% borrowernumber | html %]
97
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower
97
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]Unable to find an email address for this borrower
98
            [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]
98
                                                [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]
99
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address
99
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]Missing from email address
100
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number
100
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]Missing SMS number
101
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate
101
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]Message is duplicate
102
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver
102
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]No notes from SMS driver
103
            [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details
103
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]Unhandled email failure, check the logs for further details
104
            [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error
104
                                                [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]Unknown error
105
            [% ELSE %]Error occurred while sending email.
105
                                                [% ELSE %]Error occurred while sending email.
106
            [% END %]
106
                                                [% END %]
107
        [% END %]
107
                                            [% END %]
108
        </td>
108
                                        </td>
109
        </tr>
109
                                    </tr>
110
	    [% END %]
110
                                [% END %]
111
	</tbody>
111
                            </tbody>
112
    </table>
112
                        </table>
113
[% ELSE %]
113
                    [% ELSE %]
114
    <div class="dialog message">There is no record of any messages that have been sent to this patron.</div>
114
                        <div class="dialog message">There is no record of any messages that have been sent to this patron.</div>
115
[% END %]
115
                    [% END %]
116
116
117
            </main>
117
                </main>
118
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
118
            </div> <!-- /.col-sm-10.col-sm-push-2 -->
119
119
120
        <div class="col-sm-2 col-sm-pull-10">
120
            <div class="col-sm-2 col-sm-pull-10">
121
            <aside>
121
                <aside>
122
                [% INCLUDE 'circ-menu.inc' %]
122
                    [% INCLUDE 'circ-menu.inc' %]
123
            </aside>
123
                </aside>
124
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
124
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
125
     </div> <!-- /.row -->
125
        </div> <!-- /.row -->
126
126
127
[% MACRO jsinclude BLOCK %]
127
[% MACRO jsinclude BLOCK %]
128
    [% INCLUDE 'datatables.inc' %]
128
    [% INCLUDE 'datatables.inc' %]
129
- 

Return to bug 29491