Bugzilla – Attachment 38204 Details for
Bug 10752
Impossible to add 2 identical suggestions, but without any explanation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 10752: Alert the librarian if the suggestion has not been added
Signed-off-Bug-10752-Alert-the-librarian-if-the-su.patch (text/plain), 2.73 KB, created by
Marc Véron
on 2015-04-20 17:25:31 UTC
(
hide
)
Description:
[Signed-off] Bug 10752: Alert the librarian if the suggestion has not been added
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-04-20 17:25:31 UTC
Size:
2.73 KB
patch
obsolete
>From af416d65c3b8a97835243ff266874ac3838cc44a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 16 Apr 2015 16:57:03 +0200 >Subject: [PATCH] [Signed-off] Bug 10752: Alert the librarian if the > suggestion has not been added >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >- Create a new suggestion, chose a short term as your title and copy it. >- Leave all other fields of the suggestion form untouched. >- Save your first suggestion. >- Enter a second suggestion with the same title. > >Before this patch, the suggestion was not inserted without alert. >With this patch, an alert is displayed on the interface. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >NOTE: Love the simplicity and ability to expand. :) > >Tested with all pateches applied. Wors as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 12 ++++++++++++ > suggestion/suggestion.pl | 5 +++++ > 2 files changed, 17 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index aeb8946..6792b04 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -457,6 +457,18 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > > <h1>Suggestions management</h1> > >+ >+[% FOR m IN messages %] >+ <div class="dialog [% m.type %]"> >+ [% SWITCH m.code %] >+ [% CASE 'already_exists' %] >+ The suggestion has not been inserted. The same suggestion already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id %]&op=show'>see the suggestion</a>) >+ [% CASE %] >+ [% m.code %] >+ [% END %] >+ </div> >+[% END %] >+ > [% UNLESS ( notabs ) %] > <div id="suggestiontabs" class="toptabs"> > <ul class="ui-tabs-nav"> >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index b329d27..43834f6 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -134,6 +134,11 @@ if ( $op =~ /save/i ) { > SearchSuggestion( $suggestion_only ); > if (@$suggestions_loop>=1){ > #some suggestion are answering the request Donot Add >+ my @messages; >+ for my $suggestion ( @$suggestions_loop ) { >+ push @messages, { type => 'error', code => 'already_exists', id => $suggestion->{suggestionid} }; >+ } >+ $template->param( messages => \@messages ); > } > else { > ## Adding some informations related to suggestion >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10752
:
37967
|
37991
|
38159
|
38160
|
38204
|
38205
|
38206
|
38213
|
38214
|
38215
|
38216