Bugzilla – Attachment 9417 Details for
Bug 7980
Group search results tag input with other actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7980: [SIGNED-OFF] Group search results tag input with other actions
0001-Bug-7980-SIGNED-OFF-Group-search-results-tag-input-w.patch (text/plain), 10.75 KB, created by
Jonathan Druart
on 2012-05-04 13:36:30 UTC
(
hide
)
Description:
Bug 7980: [SIGNED-OFF] Group search results tag input with other actions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-05-04 13:36:30 UTC
Size:
10.75 KB
patch
obsolete
>From 4e25ef2218fb69cd5064fafe0da21b285fdf9887 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 18 Apr 2012 11:32:48 -0400 >Subject: [PATCH 1/1] Bug 7980: [SIGNED-OFF] Group search results tag input > with other actions > >This patch hides the tag input form in OPAC search results when >TagsInputOnList is turned on. An "Add tag" is added to the >"Actions" line. Clicking the link un-hides the tag input form. >A "Cancel" link hides it again. > >The patch also moves the display of ratings to the bottom of >the list so that existing tags are grouped with the other >title details which are prefixed with a label ("Type:", >"Availability", etc.). > >To test, enable the TagsInputOnList system preference. Do a search >and try adding tags from the search results list. > >signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/opac-tmpl/prog/en/css/opac.css | 32 +++++++- > .../opac-tmpl/prog/en/modules/opac-results.tt | 75 ++++++++++++------- > .../opac-tmpl/prog/images/tag-small-disabled.png | Bin 0 -> 317 bytes > koha-tmpl/opac-tmpl/prog/images/tag-small.png | Bin 0 -> 347 bytes > 4 files changed, 75 insertions(+), 32 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/prog/images/tag-small-disabled.png > create mode 100644 koha-tmpl/opac-tmpl/prog/images/tag-small.png > >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >index c10e08d..44b8a08 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >@@ -689,6 +689,30 @@ input.deleteshelf:active { > > #tagslist li { display : inline; } > >+a.tag_results_add { >+ background-image: url(../../images/tag-small.png); >+ background-position : -1px center; >+ background-repeat : no-repeat; >+ padding-left : 13px; >+ text-decoration: none; >+} >+ >+#login4tags { >+ background-image: url(../../images/tag-small-disabled.png); >+ background-position : -1px center; >+ background-repeat : no-repeat; >+ padding-left : 13px; >+ text-decoration: none; >+ margin-left: 1em; >+} >+ >+.tag_results_input { >+ background-color: #EEE; >+ display: none; >+ margin-left: 1em; >+ padding: 0.3em; >+} >+ > #placehold input.submit:hover, > #tagsel_span input.submit:hover { > color: #990033; >@@ -1372,6 +1396,10 @@ padding-left : .4em; > font-size : 100%; > } > >+.results_summary.actions { >+ margin-top : .5em; >+} >+ > .m880 { > display:block; > text-align:right; >@@ -1385,10 +1413,6 @@ padding-left : .4em; > color: #707070; > } > >-#login4tags { >- margin-top : .3em; >-} >- > .results_summary .label { > color: #202020; > } >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index 49303a6..576d9f8 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -223,6 +223,24 @@ $(document).ready(function(){ > tagAdded(); > return false; > }); >+ >+ $(".tag_results_add").click(function(){ >+ var thisid = $(this).attr("id"); >+ thisid = thisid.replace("tag_add",""); >+ $(this).hide(); >+ $("#tagform"+thisid).show(); >+ $("#newtag"+thisid).focus(); >+ return false; >+ }) >+ >+ $(".cancel_tag_add").click(function(){ >+ var thisid = $(this).attr("id"); >+ thisid = thisid.replace("cancel",""); >+ $(this).parent().hide(); >+ $("#tag_add"+thisid).show(); >+ return false; >+ }) >+ > [% ELSE %] > $("#tagsel_tag").click(function(){ > window.location = "/cgi-bin/koha/opac-user.pl"; >@@ -503,6 +521,23 @@ $(document).ready(function(){ > </span> > [% END %] > >+ [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %] >+ [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] >+ [% IF ( TagsShowOnList ) %] >+ [% IF ( SEARCH_RESULT.TagLoop.size ) %] >+ <div class="results_summary"><span class="label">Tags:</span> >+ <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li> >+ [% END %] >+ </ul> >+ [% END %] >+ [% IF ( SEARCH_RESULT.TagLoop.size ) %] >+ </div>[% END %] >+ [% END %] >+ [% END %][% END %] >+ [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<span class="results_summary"><span class="label">Match:</span> [% SEARCH_RESULT.searchhighlightblob %]</span>[% END %] >+ >+ >+ > > [% IF ( OpacStarRatings == 'all' ) %] > <div class="results_summary"> >@@ -528,35 +563,8 @@ $(document).ready(function(){ > </div> > [% END %] > >- >- [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %] >- [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] >- [% IF ( TagsShowOnList ) %] >- [% IF ( SEARCH_RESULT.TagLoop.size ) %] >- <div class="results_summary"><span class="label">Tags:</span> >- <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li> >- [% END %] >- </ul> >- [% END %] >- [% IF ( TagsInputOnList ) %] >- [% IF ( loggedinusername ) %] >- <span class="label">New tag:</span> >- <input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" /> >- <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" /> >- <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;"> >- Tag status here. >- </span> >- [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span> >- [% END %] >- [% END %] >- [% IF ( SEARCH_RESULT.TagLoop.size ) %] >- </div>[% END %] >- [% END %] >- [% END %][% END %] >- [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<span class="results_summary"><span class="label">Match:</span> [% SEARCH_RESULT.searchhighlightblob %]</span>[% END %] >- > <span class="results_summary actions"><span class="label">Actions:</span> >- [% IF ( RequestOnOpac ) %] >+ [% IF ( RequestOnOpac ) %] > [% UNLESS ( SEARCH_RESULT.norequests ) %] > [% IF ( opacuserlogin ) %] > [% IF ( AllowOnShelfHolds ) %] >@@ -570,6 +578,17 @@ $(document).ready(function(){ > [% END %] > [% END %] > >+ [% IF ( TagsInputOnList ) %] >+ [% IF ( loggedinusername ) %] >+ <a class="tag_results_add" id="tag_add[% SEARCH_RESULT.biblionumber %]" href="#">Add tag</a> >+ <span id="tagform[% SEARCH_RESULT.biblionumber %]" class="tag_results_input"><label for="newtag[% SEARCH_RESULT.biblionumber %]">New tag(s):</label><input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" /> >+ <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" /> <a class="cancel_tag_add" id="cancel[% SEARCH_RESULT.biblionumber %]" href="#">Cancel</a> >+ <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;"> >+ Tag status here. >+ </span></span> >+ [% ELSIF ( loop.first ) %]<span id="login4tags">Log in to add tags.</span> >+ [% END %] >+ [% END %] > > [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]'); return false;">Save to Lists</a> > [% END %][% END %][% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/images/tag-small-disabled.png b/koha-tmpl/opac-tmpl/prog/images/tag-small-disabled.png >new file mode 100644 >index 0000000000000000000000000000000000000000..4976cb023a97e18b400777336cff68ca7c955f7a >GIT binary patch >literal 317 >zcmeAS@N?(olHy`uVBq!ia0vp^+(695!3-or^+GlRDVB6cUq=Rp^(V|(yIunMk|nMY >zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5XYyx~jTq`RpzkmP!=g*&S-@et? >z*EcseH#IeV{ra`Dv$Lh8rMkNM_wV0-|NgD2s`~fuUq?qrPft%xP0g=gzyAOKzi~$8 >zTA(>1B|(0{KrT99@b`Z%2$WCvba4!+xRoRzCYC19#?ZjPba77rp96y-2RB#IN6x03 >z42&!yNe>@BPG;Q5$i$&?_So4YN4S;%nQNv5dw6i1VB}EfFsn;TbE`{iU}%y$c>df8 >rMIHeMgUzfgEG<A~$JiJf7?>I61hc)l?8A8*XeEQEtDnm{r-UW|oH~M7 > >literal 0 >HcmV?d00001 > >diff --git a/koha-tmpl/opac-tmpl/prog/images/tag-small.png b/koha-tmpl/opac-tmpl/prog/images/tag-small.png >new file mode 100644 >index 0000000000000000000000000000000000000000..7e8b39e51d138604f299d044fdb0ce91b470cdf9 >GIT binary patch >literal 347 >zcmeAS@N?(olHy`uVBq!ia0vp^+(695!3-or^+GlRDVB6cUq=Rp^(V|(yIunMk|nMY >zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X0t0+PTowH5-hKP`;?rNfgh`Ly >z|1n6K`r`9n&8Qy3<f*D5E%LrK|NsBjjOu>>?VnO$gKliUUczLR;1>1p4)ySMo!I_I >zAO0F7PyPM(zfxf1*I)mDiocn*e*hXTT@vIM4CLYf4C*G_ra)zxo-U3d6}OTmOq%p) >zQWHZ1LlQ$G8;7()gT#^_Dk?iv59Bm3FmV-jb$4?&-C$s3nItx8$`lc{OF(AWsdJ}K >zoKRL}6>t#9{gdP4qZ9-bHEoKV;_ASq(6As!(=d!rvw@*$qa%aD0R~$s&hjJdZAXEY >OGI+ZBxvX<aXaWG?l8yxc > >literal 0 >HcmV?d00001 > >-- >1.7.7.3 >
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 7980
:
9247
|
9248
|
9417
|
9779