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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc (-28 / +28 lines)
Lines 1-35 Link Here
1
[% PROCESS 'html_helpers.inc' %]
1
[% PROCESS 'html_helpers.inc' %]
2
<ol>
2
<ol>
3
  <li>
3
    <li>
4
      [% IF field %]
4
        [% IF field %]
5
          <span class="label">Name: </span>
5
            <span class="label">Name: </span>
6
          [% field.name | html %]
6
            [% field.name | html %]
7
          <input type="hidden" name="name" value="[% field.name | html %]">
7
            <input type="hidden" name="name" value="[% field.name | html %]">
8
      [% ELSE %]
8
        [% ELSE %]
9
          <label class="required" for="name">Name: </label>
9
            <label class="required" for="name">Name: </label>
10
          <input type="text" name="name" id="name" class="required" required="required" />
10
            <input type="text" name="name" id="name" class="required" required="required" />
11
          <span class="required">Required</span>
11
            <span class="required">Required</span>
12
      [% END %]
12
        [% END %]
13
  </li>
13
    </li>
14
  <li>
14
    <li>
15
    <label class="required" for="label">Label: </label>
15
        <label class="required" for="label">Label: </label>
16
        <input type="text" name="label" id="label" value="[% field.label | html %]" class="required" required="required" />
16
        <input type="text" name="label" id="label" value="[% field.label | html %]" class="required" required="required" />
17
          <span class="required">Required</span>
17
        <span class="required">Required</span>
18
  </li>
18
    </li>
19
  <li>
19
    <li>
20
    <label class="required" for="tagfield">MARC field: </label>
20
        <label class="required" for="tagfield">MARC field: </label>
21
        <input type="text" id="tagfield" name="tagfield" maxlength="3" size="3" class="required" pattern="[a-zA-Z0-9]+" required="required" value="[% field.tagfield | html %]" />
21
        <input type="text" id="tagfield" name="tagfield" maxlength="3" size="3" class="required" pattern="[a-zA-Z0-9]+" required="required" value="[% field.tagfield | html %]" />
22
        <span class="required">Required</span>
22
        <span class="required">Required</span>
23
  </li>
23
    </li>
24
  <li>
24
    <li>
25
    <label for="tagsubfield">MARC subfield: </label>
25
        <label for="tagsubfield">MARC subfield: </label>
26
        <input type="text" id="tagsubfield" name="tagsubfield" pattern="[a-zA-Z0-9]+" maxlength="1" size="1" value="[% field.tagsubfield | html %]" />
26
        <input type="text" id="tagsubfield" name="tagsubfield" pattern="[a-zA-Z0-9]+" maxlength="1" size="1" value="[% field.tagsubfield | html %]" />
27
  </li>
27
    </li>
28
  <li>
28
    <li>
29
    <label for="authorised_values_category">Authorised values category: </label>
29
        <label for="authorised_values_category">Authorised values category: </label>
30
    <select id="authorised_values_category" name="authorised_values_category">
30
        <select id="authorised_values_category" name="authorised_values_category">
31
      <option value="">- None -</option>
31
            <option value="">- None -</option>
32
      [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => field.authorised_values_category ) %]
32
            [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => field.authorised_values_category ) %]
33
    </select>
33
        </select>
34
  </li>
34
    </li>
35
</ol>
35
</ol>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt (-54 / +55 lines)
Lines 3-77 Link Here
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
  <title>Item search fields &rsaquo; Administration &rsaquo; Koha</title>
6
    <title>Item search fields &rsaquo; Administration &rsaquo; Koha</title>
7
  [% INCLUDE 'doc-head-close.inc' %]
7
    [% INCLUDE 'doc-head-close.inc' %]
8
</head>
8
</head>
9
9
<body id="admin_itemssearchfields" class="admin">
10
<body id="admin_itemssearchfields" class="admin">
10
  [% WRAPPER 'header.inc' %]
11
    [% WRAPPER 'header.inc' %]
11
    [% INCLUDE 'prefs-admin-search.inc' %]
12
        [% INCLUDE 'prefs-admin-search.inc' %]
12
[% END %]
13
    [% END %]
13
14
14
    [% WRAPPER 'sub-header.inc' %]
15
    [% WRAPPER 'sub-header.inc' %]
15
    <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16
        <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16
        <ol>
17
            <ol>
17
            <li>
18
                <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19
            </li>
20
            <li>
21
                <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
22
            </li>
23
24
            [% IF (field) %]
25
                <li>
18
                <li>
