Please Ignore this Patch - resubmitting.
On Wed, Sep 23, 2009 at 8:15 AM, Nicole Engard <[email protected]> wrote: > From d56008da78386dc62d457ace14a505aa6ac3dd2a Mon Sep 17 00:00:00 2001 > From: Nicole Engard <[email protected]> > Date: Tue, 22 Sep 2009 02:11:07 -0400 > Subject: [PATCH] UPDATE TO: [PATCH] Bug 3654: Clean up authorized > values page and add defaults for new categories > Content-Type: text/plain; charset="utf-8" > > --- > installer/data/mysql/en/optional/auth_val.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 14 +++----------- > 2 files changed, 4 insertions(+), 12 deletions(-) > > diff --git a/installer/data/mysql/en/optional/auth_val.sql > b/installer/data/mysql/en/optional/auth_val.sql > index 9769acf..6cde1b2 100644 > --- a/installer/data/mysql/en/optional/auth_val.sql > +++ b/installer/data/mysql/en/optional/auth_val.sql > @@ -50,4 +50,4 @@ INSERT INTO `authorised_values` (category, > authorised_value, lib) VALUES ('RESTR > INSERT INTO `authorised_values` (category, authorised_value, lib) > VALUES ('MANUAL_INV','Copier Fees','.25'); > > --custom borrower notes > -INSERT INTO `authorised_values` (category, authorised_value, lib) > VALUES ('BOR_NOTES','ADDR','Address Notes'); > \ No newline at end of file > +INSERT INTO `authorised_values` (category, authorised_value, lib) > VALUES ('BOR_NOTES','VERID','Patron needs to bring in driver\'s > license to verify ID'); > \ No newline at end of file > diff --git a/installer/data/mysql/updatedatabase.pl > b/installer/data/mysql/updatedatabase.pl > index aa83469..41cadca 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -2685,24 +2685,16 @@ if (C4::Context->preference("Version") < > TransformToNum($DBversion)) { > } > eval { $borrnotes_count = $dbh->do("SELECT 1 FROM > authorised_values WHERE category='BOR_NOTES'"); }; > if ($borrnotes_count == 0) { > - $dbh->do("INSERT INTO authorised_values > (category,authorised_value,lib) VALUES ('BOR_NOTES','ADDR','Address > Notes')"); > + $dbh->do("INSERT INTO authorised_values > (category,authorised_value,lib) VALUES ('BOR_NOTES','VERID','Patron > needs to bring in driver\'s license to verify ID')"); > } > - > - print "Upgrade to $DBversion done ( add defaults to authorized > values for MANUAL_INV and BOR_NOTES )\n"; > - SetVersion ($DBversion); > -} > - > -$DBversion = "XXX"; > -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > - > + > $dbh->do("INSERT INTO authorised_values > (category,authorised_value,lib) VALUES ('LOC','CART','Book Cart')"); > $dbh->do("INSERT INTO authorised_values > (category,authorised_value,lib) VALUES ('LOC','PROC','Processing > Center')"); > > - print "Upgrade to $DBversion done ( add new default LOC authorized > values for shelf to cart processing )\n"; > + print "Upgrade to $DBversion done ( add two values to LOC and add > defaults to authorized values for MANUAL_INV and BOR_NOTES )\n"; > SetVersion ($DBversion); > } > > - > =item DropAllForeignKeys($table) > > Drop all foreign keys of the table $table > -- > 1.5.6.5 > > > > On Tue, Sep 22, 2009 at 7:26 PM, Nicole Engard <[email protected]> wrote: >> From a4128e1ad97e748f06f873fc7beba255eeab9f66 Mon Sep 17 00:00:00 2001 >> From: Nicole Engard <[email protected]> >> Date: Tue, 22 Sep 2009 00:31:05 -0400 >> Subject: [PATCH] Bug 3654: Clean up authorized values page and add >> defaults for new categories >> Content-Type: text/plain; charset="utf-8" >> >> --- >> installer/data/mysql/en/optional/auth_val.sql | 8 +++++ >> installer/data/mysql/updatedatabase.pl | 28 >> ++++++++++++++++++++ >> .../intranet-tmpl/prog/en/includes/admin-menu.inc | 2 +- >> .../prog/en/modules/admin/admin-home.tmpl | 4 +- >> .../prog/en/modules/admin/authorised_values.tmpl | 28 >> ++++++++++++++----- >> 5 files changed, 59 insertions(+), 11 deletions(-) >> >> diff --git a/installer/data/mysql/en/optional/auth_val.sql >> b/installer/data/mysql/en/optional/auth_val.sql >> index 11328e1..9769acf 100644 >> --- a/installer/data/mysql/en/optional/auth_val.sql >> +++ b/installer/data/mysql/en/optional/auth_val.sql >> @@ -24,6 +24,8 @@ INSERT INTO `authorised_values` (category, >> authorised_value, lib) VALUES ('LOC', >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('LOC','GEN','General Stacks'); >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('LOC','AV','Audio Visual'); >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('LOC','REF','Reference'); >> +INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('LOC','CART','Book Cart'); >> +INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('LOC','PROC','Processing Center'); >> >> -- collection codes for an item >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('CCODE','FIC','Fiction'); >> @@ -43,3 +45,9 @@ INSERT INTO `authorised_values` (category, >> authorised_value, lib) VALUES ('NOT_L >> -- restricted status of an item, linked to items.restricted >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('RESTRICTED','0',''); >> INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('RESTRICTED','1','Restricted Access'); >> + >> +-- manual invoice types >> +INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('MANUAL_INV','Copier Fees','.25'); >> + >> +--custom borrower notes >> +INSERT INTO `authorised_values` (category, authorised_value, lib) >> VALUES ('BOR_NOTES','ADDR','Address Notes'); >> \ No newline at end of file >> diff --git a/installer/data/mysql/updatedatabase.pl >> b/installer/data/mysql/updatedatabase.pl >> index 10c3451..aa83469 100755 >> --- a/installer/data/mysql/updatedatabase.pl >> +++ b/installer/data/mysql/updatedatabase.pl >> @@ -2675,6 +2675,34 @@ if (C4::Context->preference("Version") < >> TransformToNum($DBversion)) { >> SetVersion ($DBversion); >> } >> >> + >> +$DBversion = "XXX"; >> +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >> + >> + eval { $maninv_count = $dbh->do("SELECT 1 FROM authorised_values >> WHERE category='MANUAL_INV'"); }; >> + if ($maninv_count == 0) { >> + $dbh->do("INSERT INTO authorised_values >> (category,authorised_value,lib) VALUES ('MANUAL_INV','Copier >> Fees','.25')"); >> + } >> + eval { $borrnotes_count = $dbh->do("SELECT 1 FROM >> authorised_values WHERE category='BOR_NOTES'"); }; >> + if ($borrnotes_count == 0) { >> + $dbh->do("INSERT INTO authorised_values >> (category,authorised_value,lib) VALUES ('BOR_NOTES','ADDR','Address >> Notes')"); >> + } >> + >> + print "Upgrade to $DBversion done ( add defaults to authorized >> values for MANUAL_INV and BOR_NOTES )\n"; >> + SetVersion ($DBversion); >> +} >> + >> +$DBversion = "XXX"; >> +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >> + >> + $dbh->do("INSERT INTO authorised_values >> (category,authorised_value,lib) VALUES ('LOC','CART','Book Cart')"); >> + $dbh->do("INSERT INTO authorised_values >> (category,authorised_value,lib) VALUES ('LOC','PROC','Processing >> Center')"); >> + >> + print "Upgrade to $DBversion done ( add new default LOC authorized >> values for shelf to cart processing )\n"; >> + SetVersion ($DBversion); >> +} >> + >> + >> =item DropAllForeignKeys($table) >> >> Drop all foreign keys of the table $table >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >> b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >> index e14f347..d11d800 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >> +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >> @@ -9,6 +9,7 @@ >> <li><a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds and >> budgets</a></li> >> <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and >> exchange rates</a></li> >> <li><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></li> >> + <li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized >> values</a></li> >> </ul> >> >> <h5>Patrons and circulation</h5> >> @@ -24,7 +25,6 @@ >> >> <h5>Catalog</h5> >> <ul> >> - <li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized >> values</a></li> >> <li><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC >> Bibliographic framework</a></li> >> <li><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC >> mapping</a></li> >> <li><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Bibliographic >> framework test</a></li> >> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl >> b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl >> index 11430dc..d336208 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl >> @@ -38,6 +38,8 @@ >> <dd>Define currencies and exchange rates used for acquisitions.</dd> >> <dt><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></dt> >> <dd>Define item types used for circulation rules.</dd> >> + <dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized >> values</a></dt> >> + <dd>Define categories and authorized values for them.</dd> >> </dl> >> >> <h3>Patrons and circulation</h3> >> @@ -62,8 +64,6 @@ >> <div class="yui-u"> >> <h3>Catalog</h3> >> <dl> >> - <dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized >> values</a></dt> >> - <dd>Define categories and authorized values for them.</dd> >> <dt><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC >> Bibliographic framework</a></dt> >> <dd>Create and manage Bibliographic frameworks that define the >> characteristics of your MARC Records (field and subfield definitions) >> as well as templates for the MARC editor.</dd> >> <dt><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC >> mapping</a></dt> >> diff --git >> a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl >> b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl >> index 20b8712..9dd8bfd 100644 >> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl >> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl >> @@ -156,7 +156,7 @@ >> </ul></div> >> >> <h1>Authorized values</h1> >> -<p>This table is used in MARC definition. You can define as many >> categories as you want, and as many authorized values as you want in >> each category.</p> >> +<p>These values can be used in many pull down menus throughout the >> Koha system. You can define as many categories as you want, and as >> many authorized values as you want in each category.</p> >> <p>When you define the MARC subfield structure, you can link a >> subfield to a authorized-value category. When the user ask for adding >> of modifying a biblio, >> the subfield is not entered through a free field, but though a list >> of authorized values</p> >> <!-- TMPL_IF name="duplicate_category" --> >> @@ -168,25 +168,37 @@ the subfield is not entered through a free >> field, but though a list of authorize >> <!-- /TMPL_IF --> >> <form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" >> id="category"><label for="searchfield">Show Category: </label><!-- >> TMPL_VAR name="tab_list" --> <input type="submit" value="Submit" >> /></form> >> <!-- TMPL_IF EXPR="category eq 'Bsort1'" --> >> - <p>Bsort1 is an authorized value attached to patrons, that can be >> used for stats purposes</p> >> + <p>An authorized value attached to patrons, that can be used for >> stats purposes</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'Bsort2'" --> >> - <p>Bsort2 is an authorized value attached to patrons, that can be >> used for stats purposes</p> >> + <p>An authorized value attached to patrons, that can be used for >> stats purposes</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'Asort1'" --> >> - <p>Asort1 is an authorized value attached to acquisitions, that >> can be used for stats purposes</p> >> + <p>An authorized value attached to acquisitions, that can be used >> for stats purposes</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'Asort2'" --> >> - <p>Asort2 is an authorized value attached to acquisitions, that >> can be used for stats purposes</p> >> + <p>An authorized value attached to acquisitions, that can be used >> for stats purposes</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'SUGGEST'" --> >> - <p>The list of patron suggestion reject or accept reasons</p> >> + <p>Reasons to reject or accept patron suggestions</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'DAMAGED'" --> >> - <p>The list of status to describe a damaged item</p> >> + <p>Statuses to describe a damaged item</p> >> <!-- /TMPL_IF --> >> <!-- TMPL_IF EXPR="category eq 'LOST'" --> >> - <p>The list of status to describe a lost item</p> >> + <p>Statuses to describe a lost item</p> >> +<!-- /TMPL_IF --> >> +<!-- TMPL_IF EXPR="category eq 'MANUAL_INV'" --> >> + <p>Additional values for manual invoice types</p> >> +<!-- /TMPL_IF --> >> +<!-- TMPL_IF EXPR="category eq 'BOR_NOTES'" --> >> + <p>Values for custom patron notes</p> >> +<!-- /TMPL_IF --> >> +<!-- TMPL_IF EXPR="category eq 'LOC'" --> >> + <p>Values for shelving locations</p> >> +<!-- /TMPL_IF --> >> +<!-- TMPL_IF EXPR="category eq 'CCODE'" --> >> + <p>Values for collection codes</p> >> <!-- /TMPL_IF --> >> <table> >> <tr> >> -- >> 1.5.6.5 >> > _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
