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

(-)a/Koha/Schema/Result/ProblemReport.pm (-13 / +14 lines)
Lines 46-53 __PACKAGE__->table("problem_reports"); Link Here
46
=head2 borrowernumber
46
=head2 borrowernumber
47
47
48
  data_type: 'integer'
48
  data_type: 'integer'
49
  default_value: 0
49
  is_foreign_key: 1
50
  is_foreign_key: 1
50
  is_nullable: 1
51
  is_nullable: 0
51
52
52
=head2 branchcode
53
=head2 branchcode
53
54
Lines 86-94 __PACKAGE__->table("problem_reports"); Link Here
86
=head2 status
87
=head2 status
87
88
88
  data_type: 'varchar'
89
  data_type: 'varchar'
89
  default_value: 'N'
90
  default_value: 'NEW'
90
  is_nullable: 0
91
  is_nullable: 0
91
  size: 1
92
  size: 6
92
93
93
=cut
94
=cut
94
95
Lines 100-106 __PACKAGE__->add_columns( Link Here
100
  "content",
101
  "content",
101
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
102
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
102
  "borrowernumber",
103
  "borrowernumber",
103
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
104
  {
105
    data_type      => "integer",
106
    default_value  => 0,
107
    is_foreign_key => 1,
108
    is_nullable    => 0,
109
  },
104
  "branchcode",
110
  "branchcode",
105
  {
111
  {
106
    data_type => "varchar",
112
    data_type => "varchar",
Lines 128-134 __PACKAGE__->add_columns( Link Here
128
    is_nullable => 0,
134
    is_nullable => 0,
129
  },
135
  },
130
  "status",
136
  "status",
131
  { data_type => "varchar", default_value => "N", is_nullable => 0, size => 1 },
137
  { data_type => "varchar", default_value => "NEW", is_nullable => 0, size => 6 },
132
);
138
);
133
139
134
=head1 PRIMARY KEY
140
=head1 PRIMARY KEY
Lines 157-168 __PACKAGE__->belongs_to( Link Here
157
  "borrowernumber",
163
  "borrowernumber",
158
  "Koha::Schema::Result::Borrower",
164
  "Koha::Schema::Result::Borrower",
159
  { borrowernumber => "borrowernumber" },
165
  { borrowernumber => "borrowernumber" },
160
  {
166
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
161
    is_deferrable => 1,
162
    join_type     => "LEFT",
163
    on_delete     => "CASCADE",
164
    on_update     => "CASCADE",
165
  },
166
);
167
);
167
168
168
=head2 branchcode
169
=head2 branchcode
Lines 181-188 __PACKAGE__->belongs_to( Link Here
181
);
182
);
182
183
183
184
184
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-11 08:28:15
185
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-03-18 22:36:43
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qVNVIuurFD6Q6p4YA5Kptg
186
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XQn+sJwh4s+EK9vf2gQ7Qw
186
187
187
188
188
# You can replace this text with custom code or comments, and it will be preserved on regeneration
189
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/admin/problem-reports.pl (-3 / +3 lines)
Lines 48-65 my @report_ids = $query->multi_param('report_ids'); Link Here
48
if ( $action eq 'viewed' ) {
48
if ( $action eq 'viewed' ) {
49
    foreach my $report_id ( @report_ids ) {
49
    foreach my $report_id ( @report_ids ) {
50
        my $report = Koha::ProblemReports->find($report_id);
50
        my $report = Koha::ProblemReports->find($report_id);
51
        $report->set({ status => 'V' })->store;
51
        $report->set({ status => 'Viewed' })->store;
52
                                }
52
                                }
53
} elsif ( $action eq 'closed' ) {
53
} elsif ( $action eq 'closed' ) {
54
    foreach my $report_id ( @report_ids ) {
54
    foreach my $report_id ( @report_ids ) {
55
        my $report = Koha::ProblemReports->find($report_id);
55
        my $report = Koha::ProblemReports->find($report_id);
56
        $report->set({ status => 'C' })->store;
56
        $report->set({ status => 'Closed' })->store;
57
    }
57
    }
58
58
59
} elsif ( $action eq 'new' ) {
59
} elsif ( $action eq 'new' ) {
60
    foreach my $report_id ( @report_ids ) {
60
    foreach my $report_id ( @report_ids ) {
61
        my $report = Koha::ProblemReports->find($report_id);
61
        my $report = Koha::ProblemReports->find($report_id);
62
        $report->set({ status => 'N' })->store;
62
        $report->set({ status => 'New' })->store;
63
    }
63
    }
64
}
64
}
65
65
(-)a/installer/data/mysql/atomicupdate/bug-4461_add-problem-reports-table.perl (-2 / +2 lines)
Lines 6-18 if( CheckVersion( $DBversion ) ) { Link Here
6
            reportid int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
6
            reportid int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
7
            title varchar(40) NOT NULL default '', -- report subject line
7
            title varchar(40) NOT NULL default '', -- report subject line
8
            content varchar(255) NOT NULL default '', -- report message content
8
            content varchar(255) NOT NULL default '', -- report message content
9
            borrowernumber int(11) default NULL, -- the user who created the problem report
9
            borrowernumber int(11) NOT NULL default 0, -- the user who created the problem report
10
            branchcode varchar(10) NOT NULL default '', -- borrower's branch
10
            branchcode varchar(10) NOT NULL default '', -- borrower's branch
11
            username varchar(75) default NULL, -- OPAC username
11
            username varchar(75) default NULL, -- OPAC username
12
            problempage varchar(255) default NULL, -- page the user triggered the problem report form from
12
            problempage varchar(255) default NULL, -- page the user triggered the problem report form from
13
            recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
13
            recipient enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
14
            created_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission
14
            created_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission
15
            status varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed
15
            status varchar(6) NOT NULL default 'New', -- status of the report. New, Viewed, Closed
16
            PRIMARY KEY (reportid),
16
            PRIMARY KEY (reportid),
17
            CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
17
            CONSTRAINT problem_reports_ibfk1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
18
            CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE
18
            CONSTRAINT problem_reports_ibfk2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 4445-4457 CREATE TABLE `problem_reports` ( Link Here
4445
    `reportid` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
4445
    `reportid` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
4446
    `title` varchar(40) NOT NULL default '', -- report subject line
4446
    `title` varchar(40) NOT NULL default '', -- report subject line
4447
    `content` varchar(255) NOT NULL default '', -- report message content
4447
    `content` varchar(255) NOT NULL default '', -- report message content
4448
    `borrowernumber` int(11) default NULL, -- the user who created the problem report
4448
    `borrowernumber` int(11) NOT NULL default 0, -- the user who created the problem report
4449
    `branchcode` varchar(10) NOT NULL default '', -- borrower's branch
4449
    `branchcode` varchar(10) NOT NULL default '', -- borrower's branch
4450
    `username` varchar(75) default NULL, -- OPAC username
4450
    `username` varchar(75) default NULL, -- OPAC username
4451
    `problempage` varchar(255) default NULL, -- page the user triggered the problem report form from
4451
    `problempage` varchar(255) default NULL, -- page the user triggered the problem report form from
4452
    `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
4452
    `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
4453
    `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission
4453
    `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission
4454
    `status` varchar(1) NOT NULL default 'N', -- status of the report. N=new, V=viewed, C=closed
4454
    `status` varchar(6) NOT NULL default 'New', -- status of the report. New, Viewed, Closed
4455
    PRIMARY KEY (`reportid`),
4455
    PRIMARY KEY (`reportid`),
4456
    CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4456
    CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4457
    CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
4457
    CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/problem-reports.tt (-17 / +13 lines)
Lines 64-69 Link Here
64
                                <th class="NoSort">&nbsp;</th>
64
                                <th class="NoSort">&nbsp;</th>
65
                                <th class="anti-the">Message</th>
65
                                <th class="anti-the">Message</th>
66
                                <th>Problem page</th>
66
                                <th>Problem page</th>
67
                                <th>Sent to</th>
67
                                <th class="title-string">Created on</th>
68
                                <th class="title-string">Created on</th>
68
                                <th>Set by</th>
69
                                <th>Set by</th>
69
                                <th>Status</th>
70
                                <th>Status</th>
Lines 79-99 Link Here
79
                                        [% report.content | html %]
80
                                        [% report.content | html %]
80
                                    </td>
81
                                    </td>
81
                                    <td><a href="[% report.problempage | uri %]">[% report.problempage | html %]</a></td>
82
                                    <td><a href="[% report.problempage | uri %]">[% report.problempage | html %]</a></td>
83
                                    <td>[% report.recipient %]</td>
82
                                    <td><span title="[% report.created_on | html %]">[% report.created_on | $KohaDates with_hours => 1 %]</span></td>
84
                                    <td><span title="[% report.created_on | html %]">[% report.created_on | $KohaDates with_hours => 1 %]</span></td>
83
                                    <td>[% INCLUDE 'patron-title.inc' patron => report.patron hide_patron_infos_if_needed=1 %]</td>
85
                                    <td>[% INCLUDE 'patron-title.inc' patron => report.patron hide_patron_infos_if_needed=1 %]</td>
84
                                    <td class="status[% report.status | html %]" name="status">
86
                                    <td class="status[% report.status | html %]" name="status"><span id="status_[% report.reportid | html %]">[% report.status | html %]</span></td>
85
                                        [% IF ( report.status == 'V' ) %]
86
                                            <span id="status_[% report.reportid | html %]">Viewed</span>
87
                                        [% ELSIF ( report.status == 'C' ) %]
88
                                            <span id="status_[% report.reportid | html %]">Closed</span>
89
                                        [% ELSE %]
90
                                            <span id="status_[% report.reportid | html %]">New</span>
91
                                        [% END %]
92
                                    </td>
93
                                    <td class="actions">
87
                                    <td class="actions">
94
                                        [% IF ( report.status == 'N' ) %]
88
                                        [% IF ( report.status == 'New' ) %]
95
                                            <button name="viewed" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" disabled="disabled" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
89
                                            <button name="viewed" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" disabled="disabled" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
96
                                        [% ELSIF ( report.status == 'V' ) %]
90
                                        [% ELSIF ( report.status == 'Viewed' ) %]
97
                                            <button name="viewed" disabled="disabled" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
91
                                            <button name="viewed" disabled="disabled" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
98
                                        [% ELSE %]
92
                                        [% ELSE %]
99
                                            <button name="viewed" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" disabled="disabled" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
93
                                            <button name="viewed" data-report_id="[% report.reportid | html %]" class="viewed btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark viewed</button> <button name="closed" disabled="disabled" data-report_id="[% report.reportid | html %]" class="closed btn btn-default btn-xs"><i class="fa fa-times-circle"></i> Mark closed</button> <button name="new" data-report_id="[% report.reportid | html %]" class="new btn btn-default btn-xs"><i class="fa fa-star"></i> Mark new</button>
Lines 151-166 Link Here
151
                $(".marknew").prop("disabled", true);
145
                $(".marknew").prop("disabled", true);
152
            });
