Bugzilla – Attachment 15381 Details for
Bug 9628
Replace YUI buttons and menus on budgets administration pages with Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9628 - Replace YUI buttons and menus on budgets administration pages with Bootstrap
Bug-9628---Replace-YUI-buttons-and-menus-on-budget.patch (text/plain), 9.36 KB, created by
Owen Leonard
on 2013-02-15 17:05:29 UTC
(
hide
)
Description:
Bug 9628 - Replace YUI buttons and menus on budgets administration pages with Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-02-15 17:05:29 UTC
Size:
9.36 KB
patch
obsolete
>From 1ae24fe840816f9bcd25ab41cf245e1512429b9a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 1 Feb 2013 15:31:27 -0500 >Subject: [PATCH] Bug 9628 - Replace YUI buttons and menus on budgets > administration pages with Bootstrap >Content-Type: text/plain; charset="utf-8" > >This patch converts the toolbar include file used by budgets >administration pages to Bootstrap, replacing YUI button and menu code >with Bootstrap markup. > >To test, create, view, and edit budgets. Buttons and menus should look >correct and work correctly. Functions include: > >- New budget >- New fund >- Edit budget >- Duplicate budget >- Plan by (months, libraries, etc) >--- > .../prog/en/includes/budgets-admin-toolbar.inc | 171 +++++++------------- > 1 file changed, 61 insertions(+), 110 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc >index ca517f9..d36c2ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc >@@ -1,110 +1,61 @@ >-<div id="toolbar"><script type="text/javascript"> >- //<![CDATA[ >- >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- $("#periods_menuc").empty(); >- $("#budgets_menuc").empty(); >- $("#newrootbudgetc").empty(); >- >-// IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* >-[% UNLESS ( period_button_only ) %] >- $("#planning_menuc").empty(); >-[% END %] >- >- yuiToolbar(); >- }); >- >- // YUI Toolbar Functions >- >- function yuiToolbar() { >-[% IF ( budget_period_id ) %] >- var budgets_menu = [ >- { text: _("New budget"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form" }, >- { text: _("New fund for") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% budget_period_id %]" >- [% IF ( budget_period_locked ) %], disabled:true[% END %] >- [% UNLESS ( CAN_user_acquisition_budget_add_del ) %], disabled:true [% END %] >- } >- ] >- [% ELSE %] >- var newrootbudgetButton = new YAHOO.widget.Button("newrootbudget"); >- [% END %] >- >- [% IF ( budget_period_id ) %] >- var periods_menu = [ >- { text: _("Edit budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=[% budget_period_id %]" }, >- { text: _("Duplicate budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=duplicate_form&budget_period_id=[% budget_period_id %]" }, >- ] >- [% END %] >- >-// IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* >-[% IF ( budget_period_id ) %] >- >- var planning_menu = [ >- >- { text: _("Plan by months"), >- url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=MONTHS" >- [% UNLESS ( CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %] >- }, >- >- { text: _("Plan by libraries"), >- url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=BRANCHES" >- [% UNLESS ( CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %] >- }, >- >- { text: _("Plan by item types"), >- url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=ITEMTYPES" >- [% UNLESS ( CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %] >- }, >- [% FOREACH auth_cats_loo IN auth_cats_loop %] >- { text: _("Plan by [% auth_cats_loo.authcat %] "), >- url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=[% auth_cats_loo.authcat %]" >- [% UNLESS ( CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %] >- }, >- [% END %] >- ] >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Edit"), >- name: "periods_button", >- menu: periods_menu, >- container: "periods_menuc" >- }); >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("New"), >- name: "budgets_button", >- menu: budgets_menu, >- container: "budgets_menuc" >- }); >- >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("Planning"), >- name: "planning_button", >- menu: planning_menu, >- container: "planning_menuc" >- }); >- >-[% END %] >- >-// IF THERE IS NO BUDGETS DEFINED YET, THEN DISPLAY PERIOD BUTTON *ONLY* >-[% UNLESS ( period_button_only ) %] >- >- >-[% END %] >- >- } //yui-toolbar... >- >- //]]> >-</script> >- <ul class="toolbar"> >- [% UNLESS ( budget_period_id ) %]<li><a id="newrootbudget" href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form">New budget</a></li>[% END %] >- [% UNLESS ( period_button_only ) %]<li id="budgets_menuc"><a id="budgets_menu" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New</a></li>[% END %] >- <li id="periods_menuc"><a id="periods_menu" href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form">Budgets</a></li> >- [% UNLESS ( period_button_only ) %]<li id="planning_menuc"><a id="planning_menu" href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]">Budget planning</a></li> >- [% END %] >- </ul> >-</div> >+<div id="toolbar" class="btn-toolbar"> >+ [% IF ( budget_period_id ) %] >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form">New budget</a></li> >+ [% IF ( budget_period_locked || !CAN_user_acquisition_budget_add_del ) %] >+ <li class="disabled"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% budget_period_id %]">New fund for [% budget_period_description %]</a></li> >+ </ul> >+ </div> >+ >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=[% budget_period_id %]">Edit budget [% budget_period_description %]</a></li> >+ <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=duplicate_form&budget_period_id=[% budget_period_id %]">Duplicate budget [% budget_period_description %]</a></li> >+ </ul> >+ </div> >+ >+ <div class="btn-group"> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Planning <span class="caret"></span></button> >+ <ul class="dropdown-menu"> >+ [% IF ( CAN_user_acquisition_planning_manage ) %] >+ <li> >+ [% ELSE %] >+ <li class="disabled"> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=MONTHS">Plan by months</a></li> >+ [% IF ( CAN_user_acquisition_planning_manage ) %] >+ <li> >+ [% ELSE %] >+ <li class="disabled"> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=BRANCHES">Plan by libraries</a></li> >+ [% IF ( CAN_user_acquisition_planning_manage ) %] >+ <li> >+ [% ELSE %] >+ <li class="disabled"> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=ITEMTYPES">Plan by item types</a></li> >+ [% FOREACH auth_cats_loo IN auth_cats_loop %] >+ [% IF ( CAN_user_acquisition_planning_manage ) %] >+ <li> >+ [% ELSE %] >+ <li class="disabled"> >+ [% END %] >+ <a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&authcat=[% auth_cats_loo.authcat %]">Plan by [% auth_cats_loo.authcat %]</a> >+ </li> >+ [% END %] >+ </ul> >+ </div> >+ >+ [% ELSE %] >+ <div class="btn-group"><a class="btn btn-small" id="newrootbudget" href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form"><i class="icon-plus"></i> New budget</a></div> >+ [% END %] >+ >+</div> >\ No newline at end of file >-- >1.7.9.5
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 9628
:
15381
|
15392
|
15442