26
                    <a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a>
19
                    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
27
                </li>
20
                </li>
28
                <li>
21
                <li>
29
                    <a href="#" aria-current="page">
22
                    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
30
                        [% field.name | html %]
31
                    </a>
32
                </li>
23
                </li>
33
24
34
            [% ELSE %]
25
                [% IF (field) %]
35
                <li>
26
                    <li>
36
                    <a href="#" aria-current="page">
27
                        <a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a>
37
                        Item search fields
28
                    </li>
38
                    </a>
29
                    <li>
39
                </li>
30
                        <a href="#" aria-current="page">
40
            [% END %]
31
                            [% field.name | html %]
41
        </ol>
32
                        </a>
42
    </nav>
33
                    </li>
34
35
                [% ELSE %]
36
                    <li>
37
                        <a href="#" aria-current="page">
38
                            Item search fields
39
                        </a>
40
                    </li>
41
                [% END %]
42
            </ol>
43
        </nav>
43
    [% END %]
44
    [% END %]
44
45
45
<div class="main container-fluid">
46
    <div class="main container-fluid">
46
    <div class="row">
47
        <div class="row">
47
        <div class="col-sm-10 col-sm-push-2">
48
            <div class="col-sm-10 col-sm-push-2">
48
            <main>
49
                <main>
49
50
50
          <h1>Item search field: [% field.label | html %]</h1>
51
                    <h1>Item search field: [% field.label | html %]</h1>
51
52
52
          <form action="/cgi-bin/koha/admin/items_search_field.pl" method="POST" id="edit_search_fields">
53
                    <form action="/cgi-bin/koha/admin/items_search_field.pl" method="POST" id="edit_search_fields">
53
            <fieldset class="rows">
54
                        <fieldset class="rows">
54
              <legend>Edit field</legend>
55
                        <legend>Edit field</legend>
55
              [% INCLUDE 'admin-items-search-field-form.inc' field=field %]
56
                        [% INCLUDE 'admin-items-search-field-form.inc' field=field %]
56
              <div>
57
                        <div>
57
                <input type="hidden" name="op" value="mod" />
58
                            <input type="hidden" name="op" value="mod" />
58
              </div>
59
                        </div>
59
            </fieldset>
60
                        </fieldset>
60
            <fieldset class="action">
61
                        <fieldset class="action">
61
                <input type="submit" class="btn btn-primary" value="Submit" />
62
                            <input type="submit" class="btn btn-primary" value="Submit" />
62
                <a class="cancel" href="/cgi-bin/koha/admin/items_search_fields.pl">Cancel</a>
63
                            <a class="cancel" href="/cgi-bin/koha/admin/items_search_fields.pl">Cancel</a>
63
            </fieldset>
64
                        </fieldset>
64
          </form>
65
                    </form>
65
66
66
            </main>
67
                </main>
67
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
68
            </div> <!-- /.col-sm-10.col-sm-push-2 -->
68
69
69
        <div class="col-sm-2 col-sm-pull-10">
70
            <div class="col-sm-2 col-sm-pull-10">
70
            <aside>
71
                <aside>
71
                [% INCLUDE 'admin-menu.inc' %]
72
                    [% INCLUDE 'admin-menu.inc' %]
72
            </aside>
73
                </aside>
73
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
74
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
74
     </div> <!-- /.row -->
75
        </div> <!-- /.row -->
75
76
76
[% MACRO jsinclude BLOCK %]
77
[% MACRO jsinclude BLOCK %]
77
    [% Asset.js("js/admin-menu.js") | $raw %]
