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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-1 lines)
Lines 385-391 Libraries › Administration › Koha Link Here
385
                            if ( row.fax != null ) library_info.push(_("Fax: ") + row.fax.escapeHtml());
385
                            if ( row.fax != null ) library_info.push(_("Fax: ") + row.fax.escapeHtml());
386
                            if ( row.email != null ) library_info.push('<a href="mailto:'+encodeURIComponent(row.email)+'">'+row.email.escapeHtml()+'</a>');
386
                            if ( row.email != null ) library_info.push('<a href="mailto:'+encodeURIComponent(row.email)+'">'+row.email.escapeHtml()+'</a>');
387
                            if ( row.url != null ) library_info.push('<a href="'+encodeURIComponent(row.url)+'">'+row.url.escapeHtml()+'</a>');
387
                            if ( row.url != null ) library_info.push('<a href="'+encodeURIComponent(row.url)+'">'+row.url.escapeHtml()+'</a>');
388
                            if ( row.opac_info != null ) library_info.push(_("OPAC Info") + ': <div>'+row.opac_info.escapeHtml()+'</div>');
389
                            if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
388
                            if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
390
                            return library_info.join('<br/>');
389
                            return library_info.join('<br/>');
391
                        },
390
                        },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-2 / +39 lines)
Lines 13-18 Link Here
13
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'home-search.inc' %]
14
[% INCLUDE 'home-search.inc' %]
15
15
16
16
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17
    <ol>
18
    <ol>
18
        <li>
19
        <li>
Lines 165-171 Link Here
165
                <div class="row">
166
                <div class="row">
166
                    <div class="col-sm-12">
167
                    <div class="col-sm-12">
167
                        [%# Following statement must be in one line for translatability %]
168
                        [%# Following statement must be in one line for translatability %]
168
                        [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) %]
169
                        [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || patrons.size > 0 || selfRegisteredPatrons > 0 %]
169
                            <div id="area-pending">
170
                            <div id="area-pending">
170
                                [% IF pending_article_requests %]
171
                                [% IF pending_article_requests %]
171
                                <div class="pending-info" id="article_requests_pending">
172
                                <div class="pending-info" id="article_requests_pending">
Lines 182-187 Link Here
182
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
183
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
183
                                    <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
184
                                    <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
184
                                    </a>
185
                                    </a>
186
                                    
185
                                    [% IF (all_pendingsuggestions > 0) %]
187
                                    [% IF (all_pendingsuggestions > 0) %]
186
                                        /
188
                                        /
187
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
189
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
Lines 191-197 Link Here
191
                                </div>
193
                                </div>
192
                                [% END %]
194
                                [% END %]
193
195
194
                                [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) %]
196
                                [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]
195
                                <div class="pending-info" id="comments_pending">
197
                                <div class="pending-info" id="comments_pending">
196
                                    <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
198
                                    <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
197
                                    <span class="pending-number-link">[% pendingcomments | html %]</span>
199
                                    <span class="pending-number-link">[% pendingcomments | html %]</span>
Lines 233-239 Link Here
233
                                        <span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
235
                                        <span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
234
                                    </div>
236
                                    </div>
235
                                [% END %]
237
                                [% END %]
238
                            
239
                                [% IF selfRegisteredPatrons.size > 0 %]
240
                                    <div class="pending-info">
241
                                        
242
                                        Pre-registered patron(s) from:
243
244
                                        <form action ="/cgi-bin/koha/members/member.pl" method="post">
245
                                            <input type="hidden" name="categorycode_filter" value="[% PatronSelfRegistrationDefaultCategory %]">
246
                                            <a class="pre-registration-link pending-number-link pre-registration-link-all" href="#">All libraries: [% selfRegisteredPatrons.size %]</a>
247
                                        </form>
248
                                [% END %]
249
250
                                [% IF branch %]
251
252
                                    [% IF pre_insc.size >= 1 %]
253
254
                                        <form action="/cgi-bin/koha/members/member.pl" method="post">
255
                                            <input type="hidden" name="branchcode_filter" value="[% branch %]">
256
                                            <input type="hidden" name="categorycode_filter" value="[% PatronSelfRegistrationDefaultCategory %]">
257
                                            <span>/</span>
258
                                            <a class="pre-registration-link pending-number-link pre-registration-link-branch" href="#">[% Branches.GetLoggedInBranchname | html %]: [% pre_insc.size %]</a>
259
                                        </form>
260
261
                                    [% END %]
262
263
                                    </div>
236
264
265
                                [% END %]  
237
                            </div>
266
                            </div>
238
267
239
                        [% END %]
268
                        [% END %]
Lines 268-273 Link Here
268
        });
297
        });
269
    //]]>
298
    //]]>
270
    </script>
299
    </script>
300
    <script>
301
    $(document).ready(function(){
302
        $(".pre-registration-link").on("click", function(){
303
            this.closest("form").submit();
304
        })        
305
    });
306
    </script>
307
271
[% END %]
308
[% END %]
272
<!-- the main div is closed in intranet-bottom.inc -->
309
<!-- the main div is closed in intranet-bottom.inc -->
273
[% INCLUDE 'intranet-bottom.inc' %]
310
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/mainpage.pl (-1 / +21 lines)
Lines 33-38 use Koha::ArticleRequests; Link Here
33
use Koha::ProblemReports;
33
use Koha::ProblemReports;
34
use Koha::Quotes;
34
use Koha::Quotes;
35
use Koha::Suggestions;
35
use Koha::Suggestions;
36
use Template::Stash;
37
38
use Data::Dumper;
36
39
37
my $query = CGI->new;
40
my $query = CGI->new;
38
41
Lines 99-104 my $pending_article_requests = Koha::ArticleRequests->search_limited( Link Here
99
)->count;
102
)->count;
100
my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
103
my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
101
104
105
106
my $PatronSelfRegistrationDefaultCategory = C4::Context->preference('PatronSelfRegistrationDefaultCategory');
107
if ($PatronSelfRegistrationDefaultCategory) {
108
    my @selfRegisteredPatrons = Koha::Patrons->search({ categorycode => $PatronSelfRegistrationDefaultCategory });
109
    my $homebranch = C4::Context->userenv->{'branch'};
110
    my @pre_insc = Koha::Patrons->search({ categorycode => $PatronSelfRegistrationDefaultCategory, branchcode => $homebranch });
111
112
    $template->param(
113
        selfRegisteredPatrons => \@selfRegisteredPatrons,
114
        PatronSelfRegistrationDefaultCategory => $PatronSelfRegistrationDefaultCategory,
115
        branch => $homebranch,
116
        pre_insc => \@pre_insc,
117
118
    );
119
}
120
121
122
102
$template->param(
123
$template->param(
103
    pendingcomments                => $pendingcomments,
124
    pendingcomments                => $pendingcomments,
104
    pendingtags                    => $pendingtags,
125
    pendingtags                    => $pendingtags,
105
- 

Return to bug 29075