146
            });
153
147
148
149
154
            $(".HideViewed").on("click", function(){
150
            $(".HideViewed").on("click", function(){
155
                $(".statusV").parent().hide();
151
                $(".statusViewed").parent().hide();
156
            });
152
            });
157
153
158
            $(".HideClosed").on("click", function(){
154
            $(".HideClosed").on("click", function(){
159
                $(".statusC").parent().hide();
155
                $(".statusClosed").parent().hide();
160
            });
156
            });
161
157
162
            $(".HideNew").on("click", function(){
158
            $(".HideNew").on("click", function(){
163
                $(".statusN").parent().hide();
159
                $(".statusNew").parent().hide();
164
            });
160
            });
165
161
166
            $(".ShowAll").on("click", function(){
162
            $(".ShowAll").on("click", function(){
Lines 201-219 Link Here
201
                    if (data.status == 'success'){
197
                    if (data.status == 'success'){
202
                        if ( $action == 'viewed' ){
198
                        if ( $action == 'viewed' ){
203
                            $("#status_" + $report_id).text(_("Viewed"));
199
                            $("#status_" + $report_id).text(_("Viewed"));
204
                            $(event.target).parent().siblings("status").removeClass().addClass("statusV");
200
                            $(event.target).parent().siblings("[name='status']").removeClass().addClass("statusViewed");
205
                            $(event.target).siblings(".closed").prop("disabled", false);
201
                            $(event.target).siblings(".closed").prop("disabled", false);
206
                            $(event.target).siblings(".new").prop("disabled", false);
202
                            $(event.target).siblings(".new").prop("disabled", false);
207
                            $(event.target).prop("disabled", true);
203
                            $(event.target).prop("disabled", true);
208
                        } else if ( $action == 'new' ){
204
                        } else if ( $action == 'new' ){
209
                            $("#status_" + $report_id).text(_("New"));
205
                            $("#status_" + $report_id).text(_("New"));
210
                            $(event.target).parent().siblings("status").removeClass().addClass("statusN");
206
                            $(event.target).parent().siblings("[name='status']").removeClass().addClass("statusNew");
211
                            $(event.target).siblings(".closed").prop("disabled", false);
207
                            $(event.target).siblings(".closed").prop("disabled", false);
212
                            $(event.target).siblings(".viewed").prop("disabled", false);
208
                            $(event.target).siblings(".viewed").prop("disabled", false);
213
                            $(event.target).prop("disabled", true);
209
                            $(event.target).prop("disabled", true);
214
                        } else {
210
                        } else {
215
                            $("#status_" + $report_id).text(_("Closed"));
211
                            $("#status_" + $report_id).text(_("Closed"));
216
                            $(event.target).parent().siblings("status").removeClass().addClass("statusC");
212
                            $(event.target).parent().siblings("[name='status']").removeClass().addClass("statusClosed");
217
                            $(event.target).siblings(".viewed").prop("disabled", false);
213
                            $(event.target).siblings(".viewed").prop("disabled", false);
218
                            $(event.target).siblings(".new").prop("disabled", false);
214
                            $(event.target).siblings(".new").prop("disabled", false);
219
                            $(event.target).prop("disabled", true);
215
                            $(event.target).prop("disabled", true);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt (-62 / +56 lines)
Lines 27-97 Link Here
27
                [% END %]
27
                [% END %]
28
                <h1>Report a problem</h1>
28
                <h1>Report a problem</h1>
29
29
30
                [% FOR m IN messages %]
30
                [% IF messages %]
31
                    <div class="alert alert-[% m.type | html %]">
31
                    [% FOR m IN messages %]
32
                        [% SWITCH m.code %]
32
                        <div class="alert alert-[% m.type | html %]">
33
                        [% CASE 'success_on_send' %]
33
                            [% SWITCH m.code %]
34
                            [% IF recipient == 'admin' %]
34
                            [% CASE 'success_on_send' %]
35
                                Your problem report has been sent to the Koha administrator.
35
                                [% IF recipient == 'admin' %]
36
                            [% ELSE %]
36
                                    Your problem report has been sent to the Koha administrator.
37
                                Your problem report has been sent to the library.
37
                                [% ELSE %]
38
                                    Your problem report has been sent to the library.
39
                                [% END %]
40
                            [% CASE 'error_on_send' %][#% We really should avoid reaching this! %]
41
                                Something wrong happened when sending the report. Please contact your library.
38
                            [% END %]
42
                            [% END %]
39
                        [% CASE 'error_on_send' %][#% We really should avoid reaching this! %]
43
                        </div>
40
                            Something wrong happened when sending the report. Please contact your library.
44
                    [% END %]
41
                        [% END %]
45
                [% ELSE %]
42
                    </div>
43
                [% END %]
44
46
45
                [% IF success_on_send %]
47
                    <div id="reportproblem" class="maincontent toptabs">
46
                    <div class="alert alert-info">
48
                        <form name="reportlibform" action="/cgi-bin/koha/opac-reportproblem.pl" method="post">
47
                        [% IF recipient == 'admin' %]
49
                            <input type="hidden" name="op" value="addreport">
48
                            Your problem report has been sent to the Koha administrator.
50
                            <fieldset class="rows">
49
                        [% ELSE %]
51
                                <ol>
50
                            Your problem report has been sent to the library.
52
                                    <li>
51
                        [% END %]
53
                                        <label for="recipient">Send problem report to: </label>
52
                    </div>
54
                                        [% IF library.branchemail %]
53
                [% END %]
55
                                            <select name="recipient" id="recipient">
56
                                                <option value="library">A librarian</option>
57
                                                <option value="admin">Koha administrator</option>
58
                                            </select>
59
                                        [% ELSE %]
60
                                            <span>Koha administrator</span>
61
                                        [% END %]
62
                                    </li>
63
                                    <li>
64
                                        <label for="problempage">Problem found on page: </label>
65
                                        <input type="hidden" name="problempage" id="problempage" value="[% problempage | html %]">
66
                                        [% problempage | html %]
67
                                    </li>
68
                                    <li>
69
                                        <label for="user">Username: </label>
70
                                        <input type="hidden" name="user" id="user" value="[% username | html %]" class="span3">
71
                                        [% username | html %]
72
                                    <li>
73
                                        <label for="subject">Subject: </label>
74
                                        <input type="text" name="subject" id="subject" value="[% subject | html %]" class="span3">
75
                                    </li>
76
                                    <li>
77
                                        <label for="message">Message: </label>
78
                                        <textarea name="message" id="message" rows="7" cols="60"></textarea>
79
                                    </li>
80
                                </ol>
81
                            </fieldset>
82
                            <fieldset class="action">
83
                                <input type="submit" value="Submit" class="btn">
84
                            </fieldset>
85
                        </form>
86
                    </div> <!-- / #reportproblem -->
54
87
55
                <div id="reportproblem" class="maincontent toptabs">
88
                [% END %]
56
                    <form name="reportlibform" action="/cgi-bin/koha/opac-reportproblem.pl" method="post">
57
                        <input type="hidden" name="op" value="addreport">
58
                        <fieldset class="rows">
59
                            <ol>
60
                                <li>
61
                                    <label for="recipient">Send problem report to: </label>
62
                                    [% IF library.branchemail %]
63
                                        <select name="recipient" id="recipient">
64
                                            <option value="library">A librarian</option>
65
                                            <option value="admin">Koha administrator</option>
66
                                        </select>
67
                                    [% ELSE %]
68
                                        <span>Koha administrator</span>
69
                                    [% END %]
70
                                </li>
71
                                <li>
72
                                    <label for="problempage">Problem found on page: </label>
73
                                    <input type="hidden" name="problempage" id="problempage" value="[% problempage | html %]">
74
                                    [% problempage | html %]
75
                                </li>
76
                                <li>
77
                                    <label for="user">Username: </label>
78
                                    <input type="hidden" name="user" id="user" value="[% username | html %]" class="span3">
79
                                    [% username | html %]
80
                                <li>
81
                                    <label for="subject">Subject: </label>
82
                                    <input type="text" name="subject" id="subject" value="[% subject | html %]" class="span3">
83
                                </li>
84
                                <li>
85
                                    <label for="message">Message: </label>
86
                                    <textarea name="message" id="message" rows="7" cols="60"></textarea>
87
                                </li>
88
                            </ol>
89
                        </fieldset>
90
                        <fieldset class="action">
91
                            <input type="submit" value="Submit" class="btn">
92
                        </fieldset>
93
                    </form>
94
                </div> <!-- / #reportproblem -->
95
89
96
                </div> <!-- / .span10/12 -->
90
                </div> <!-- / .span10/12 -->
97
            </div> <!-- / .row-fluid -->
91
            </div> <!-- / .row-fluid -->
(-)a/mainpage.pl (-1 / +1 lines)
Lines 75-81 my $pending_article_requests = Koha::ArticleRequests->search_limited( Link Here
75
        $branch ? ( 'me.branchcode' => $branch ) : (),
75
        $branch ? ( 'me.branchcode' => $branch ) : (),
76
    }
76
    }
77
)->count;
77
)->count;
78
my $pending_problem_reports = Koha::ProblemReports->search({ status => 'N' });
78
my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
79
79
80
$template->param(
80
$template->param(
81
    pendingcomments                => $pendingcomments,
81
    pendingcomments                => $pendingcomments,
(-)a/svc/problem_reports (-7 / +6 lines)
Lines 47-64 if ($is_ajax) { Link Here
47
    my $action = $query->param('action');
47
    my $action = $query->param('action');
48
    my $status = 'success';
48
    my $status = 'success';
49
    if ( $action eq 'viewed' ) {
49
    if ( $action eq 'viewed' ) {
50
        $report->set({ status => 'V' })->store;
50
        $report->set({ status => 'Viewed' })->store;
51
        if ( $report->status ne 'V' ) {
51
        if ( $report->status ne 'Viewed' ) {
52
            $status = 'failure';
52
            $status = 'failure';
53
        }
53
        }
54
    } elsif ( $action eq 'closed' ) {
54
    } elsif ( $action eq 'closed' ) {
55
        $report->set({ status => 'C' })->store;
55
        $report->set({ status => 'Closed' })->store;
56
        if ( $report->status ne 'C' ) {
56
        if ( $report->status ne 'Closed' ) {
57
            $status = 'failure';
57
            $status = 'failure';
58
        }
58
        }
59
    } elsif ( $action eq 'new' ) {
59
    } elsif ( $action eq 'new' ) {
60
        $report->set({ status => 'N' })->store;
60
        $report->set({ status => 'New' })->store;
61
        if ( $report->status ne 'N' ) {
61
        if ( $report->status ne 'New' ) {
62
            $status = 'failure';
62
            $status = 'failure';
63
        }
63
        }
64
    }
64
    }
65
- 

Return to bug 4461