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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt (-183 / +188 lines)
Lines 3-90 Link Here
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
[% SET panel_id = 0 %]
4
[% SET panel_id = 0 %]
5
[% BLOCK pagelist %]
5
[% BLOCK pagelist %]
6
<div class="pagelist">
6
    <div class="pagelist">
7
  <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
7
        <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
8
    <input type="hidden" name="action" value="save" />
8
            <input type="hidden" name="action" value="save" />
9
    <input type="hidden" name="module" value="[% modulename | html %]" />
9
            <input type="hidden" name="module" value="[% modulename | html %]" />
10
    <input type="hidden" name="panel" value="[% panel_id | html %]" />
10
            <input type="hidden" name="panel" value="[% panel_id | html %]" />
11
    [% SET panel_id = panel_id + 1 %]
11
            [% SET panel_id = panel_id + 1 %]
12
    [% IF module.keys and module.keys.size > 0 %]
12
            [% IF module.keys and module.keys.size > 0 %]
13
      [% FOR pagename IN module.keys %]
13
                [% FOR pagename IN module.keys %]
14
        <h5>[% pagename | html %]</h5>
14
                    <h5>[% pagename | html %]</h5>
15
        [% SET tables = module %]
15
                    [% SET tables = module %]
16
        [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %]
16
                    [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %]
17
          [% FOR tablename IN tables.$pagename.keys.sort %]
17
                        [% FOR tablename IN tables.$pagename.keys.sort %]
18
            [% IF pagename == 'additem' AND tablename == 'itemst' %]
18
                            [% IF pagename == 'additem' AND tablename == 'itemst' %]
19
              <div class="alert">Changes made below will only apply to item subfields that are mapped to the 'items' table. <a href="/cgi-bin/koha/admin/koha2marclinks.pl?tablename=items">Go to Koha to MARC mapping</a></div>
19
                                <div class="alert">Changes made below will only apply to item subfields that are mapped to the 'items' table. <a href="/cgi-bin/koha/admin/koha2marclinks.pl?tablename=items">Go to Koha to MARC mapping</a></div>
20
            [% END %]
20
                            [% END %]
21
            <table>
21
                            <table>
22
              <caption>
22
                                <caption>
23
                [% IF tablename == 'currencies-table' %]
23
                                    [% IF tablename == 'currencies-table' %]
24
                  Currency
24
                                        Currency
25
                [% ELSIF pagename == 'additem' AND tablename == 'itemst' %]
25
                                    [% ELSIF pagename == 'additem' AND tablename == 'itemst' %]
26
                  Items Editor
26
                                        Items Editor
27
                [% END %]
27
                                    [% END %]
28
                (id=[% tablename | html %])
28
                                    (id=[% tablename | html %])
29
              </caption>
29
                                </caption>
30
              <thead><tr><th>Column name</th><th>Is hidden by default</th><th>Cannot be toggled</th></tr></thead>
30
                                <thead>
31
              <tbody>
31
                                    <tr>
32
              [% FOR column IN tables.$pagename.$tablename %]
32
                                        <th>Column name</th>
33
                [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %]
33
                                        <th>Is hidden by default</th>
34
                <tr>
34
                                        <th>Cannot be toggled</th>
35
                  <td>
35
                                    </tr>
36
                    [% column.columnname | html %]
36
                                </thead>
37
                    <input type="hidden" name="columnid" value="[% value | html %]" />
37
                                <tbody>
38
                  </td>
38
                                    [% FOR column IN tables.$pagename.$tablename %]
39
                  <td>
39
                                        [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %]
40
                    [% IF column.is_hidden %]
40
                                        <tr>
41
                      [% IF column.cannot_be_modified %]
41
                                            <td>
42
                        <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" disabled="disabled" />
42
                                                [% column.columnname | html %]
43
                        <input type="hidden" name="[% value | html %]_hidden" value="1" />