78
    [% Asset.js("js/admin-menu.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt (-116 / +115 lines)
Lines 3-133 Link Here
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
  <title>Item search fields &rsaquo; Administration &rsaquo; Koha</title>
6
    <title>Item search fields &rsaquo; Administration &rsaquo; Koha</title>
7
  [% INCLUDE 'doc-head-close.inc' %]
7
    [% INCLUDE 'doc-head-close.inc' %]
8
</head>
8
</head>
9
9
10
<body id="admin_itemssearchfields" class="admin">
10
<body id="admin_itemssearchfields" class="admin">
11
  [% WRAPPER 'header.inc' %]
11
    [% WRAPPER 'header.inc' %]
12
    [% INCLUDE 'prefs-admin-search.inc' %]
12
        [% INCLUDE 'prefs-admin-search.inc' %]
13
[% END %]
13
    [% END %]
14
14
15
[% WRAPPER 'sub-header.inc' %]
15
    [% WRAPPER 'sub-header.inc' %]
16
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16
        <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17
    <ol>
17
            <ol>
18
        <li>
18
                <li>
19
            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19
                    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20
        </li>
20
                </li>
21
        <li>
21
                <li>
22
            <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
22
                    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
23
        </li>
23
                </li>
24
        <li>
24
                <li>
25
            <a href="#" aria-current="page">
25
                    <a href="#" aria-current="page">
26
                Item search fields
26
                            Item search fields
27
            </a>
27
                    </a>
28
        </li>
28
                </li>
29
    </ol>
29
            </ol>
30
</nav>
30
        </nav>
31
[% END %]
31
    [% END %]
32
32
33
<div class="main container-fluid">
33
    <div class="main container-fluid">
34
    <div class="row">
34
        <div class="row">
35
        <div class="col-sm-10 col-sm-push-2">
35
            <div class="col-sm-10 col-sm-push-2">
36
            <main>
36
                <main>
37
37
38
    <div id="toolbar" class="btn-toolbar">
38
                    <div id="toolbar" class="btn-toolbar">
39
        <a class="btn btn-default" id="new_search_field" href="/cgi-bin/koha/admin/items_search_fields.pl"><i class="fa fa-plus"></i> New search field</a>
39
                        <a class="btn btn-default" id="new_search_field" href="/cgi-bin/koha/admin/items_search_fields.pl"><i class="fa fa-plus"></i> New search field</a>
40
    </div>
40
                    </div>
41
41
42
          [% IF field_added %]
42
                    [% IF field_added %]
43
            <div class="dialog message">
43
                        <div class="dialog message">
44
              Field successfully added: [% field_added.label | html %]
44
                            Field successfully added: [% field_added.label | html %]
45
            </div>
45
                        </div>
46
          [% ELSIF field_not_added %]
46
                    [% ELSIF field_not_added %]
47
            <div class="dialog alert">
47
                        <div class="dialog alert">
48
              <p>Failed to add field. Please make sure the field name doesn't already exist.</p>
48
                            <p>Failed to add field. Please make sure the field name doesn't already exist.</p>
49
              <p>Check logs for more details.</p>
49
                            <p>Check logs for more details.</p>
50
            </div>
50
                        </div>
51
          [% ELSIF field_deleted %]
51
                    [% ELSIF field_deleted %]
52
            <div class="dialog message">
52
                        <div class="dialog message">
53
              Field successfully deleted.
53
                            Field successfully deleted.
54
            </div>
54
                        </div>
55
          [% ELSIF field_not_deleted %]
55
                    [% ELSIF field_not_deleted %]
56
            <div class="dialog alert">
56
                        <div class="dialog alert">
57
              <p>Failed to delete field.</p>
57
                            <p>Failed to delete field.</p>
58
              <p>Check logs for more details.</p>
58
                            <p>Check logs for more details.</p>
59
            </div>
59
                        </div>
60
          [% ELSIF field_updated %]
60
                    [% ELSIF field_updated %]
61
            <div class="dialog message">
61
                        <div class="dialog message">
62
              Field successfully updated: [% field_updated.label | html %]
62
                            Field successfully updated: [% field_updated.label | html %]
63
            </div>
63
                        </div>
64
          [% ELSIF field_not_updated %]
64
                    [% ELSIF field_not_updated %]
65
            <div class="dialog alert">
65
                        <div class="dialog alert">
66
              <p>Failed to update field.</p>
66
                            <p>Failed to update field.</p>
67
              <p>Check logs for more details.</p>
67
                            <p>Check logs for more details.</p>
68
            </div>
68
                        </div>
69
          [% END %]
69
                    [% END %]
70
          [% IF fields.size %]
70
                    [% IF fields.size %]
71
              <div id="search_fields_list">
71
                        <div id="search_fields_list">
72
                  <h1>Item search fields</h1>
72
                            <h1>Item search fields</h1>
73
                    <div class="page-section">
73
                            <div class="page-section">
74
                  <table id="search_fields_table">
74
                                <table id="search_fields_table">
75
                    <thead>
75
                                    <thead>
76
                      <tr>
76
                                        <tr>
77
                        <th>Name</th>
77
                                            <th>Name</th>
78
                        <th>Label</th>
78
                                            <th>Label</th>
79
                        <th>MARC field</th>
79
                                            <th>MARC field</th>
80
                        <th>MARC subfield</th>
80
                                            <th>MARC subfield</th>
81
                        <th>Authorised values category</th>
81
                                            <th>Authorised values category</th>
82
                        <th class="noExport">Actions</th>
82
                                            <th class="noExport">Actions</th>
83
                      </tr>
83
                                        </tr>
84
                    </thead>
84
                                    </thead>
85
                    <tbody>
85
                                    <tbody>
86
                      [% FOREACH field IN fields %]
86
                                        [% FOREACH field IN fields %]
87
                        <tr>
87
                                            <tr>
88
                          <td>[% field.name | html %]</td>
88
                                                <td>[% field.name | html %]</td>
89
                          <td>[% field.label | html %]</td>
89
                                                <td>[% field.label | html %]</td>
90
                          <td>[% field.tagfield | html %]</td>
90
                                                <td>[% field.tagfield | html %]</td>
91
                          <td>[% field.tagsubfield | html %]</td>
91
                                                <td>[% field.tagsubfield | html %]</td>
92
                          <td>[% field.authorised_values_category | html %]</td>
92
                                                <td>[% field.authorised_values_category | html %]</td>
93
                          <td>
93
                                                <td>
94
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_field.pl?name=[% field.name | html %]"><i class="fa fa-pencil"></i> Edit</a>
94
                                                    <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_field.pl?name=[% field.name | html %]"><i class="fa fa-pencil"></i> Edit</a>
95
                            <a class="field-delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_fields.pl?op=del&name=[% field.name | html %]"><i class="fa fa-trash"></i> Delete</a>
95
                                                    <a class="field-delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_fields.pl?op=del&name=[% field.name | html %]"><i class="fa fa-trash"></i> Delete</a>
96
                          </td>
96
                                                </td>
97
                        </tr>
97
                                            </tr>
98
                      [% END %]
98
                                        [% END %]
99
                    </tbody>
99
                                    </tbody>
100
                  </table>
100
                                </table>
101
              </div> <!-- /.page-section -->
101
                            </div> <!-- /.page-section -->
102
            </div> <!-- /#search_fields_list -->
102
                        </div> <!-- /#search_fields_list -->
103
          [% ELSE %]
103
                    [% ELSE %]
104
                <h1>Item search fields</h1>
104
                        <h1>Item search fields</h1>
105
              <div class="dialog message">
105
                        <div class="dialog message">
106
                  There are no item search fields defined.
106
                            There are no item search fields defined.
107
              </div>
107
                        </div>
108
          [% END %]
108
                    [% END %]
109
109
110
          <form id="add_field_form" action="/cgi-bin/koha/admin/items_search_fields.pl" method="POST">
110
                    <form id="add_field_form" action="/cgi-bin/koha/admin/items_search_fields.pl" method="POST">
111
            <fieldset class="rows">
111
                        <fieldset class="rows">
112
                <legend><h1>Add a new field</h1></legend>
112
                            <legend><h1>Add a new field</h1></legend>
113
              [% INCLUDE 'admin-items-search-field-form.inc' field=undef %]
113
                            [% INCLUDE 'admin-items-search-field-form.inc' field=undef %]
114
              <input type="hidden" name="op" value="add" />
114
                            <input type="hidden" name="op" value="add" />
115
            </fieldset>
115
                        </fieldset>
116
            <fieldset class="action">
116
                        <fieldset class="action">
117
              <input type="submit" class="btn btn-primary" value="Submit" />
117
                            <input type="submit" class="btn btn-primary" value="Submit" />
118
              <a href="#" class="cancel hide_form">Cancel</a>
118
                            <a href="#" class="cancel hide_form">Cancel</a>
119
            </fieldset>
119
                        </fieldset>
120
          </form>
120
                    </form>
121
121
122
            </main>
122
                </main>
123
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
123
            </div> <!-- /.col-sm-10.col-sm-push-2 -->
124
124
125
        <div class="col-sm-2 col-sm-pull-10">
125
            <div class="col-sm-2 col-sm-pull-10">
126
            <aside>
126
                <aside>
127
                [% INCLUDE 'admin-menu.inc' %]
127
                    [% INCLUDE 'admin-menu.inc' %]
128
            </aside>
128
                </aside>
129
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
129
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
130
     </div> <!-- /.row -->
130
        </div> <!-- /.row -->
131
131
132
[% MACRO jsinclude BLOCK %]
132
[% MACRO jsinclude BLOCK %]
133
    [% Asset.js("js/admin-menu.js") | $raw %]
133
    [% Asset.js("js/admin-menu.js") | $raw %]
134
- 

Return to bug 32213