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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt (-1 / +1 lines)
Lines 457-463 Link Here
457
    [% END %]
457
    [% END %]
458
    [% FOREACH lang_lis IN lang_list %]
458
    [% FOREACH lang_lis IN lang_list %]
459
        <optgroup label="[% lang_lis.language | html %]">
459
        <optgroup label="[% lang_lis.language | html %]">
460
            [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacSuggestionInstructions'] %]
460
            [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText'] %]
461
                [% IF ( location == '' ) %]
461
                [% IF ( location == '' ) %]
462
                    [% SET location_lang = lang_lis.language %]
462
                    [% SET location_lang = lang_lis.language %]
463
                    [% location = BLOCK %]OPAC news[% END %]
463
                    [% location = BLOCK %]OPAC news[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt (-153 / +167 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE raw %]
2
[% USE Branches %]
3
[% USE Branches %]
3
[% USE ItemTypes %]
4
[% USE ItemTypes %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
Lines 30-201 Link Here
30
        <div class="row">
31
        <div class="row">
31
            <div class="col">
32
            <div class="col">
32
                [% IF biblio.can_article_request( patron ) %]
33
                [% IF biblio.can_article_request( patron ) %]
33
                    [% SET article_request_type = biblio.article_request_type( patron ) %]
34
                    <h1>Place article request for [% biblio.title | html %]</h1>
35
                    [% IF disclaimer %]
36
                        <div class="alert alert-warning">
37
                            [% FOREACH disc IN disclaimer %]
38
                            <h3>[% disc.title | html %]</h3>
39
                            <p>
40
                                [% disc.content | $raw %]
41
                            </p>
42
                            [% END %]
43
                            <a href="/cgi-bin/koha/opac-request-article.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;action=accept"
44
                            class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Accept</a>
45
                        </div>
46
                    [% ELSE %]
47
                        [% SET article_request_type = biblio.article_request_type( patron ) %]
34
48
35
                    [% IF article_request_type == 'yes' %]       [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %]           [% END %]
49
                        [% IF article_request_type == 'yes' %]       [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %]           [% END %]
36
                    [% IF article_request_type == 'bib_only' %]  [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
50
                        [% IF article_request_type == 'bib_only' %]  [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
37
                    [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %]   [% END %]
51
                        [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %]   [% END %]
38
52
39
                    <h1>Place article request for [% biblio.title | html %]</h1>
40
53
41
                    <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
54
                        <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
42
                        <legend class="sr-only">Place article request</legend>
55
                        <legend class="sr-only">Place article request</legend>
43
                        <input type="hidden" name="action" value="create" />
56
                            <input type="hidden" name="action" value="create" />
44
                        <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
57
                            <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
45
58
46
                        <fieldset class="rows">
59
                            <fieldset class="rows">
47
                            <ul>
60
                                <ul>
48
                                <li>
61
                                    <li>
49
                                    [% IF mandatory_fields.search('title') %]
62
                                        [% IF mandatory_fields.search('title') %]
50
                                        <label for="title" class="required">Title:</label>
63
                                            <label for="title" class="required">Title:</label>
51
                                        <input type="text" required="required" name="title" id="title" size="50"/>
64
                                            <input type="text" required="required" name="title" id="title" size="50"/>
52
                                    [% ELSE %]
65
                                        [% ELSE %]
53
                                        <label for="title">Title:</label>
66
                                            <label for="title">Title:</label>
54
                                        <input type="text" name="title" id="title" size="50"/>
67
                                            <input type="text" name="title" id="title" size="50"/>
55
                                    [% END %]
68
                                        [% END %]
56
                                </li>
69
                                    </li>
57
70
58
                                <li>
71
                                    <li>
59
                                    [% IF mandatory_fields.search('author') %]
72
                                        [% IF mandatory_fields.search('author') %]
60
                                        <label for="author" class="required">Author:</label>
73
                                            <label for="author" class="required">Author:</label>
61
                                        <input type="text" required="required" name="author" id="author" size="50"/>
74
                                            <input type="text" required="required" name="author" id="author" size="50"/>
62
                                    [% ELSE %]
75
                                        [% ELSE %]
63
                                        <label for="author">Author:</label>
76
                                            <label for="author">Author:</label>
64
                                        <input type="text" name="author" id="author" size="50"/>
77
                                            <input type="text" name="author" id="author" size="50"/>
65
                                    [% END %]
78
                                        [% END %]
66
                                </li>
79
                                    </li>
67
80
68
                                <li>
81
                                    <li>
69
                                    [% IF mandatory_fields.search('volume') %]
82
                                        [% IF mandatory_fields.search('volume') %]
70
                                        <label for="volume" class="required">Volume:</label>
83
                                            <label for="volume" class="required">Volume:</label>
71
                                        <input type="text" required="required" name="volume" id="volume" size="50"/>
84
                                            <input type="text" required="required" name="volume" id="volume" size="50"/>
72
                                    [% ELSE %]
85
                                        [% ELSE %]
73
                                        <label for="volume">Volume:</label>
86
                                            <label for="volume">Volume:</label>
74
                                        <input type="text" name="volume" id="volume" size="50"/>
87
                                            <input type="text" name="volume" id="volume" size="50"/>
75
                                    [% END %]
88
                                        [% END %]
76
                                </li>
89
                                    </li>
77
90
78
                                <li>
91
                                    <li>
79
                                    [% IF mandatory_fields.search('issue') %]
92
                                        [% IF mandatory_fields.search('issue') %]
80
                                        <label for="issue" class="required">Issue:</label>
93
                                            <label for="issue" class="required">Issue:</label>
81
                                        <input type="text" required="required" name="issue" id="issue" size="50"/>
94
                                            <input type="text" required="required" name="issue" id="issue" size="50"/>
82
                                    [% ELSE %]
95
                                        [% ELSE %]
83
                                        <label for="issue">Issue:</label>
96
                                            <label for="issue">Issue:</label>
84
                                        <input type="text" name="issue" id="issue" size="50"/>
97
                                            <input type="text" name="issue" id="issue" size="50"/>
85
                                    [% END %]
98
                                        [% END %]
86
                                </li>
99
                                    </li>
87
100
88
                                <li>
101
                                    <li>
89
                                    [% IF mandatory_fields.search('date') %]
102
                                        [% IF mandatory_fields.search('date') %]
90
                                        <label for="date" class="required">Date:</label>
103
                                            <label for="date" class="required">Date:</label>
91
                                        <input type="text" required="required" name="date" id="date" size="50"/>
104
                                            <input type="text" required="required" name="date" id="date" size="50"/>
92
                                    [% ELSE %]
105
                                        [% ELSE %]
93
                                        <label for="date">Date:</label>
106
                                            <label for="date">Date:</label>
94
                                        <input type="text" name="date" id="date" size="50"/>
107
                                            <input type="text" name="date" id="date" size="50"/>
95
                                    [% END %]
108
                                        [% END %]
96
                                </li>
109
                                    </li>
97
110
98
                                <li>
111
                                    <li>
99
                                    [% IF mandatory_fields.search('pages') %]
112
                                        [% IF mandatory_fields.search('pages') %]
100
                                        <label for="pages" class="required">Pages:</label>
113
                                            <label for="pages" class="required">Pages:</label>
101
                                        <input type="text" required="required" name="pages" id="pages" size="50"/>
114
                                            <input type="text" required="required" name="pages" id="pages" size="50"/>
102
                                    [% ELSE %]
115
                                        [% ELSE %]
103
                                        <label for="pages">Pages:</label>
116
                                            <label for="pages">Pages:</label>
104
                                        <input type="text" name="pages" id="pages" size="50"/>
117
                                            <input type="text" name="pages" id="pages" size="50"/>
105
                                    [% END %]
118
                                        [% END %]
106
                                </li>
119
                                    </li>
107
120
108
                                <li>
121
                                    <li>
109
                                    [% IF mandatory_fields.search('chapters') %]
122
                                        [% IF mandatory_fields.search('chapters') %]
110
                                        <label for="chapters" class="required">Chapters:</label>
123
                                            <label for="chapters" class="required">Chapters:</label>
111
                                        <input type="text" required="required" name="chapters" id="chapters" size="50"/>
124
                                            <input type="text" required="required" name="chapters" id="chapters" size="50"/>
112
                                    [% ELSE %]
125
                                        [% ELSE %]
113
                                        <label for="chapters">Chapters:</label>
126
                                            <label for="chapters">Chapters:</label>
114
                                        <input type="text" name="chapters" id="chapters" size="50"/>
127
                                            <input type="text" name="chapters" id="chapters" size="50"/>
115
                                    [% END %]
128
                                        [% END %]
116
                                </li>
129
                                    </li>
117
130
118
                                <li>
131
                                    <li>
119
                                    <label for="patron_notes">Notes:</label>
132
                                        <label for="patron_notes">Notes:</label>
120
                                    <input type="text" name="patron_notes" id="patron_notes" size="50"/>
133
                                        <input type="text" name="patron_notes" id="patron_notes" size="50"/>
121
                                </li>
134
                                    </li>
122
135
123
                                <li>
136
                                    <li>
124
                                    <label for="branchcode">Pickup library:</label>
137
                                        <label for="branchcode">Pickup library:</label>
125
                                    <select name="branchcode" id="branchcode" required="required">
138
                                        <select name="branchcode" id="branchcode" required="required">
126
                                        [% FOREACH b IN Branches.all %]
139
                                            [% FOREACH b IN Branches.all %]
127
                                            [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
140
                                                [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
128
                                                <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
141
                                                    <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
129
                                            [% ELSE %]
142
                                                [% ELSE %]
130
                                                <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
143
                                                    <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
144
                                                [% END %]
145
                                            [% END %]
146
                                        </select>
147
                                    </li>
148
                                </ul>
149
                            </fieldset>
150
151
                            [% IF article_request_type != 'bib_only' %]
152
                                <table class="copiesrow table table-bordered table-striped">
153
                                    <caption>Select a specific item:</caption>
154
                                    <thead>
155
                                        <tr>
156
                                            <th>&nbsp;</th>
157
                                            <th>Item type</th>
158
                                            <th>Barcode</th>
159
                                            <th>Home library</th>
160
                                            <th>Call number</th>
161
                                            <th>Enumeration</th>
162
                                        </tr>
163
                                    </thead>
164
165
                                    <tbody>
166
                                        [% FOREACH item IN biblio.items %]
167
                                            [% IF item.can_article_request( patron ) %]
168
                                                <tr>
169
                                                    <td>
170
                                                        [% IF article_request_type == 'item_only' && !checked %]
171
                                                            [% SET checked = 1 %]
172
                                                            <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
173
                                                        [% ELSE %]
174
                                                            <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
175
                                                        [% END %]
176
                                                    </td>
177
                                                    <td>
178
                                                        [% ItemTypes.GetDescription( item.itype ) | html %]
179
                                                    </td>
180
                                                    <td>
181
                                                        [% item.barcode | html %]
182
                                                    </td>
183
                                                    <td>
184
                                                        [% Branches.GetName( item.homebranch ) | html %]
185
                                                    </td>
186
                                                    <td>
187
                                                        [% item.itemcallnumber | html %]
188
                                                    </td>
189
                                                    <td>
190
                                                        [% item.enumchron | html %]
191
                                                    </td>
192
                                                </tr>
131
                                            [% END %]
193
                                            [% END %]
132
                                        [% END %]
194
                                        [% END %]
133
                                    </select>
195
134
                                </li>
196
                                        [% IF article_request_type != 'item_only' %]
135
                            </ul>
136
                        </fieldset>
137
138
                        [% IF article_request_type != 'bib_only' %]
139
                            <table class="copiesrow table table-bordered table-striped">
140
                                <caption>Select a specific item:</caption>
141
                                <thead>
142
                                    <tr>
143
                                        <th>&nbsp;</th>
144
                                        <th>Item type</th>
145
                                        <th>Barcode</th>
146
                                        <th>Home library</th>
147
                                        <th>Call number</th>
148
                                        <th>Enumeration</th>
149
                                    </tr>
150
                                </thead>
151
152
                                <tbody>
153
                                    [% FOREACH item IN biblio.items %]
154
                                        [% IF item.can_article_request( patron ) %]
155
                                            <tr>
197
                                            <tr>
156
                                                <td>
198
                                                <td>
157
                                                    [% IF article_request_type == 'item_only' && !checked %]
199
                                                    <input type="radio" name="itemnumber" value="" checked="checked"/>
158
                                                        [% SET checked = 1 %]
159
                                                        <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
160
                                                    [% ELSE %]
161
                                                        <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
162
                                                    [% END %]
163
                                                </td>
164
                                                <td>
165
                                                    [% ItemTypes.GetDescription( item.itype ) | html %]
166
                                                </td>
167
                                                <td>
168
                                                    [% item.barcode | html %]
169
                                                </td>
200
                                                </td>
170
                                                <td>
201
                                                <td colspan="6">
171
                                                    [% Branches.GetName( item.homebranch ) | html %]
202
                                                    Any item
172
                                                </td>
173
                                                <td>
174
                                                    [% item.itemcallnumber | html %]
175
                                                </td>
176
                                                <td>
177
                                                    [% item.enumchron | html %]
178
                                                </td>
203
                                                </td>
179
                                            </tr>
204
                                            </tr>
180
                                        [% END %]
205
                                        [% END %]
181
                                    [% END %]
206
                                    </tbody>
182
207
                                </table>
183
                                    [% IF article_request_type != 'item_only' %]
208
                            [% END %]
184
                                        <tr>
185
                                            <td>
186
                                                <input type="radio" name="itemnumber" value="" checked="checked"/>
187
                                            </td>
188
                                            <td colspan="6">
189
                                                Any item
190
                                            </td>
191
                                        </tr>
192
                                    [% END %]
193
                                </tbody>
194
                            </table>
195
                        [% END %]
196
209
197
                        <input type="submit" class="btn btn-primary" value="Place request" />
210
                            <input type="submit" class="btn btn-primary" value="Place request" />
198
                    </form>
211
                        </form>
212
                    [% END %]
199
                [% ELSE %]
213
                [% ELSE %]
200
                    <h1 class="title">[% biblio.title | html %]</h1>
214
                    <h1 class="title">[% biblio.title | html %]</h1>
201
                    <div class="alert alert-info">
215
                    <div class="alert alert-info">
(-)a/opac/opac-request-article.pl (-1 / +12 lines)
Lines 23-28 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Output;
25
use C4::Output;
26
use C4::Context;
27
use C4::NewsChannels;
26
28
27
use Koha::Biblios;
29
use Koha::Biblios;
28
use Koha::Patrons;
30
use Koha::Patrons;
Lines 39-44 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
39
41
40
my $action = $cgi->param('action') || q{};
42
my $action = $cgi->param('action') || q{};
41
my $biblionumber = $cgi->param('biblionumber');
43
my $biblionumber = $cgi->param('biblionumber');
44
my $homebranch = C4::Context->userenv->{'branch'} || "";
45
my $location   = 'ArticleRequestsDisclaimerText_';
46
my $disclaimer;
47
if ( !$action ) {
48
    $disclaimer = GetNewsToDisplay( $location . $template->lang, $homebranch );
49
    $disclaimer = GetNewsToDisplay( $location . "en",            $homebranch )
50
      if !scalar(@$disclaimer);
51
}
52
42
53
43
if ( $action eq 'create' ) {
54
if ( $action eq 'create' ) {
44
    my $branchcode = $cgi->param('branchcode');
55
    my $branchcode = $cgi->param('branchcode');
Lines 80-85 my $patron = Koha::Patrons->find($borrowernumber); Link Here
80
$template->param(
91
$template->param(
81
    biblio => $biblio,
92
    biblio => $biblio,
82
    patron => $patron,
93
    patron => $patron,
94
    disclaimer => $disclaimer
83
);
95
);
84
96
85
output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
97
output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
86
- 

Return to bug 27948