43
                                                <input type="hidden" name="columnid" value="[% value | html %]" />
44
                      [% ELSE %]
44
                                            </td>
45
                        <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" />
45
                                            <td>
46
                      [% END %]
46
                                                [% IF column.is_hidden %]
47
                    [% ELSE %]
47
                                                    [% IF column.cannot_be_modified %]
48
                      [% IF column.cannot_be_modified %]
48
                                                        <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" disabled="disabled" />
49
                        <input type="checkbox" name="[% value | html %]_hidden" value="1" disabled="disabled" />
49
                                                        <input type="hidden" name="[% value | html %]_hidden" value="1" />
50
                        <input type="hidden" name="[% value | html %]_hidden" value="0" />
50
                                                    [% ELSE %]
51
                      [% ELSE %]
51
                                                        <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" />
52
                        <input type="checkbox" name="[% value | html %]_hidden" value="1" />
52
                                                    [% END %]
53
                      [% END %]
53
                                                [% ELSE %]
54
                    [% END %]
54
                                                    [% IF column.cannot_be_modified %]
55
                  </td>
55
                                                        <input type="checkbox" name="[% value | html %]_hidden" value="1" disabled="disabled" />
56
                  <td>
56
                                                        <input type="hidden" name="[% value | html %]_hidden" value="0" />
57
                    [% IF column.cannot_be_toggled %]
57
                                                    [% ELSE %]
58
                      [% IF column.cannot_be_modified %]
58
                                                        <input type="checkbox" name="[% value | html %]_hidden" value="1" />
59
                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" disabled="disabled" />
59
                                                    [% END %]
60
                        <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="1" />
60
                                                [% END %]
61
                      [% ELSE %]
61
                                            </td>
62
                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" />
62
                                            <td>
63
                      [% END %]
63
                                                [% IF column.cannot_be_toggled %]
64
                                                    [% IF column.cannot_be_modified %]
65
                                                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" disabled="disabled" />
66
                                                        <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="1" />
67
                                                    [% ELSE %]
68
                                                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" />
69
                                                    [% END %]
70
                                                [% ELSE %]
71
                                                    [% IF column.cannot_be_modified %]
72
                                                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" disabled="disabled" />
73
                                                        <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="0" />
74
                                                    [% ELSE %]
75
                                                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" />
76
                                                    [% END %]
77
                                                [% END %]
78
                                            </td>
79
                                        </tr>
80
                                    [% END %]
81
                                </tbody>
82
                            </table>
83
                        [% END %]
84
                        <input type="submit" value="Save" />
64
                    [% ELSE %]
85
                    [% ELSE %]
65
                      [% IF column.cannot_be_modified %]
86
                        There is no table to configure for this module.
66
                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" disabled="disabled" />
67
                        <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="0" />
68
                      [% ELSE %]
69
                        <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" />
70
                      [% END %]
71
                    [% END %]
87
                    [% END %]
72
                  </td>
88
                [% END %]
73
                </tr>
89
            [% ELSE %]
74
              [% END %]
90
                There is no page using the table configuration in this module.
75
              </tbody>
91
            [% END %]
76
            </table>
92
        </form>
77
          [% END %]
93
    </div>
78
          <input type="submit" value="Save" />
79
        [% ELSE %]
80
          There is no table to configure for this module.
81
        [% END %]
82
      [% END %]
83
    [% ELSE %]
84
        There is no page using the table configuration in this module.
85
    [% END %]
86
  </form>
87
</div>
88
[% END %]
94
[% END %]
89
95
90
[% INCLUDE 'doc-head-open.inc' %]
96
[% INCLUDE 'doc-head-open.inc' %]
Lines 93-206 Link Here
93
</head>
99
</head>
94
100
95
<body id="admin_tables" class="admin">
101
<body id="admin_tables" class="admin">
96
[% INCLUDE 'header.inc' %]
102
    [% INCLUDE 'header.inc' %]
