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

(-)a/C4/Koha.pm (-3 / +2 lines)
Lines 274-285 sub GetItemTypes { Link Here
274
sub GetItemTypesCategorized {
274
sub GetItemTypesCategorized {
275
    my $dbh   = C4::Context->dbh;
275
    my $dbh   = C4::Context->dbh;
276
    my $query = qq|
276
    my $query = qq|
277
        SELECT itemtype, description, imageurl, hideinopac, 0 as 'iscat' FROM itemtypes WHERE ISNULL(searchcategory)
277
        SELECT itemtype, description, imageurl, hideinopac, 0 as 'iscat' FROM itemtypes WHERE ISNULL(searchcategory) or length(searchcategory) = 0
278
        UNION
278
        UNION
279
        SELECT DISTINCT searchcategory AS `itemtype`, authorised_values.lib_opac AS description, authorised_values.imageurl AS imageurl, hideinopac, 1 as 'iscat'
279
        SELECT DISTINCT searchcategory AS `itemtype`, authorised_values.lib_opac AS description, authorised_values.imageurl AS imageurl, hideinopac, 1 as 'iscat'
280
            FROM itemtypes
280
            FROM itemtypes
281
	    LEFT JOIN authorised_values ON searchcategory = authorised_value
281
	    LEFT JOIN authorised_values ON searchcategory = authorised_value WHERE searchcategory > ''
282
            WHERE searchcategory > ''
283
        |;
282
        |;
284
    my $sth = $dbh->prepare($query);
283
    my $sth = $dbh->prepare($query);
285
    $sth->execute;
284
    $sth->execute;
(-)a/admin/authorised_values.pl (-1 / +1 lines)
Lines 247-253 sub default_form { Link Here
247
    }
247
    }
248
248
249
    # push koha system categories
249
    # push koha system categories
250
    foreach (qw(Asort1 Asort2 Bsort1 Bsort2 SUGGEST DAMAGED LOST REPORT_GROUP REPORT_SUBGROUP DEPARTMENT TERM SUGGEST_STATUS)) {
250
    foreach (qw(Asort1 Asort2 Bsort1 Bsort2 SUGGEST DAMAGED LOST REPORT_GROUP REPORT_SUBGROUP DEPARTMENT TERM SUGGEST_STATUS DOCTYPECAT)) {
251
        push @category_list, $_ unless $categories{$_};
251
        push @category_list, $_ unless $categories{$_};
252
    }
252
    }
253
253
(-)a/installer/data/mysql/kohastructure.sql (-11 / +12 lines)
Lines 2-8 Link Here
2
--
2
--
3
-- Host: localhost    Database: koha30test
3
-- Host: localhost    Database: koha30test
4
-- ------------------------------------------------------
4
-- ------------------------------------------------------
5
-- Server version    4.1.22
5
-- Server version	4.1.22
6
6
7
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
7
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
8
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
Lines 2111-2120 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
2111
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2111
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2112
   collectiontitle text default NULL, -- collection name for the suggested item
2112
   collectiontitle text default NULL, -- collection name for the suggested item
2113
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2113
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2114
    quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2114
	quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2115
    currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2115
	currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2116
    price DECIMAL(28,6) default NULL, -- suggested price
2116
	price DECIMAL(28,6) default NULL, -- suggested price
2117
    total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2117
	total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2118
  PRIMARY KEY  (`suggestionid`),
2118
  PRIMARY KEY  (`suggestionid`),
2119
  KEY `suggestedby` (`suggestedby`),
2119
  KEY `suggestedby` (`suggestedby`),
2120
  KEY `managedby` (`managedby`)
2120
  KEY `managedby` (`managedby`)
Lines 2412-2423 CREATE TABLE `permissions` ( Link Here
2412
2412
2413
DROP TABLE IF EXISTS `serialitems`;
2413
DROP TABLE IF EXISTS `serialitems`;
2414
CREATE TABLE `serialitems` (
2414
CREATE TABLE `serialitems` (
2415
    `itemnumber` int(11) NOT NULL,
2415
	`itemnumber` int(11) NOT NULL,
2416
    `serialid` int(11) NOT NULL,
2416
	`serialid` int(11) NOT NULL,
2417
    UNIQUE KEY `serialitemsidx` (`itemnumber`),
2417
	UNIQUE KEY `serialitemsidx` (`itemnumber`),
2418
    KEY `serialitems_sfk_1` (`serialid`),
2418
	KEY `serialitems_sfk_1` (`serialid`),
2419
    CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2419
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2420
    CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2420
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2421
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2421
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2422
2422
2423
--
2423
--
Lines 3286-3288 ALTER TABLE `patron_list_patrons` Link Here
3286
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3286
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3287
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3287
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3288
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3288
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3289
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-2 / +2 lines)
Lines 177-182 Item types administration Link Here
177
                    [% END %]
177
                    [% END %]
178
                [% END %]
178
                [% END %]
179
          </select>
179
          </select>
180
          (Options are defined as the authorized values for the DOCTYPECAT category)
180
      </li>
181
      </li>
181
      [% ELSE %]
182
      [% ELSE %]
182
      <span class="label">Search category</span>
183
      <span class="label">Search category</span>
Lines 252-261 Item types administration Link Here
252
          [% ELSE %]
253
          [% ELSE %]
253
              <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
254
              <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
254
          [% END %]
255
          [% END %]
255
          (if checked, items of this type will be hidden as filters in OPAC's Advanded Search)
256
          (if checked, items of this type will be hidden as filters in OPAC's advanced search)
256
      </li>
257
      </li>
257
      <li>
258
      <li>
258
259
          <label for="notforloan">Not for loan: </label>   [% IF ( notforloan ) %]
259
          <label for="notforloan">Not for loan: </label>   [% IF ( notforloan ) %]
260
                <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
260
                <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
261
            [% ELSE %]
261
            [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (-14 / +7 lines)
Lines 186-205 Link Here
186
    <fieldset>
186
    <fieldset>
187
    <legend>Limit to any of the following:</legend>
187
    <legend>Limit to any of the following:</legend>
188
    <table>
188
    <table>
189
        <tr>[% count = 0 %]
189
        <tr>
190
        [% FOREACH itemtype IN advsearchloo.code_loop %]
190
    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
191
            [% IF ((!itemtype.searchcategory) AND (itemtype.cat == 0)) OR (itemtype.cat == 1) %]
191
            [% IF ((!itemtypeloo.searchcategory) AND (itemtypeloo.cat == 0)) OR (itemtypeloo.cat == 1) %]
192
                [% count = (count + 1) %]
192
                <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="[% IF ( itemtypeloo.cat == 1 ) %]searchcat[% ELSE %]limit[% END %]" value="[% IF ( itemtypeloo.cat == 1 ) %][% itemtypeloo.code %][% ELSE %]mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %][% END %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
193
                <td>
193
                [% itemtypeloo.description %]</label></td>
194
                <input type="checkbox" id="[% itemtype.ccl FILTER remove(',') %]-[% itemtype.number %]" name="[% IF ( itemtype.cat == 1 ) %]searchcat[% ELSE %]limit[% END %]" value="[% IF ( itemtype.cat == 1 ) %][% itemtype.code %][% ELSE %]mc-[% itemtype.ccl %]:[% itemtype.code %][% END %]"/>
195
                <label for="[% itemtype.ccl FILTER remove(',') %]-[% itemtype.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtype.imageurl ) %]<img border="0" src="[% itemtype.imageurl %]" alt="[% itemtype.description %]" />[% END %]&nbsp;[% END %]
196
                [% itemtype.description %]</label>
197
                </td>
198
            [% END %]
194
            [% END %]
199
            [% IF ( loop.last ) %]</tr>
195
        [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
200
            [% ELSE %][% UNLESS ( count % 5 ) %]</tr><tr>[% END %]
196
    [% END %]
201
            [% END %]
202
        [% END %]
203
    </table>
197
    </table>
204
    </fieldset>
198
    </fieldset>
205
    </div>
199
    </div>
206
- 

Return to bug 10937