97
[% INCLUDE 'prefs-admin-search.inc' %]
103
    [% INCLUDE 'prefs-admin-search.inc' %]
98
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Columns settings</div>
104
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Columns settings</div>
99
105
100
<div class="main container-fluid">
106
    <div class="main container-fluid">
101
    <div class="row">
107
        <div class="row">
102
        <div class="col-sm-10 col-sm-push-2">
108
                <div class="col-sm-10 col-sm-push-2">
103
            <main>
109
                        <main>
104
110
105
        <h2>Columns settings</h2>
111
                            <h2>Columns settings</h2>
106
        <div id="modules">
112
                            <div id="modules">
107
          <h3><a href="#acqui">Acquisition</a></h3>
113
                                <h3><a href="#acqui">Acquisition</a></h3>
108
          <div id="acqui">
114
                                <div id="acqui">
109
            <h4>Acquisition tables</h4>
115
                                    <h4>Acquisition tables</h4>
110
            [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
116
                                    [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
111
          </div>
117
                                </div>
112
118
113
          <h3><a href="#admin">Administration</a></h3>
119
                                <h3><a href="#admin">Administration</a></h3>
114
          <div id="admin">
120
                                <div id="admin">
115
            <h4>Administration tables</h4>
121
                                    <h4>Administration tables</h4>
116
            [% PROCESS pagelist module=modules.admin modulename="admin" %]
122
                                    [% PROCESS pagelist module=modules.admin modulename="admin" %]
117
          </div>
123
                                </div>
118
124
119
          <h3><a href="#authorities">Authorities</a></h3>
125
                                <h3><a href="#authorities">Authorities</a></h3>
120
          <div id="authorities">
126
                                <div id="authorities">
121
            <h4>Authorities tables</h4>
127
                                    <h4>Authorities tables</h4>
122
            [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
128
                                    [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
123
          </div>
129
                                </div>
124
130
125
          <h3><a href="#catalog">Catalog</a></h3>
131
                                <h3><a href="#catalog">Catalog</a></h3>
126
          <div id="catalogue">
132
                                <div id="catalogue">
127
            <h4>Catalogue tables</h4>
133
                                    <h4>Catalogue tables</h4>
128
            [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
134
                                    [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
129
          </div>
135
                                </div>
130
136
131
          <h3><a href="#cataloguing">Cataloging</a></h3>
137
                                <h3><a href="#cataloguing">Cataloging</a></h3>
132
          <div id="cataloguing">
138
                                <div id="cataloguing">
133
            <h4>Cataloguing tables</h4>
139
                                    <h4>Cataloguing tables</h4>
134
            [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
140
                                    [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
135
          </div>
141
                                </div>
136
142
137
          <h3><a href="#circulation">Circulation</a></h3>
143
                                <h3><a href="#circulation">Circulation</a></h3>
138
          <div id="circulation">
144
                                <div id="circulation">
139
            <h4>Circulation tables</h4>
145
                                    <h4>Circulation tables</h4>
140
            [% PROCESS pagelist module=modules.circ modulename="circ" %]
146
                                    [% PROCESS pagelist module=modules.circ modulename="circ" %]
141
          </div>
147
                                </div>
142
148
143
          <h3><a href="#coursereserves">Course reserves</a></h3>
149
                                <h3><a href="#coursereserves">Course reserves</a></h3>
144
          <div id="coursereserves">
150
                                <div id="coursereserves">
145
            <h4>Course reserves tables</h4>
151
                                    <h4>Course reserves tables</h4>
146
            [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
152
                                    [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
147
          </div>
153
                                </div>
148
154
149
          <h3><a href="#members">Patrons</a></h3>
155
                                <h3><a href="#members">Patrons</a></h3>
150
          <div id="members">
156
                                <div id="members">
151
            <h4>Patrons tables</h4>
157
                                    <h4>Patrons tables</h4>
152
            [% PROCESS pagelist module=modules.members modulename="members" %]
158
                                    [% PROCESS pagelist module=modules.members modulename="members" %]
153
          </div>
159
                                </div>
154
160
155
            <h3><a href="#tools">Tools</a></h3>
161
                                    <h3><a href="#tools">Tools</a></h3>
156
            <div id="tools">
162
                                    <div id="tools">
157
                <h4>Tools tables</h4>
163
                                            <h4>Tools tables</h4>
158
                [% PROCESS pagelist module=modules.tools modulename="tools" %]
164
                                            [% PROCESS pagelist module=modules.tools modulename="tools" %]
159
            </div>
165
                                    </div>
160
166
161
          <h3><a href="#opac">OPAC</a></h3>
167
                                <h3><a href="#opac">OPAC</a></h3>
162
          <div id="opac">
168
                                <div id="opac">
163
            <h4>OPAC tables</h4>
169
                                    <h4>OPAC tables</h4>
164
            [% PROCESS pagelist module=modules.opac modulename="opac" %]
170
                                    [% PROCESS pagelist module=modules.opac modulename="opac" %]
165
          </div>
171
                                </div>
166
172
167
          <h3><a href="#reports">Reports</a></h3>
173
                                <h3><a href="#reports">Reports</a></h3>
168
          <div id="reports">
174
                                <div id="reports">
169
            <h4>Reports tables</h4>
175
                                    <h4>Reports tables</h4>
170
            [% PROCESS pagelist module=modules.reports modulename="reports" %]
176
                                    [% PROCESS pagelist module=modules.reports modulename="reports" %]
171
          </div>
177
                                </div>
172
178
173
          <h3><a href="#serials">Serials</a></h3>
179
                                <h3><a href="#serials">Serials</a></h3>
174
          <div id="serials">
180
                                <div id="serials">
175
            <h4>Serials tables</h4>
181
                                    <h4>Serials tables</h4>
176
            [% PROCESS pagelist module=modules.serials modulename="serials" %]
182
                                    [% PROCESS pagelist module=modules.serials modulename="serials" %]
177
          </div>
183
                                </div>
178
184
179
        </div>
185
                            </div>
180
            </main>
186
                        </main>
181
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
187
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
182
188
183
        <div class="col-sm-2 col-sm-pull-10">
189
                <div class="col-sm-2 col-sm-pull-10">
184
            <aside>
190
                        <aside>
185
                [% INCLUDE 'admin-menu.inc' %]
191
                                [% INCLUDE 'admin-menu.inc' %]
186
            </aside>
192
                        </aside>
187
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
193
                </div> <!-- /.col-sm-2.col-sm-pull-10 -->
188
     </div> <!-- /.row -->
194
        </div> <!-- /.row -->
189
195
190
[% MACRO jsinclude BLOCK %]
196
[% MACRO jsinclude BLOCK %]
191
    [% Asset.js("js/admin-menu.js") | $raw %]
197
    [% Asset.js("js/admin-menu.js") | $raw %]
192
    <script>
198
    <script>
193
        $(document).ready( function() {
199
        $(document).ready( function() {
194
            var accordion = $( "#modules" ).accordion({
200
            var accordion = $( "#modules" ).accordion({
195
                collapsible: true,
201
                    collapsible: true,
196
                autoHeight: false,
202
                    autoHeight: false,
197
                header: "h3",
203
                    header: "h3",
198
              [%- IF panel -%]
204
                [%- IF panel -%]
199
                [%# we were asked to show a specific panel, usually on update %]
205
                    [%# we were asked to show a specific panel, usually on update %]
200
                active: [%- panel | html -%]
206
                    active: [%- panel | html -%]
201
              [%- ELSE -%]
207
                [%- ELSE -%]
202
                active: false
208
                    active: false
203
              [%- END -%]
209
                [%- END -%]
204
            });
210
            });
205
        });
211
        });
206
    </script>
212
    </script>
207
- 

Return to bug 21783