govuk_admin_template 2.3.4 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b446a77b5540fe25898d6d3d4ddb8d1d019e98
|
4
|
+
data.tar.gz: 41e69f7e09148dd7127e1eaea2a5aff923d8530f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b18bfbc9babd4668e0e83f5809b126a1a0a4088534bfb8e21ecc85fea7bf8779c142510620f8a5cd71f65c71c478ebc318582662b8c9fab5dc98c31706af105
|
7
|
+
data.tar.gz: b2b2d9ed13c2a77ae1f728f437f65de8084b711f29ca0f61cd97654431d918adf0fe357d4dac48147cc5632c1250470b03bbfcd17d0851c059be99973f8e6190
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
<%
|
2
|
+
placeholder ||= "Filter table"
|
3
|
+
colspan ||= 100
|
4
|
+
filter_id ||= SecureRandom.uuid
|
5
|
+
%>
|
6
|
+
<tr class="if-no-js-hide table-header-secondary">
|
7
|
+
<td colspan="<%= colspan %>">
|
8
|
+
<form>
|
9
|
+
<label for="<%= filter_id %>" class="rm"><%= placeholder %></label>
|
10
|
+
<input id="<%= filter_id %>" type="text" class="form-control normal js-filter-table-input" placeholder="<%= placeholder %>">
|
11
|
+
</form>
|
12
|
+
</td>
|
13
|
+
</tr>
|
@@ -184,7 +184,8 @@
|
|
184
184
|
<h2>Tables</h2>
|
185
185
|
<div class="row">
|
186
186
|
<div class="col-md-6 lead">
|
187
|
-
<p>
|
187
|
+
<p>Tables should use the Bootstrap 3 classes <code>table table-bordered</code>. The row of table headings should have the admin template class <code>table-headers</code>.</p>
|
188
|
+
<p>When using a table with two layers of headings, <code>table-header</code> and <code>table-header-secondary</code> classes can be used.</p>
|
188
189
|
</div>
|
189
190
|
<div class="col-md-6">
|
190
191
|
<table class="table table-bordered table-hover">
|
@@ -207,9 +208,23 @@
|
|
207
208
|
</table>
|
208
209
|
</div>
|
209
210
|
</div>
|
211
|
+
<h3>Filterable tables</h3>
|
210
212
|
<div class="row">
|
211
213
|
<div class="col-md-6 lead">
|
212
|
-
<p>Using the <
|
214
|
+
<p>Using the <a href="https://github.com/alphagov/govuk_admin_template/blob/master/app/assets/javascripts/govuk-admin-template/modules/filterable_table.js">filterable-table module</a> and the <a href="https://github.com/alphagov/govuk_admin_template/tree/master/app/views/govuk_admin_template/_table_filter.html.erb">table_filter partial</a> any table can be filtered. The module performs a simple match against the content of each row, if there’s no match the row is hidden.</p>
|
215
|
+
<p>If the class <code>js-open-on-submit</code> is added to a link within a row, then the first link visible with that class will be opened when the user hits <code>ENTER</code>.</p>
|
216
|
+
<pre class="add-top-margin"><table class="table table-bordered" data-module="filterable-table">
|
217
|
+
<thead>
|
218
|
+
<tr class="table-header">
|
219
|
+
<th>
|
220
|
+
Heading
|
221
|
+
</th>
|
222
|
+
</tr>
|
223
|
+
<%= render partial: "govuk_admin_template/table_filter",
|
224
|
+
locals: {placeholder: "Filter items"} %>
|
225
|
+
</thead>
|
226
|
+
…
|
227
|
+
</table></pre>
|
213
228
|
</div>
|
214
229
|
<div class="col-md-6">
|
215
230
|
<table class="table table-bordered table-hover" data-module="filterable-table">
|
@@ -218,14 +233,7 @@
|
|
218
233
|
<th>Primary header</th>
|
219
234
|
<th style="width: 80px">Number</th>
|
220
235
|
</tr>
|
221
|
-
|
222
|
-
<td colspan="2">
|
223
|
-
<form>
|
224
|
-
<label for="table-filter" class="rm">Filter organisations</label>
|
225
|
-
<input id="table-filter" type="text" class="form-control normal js-filter-table-input" placeholder="Filter table">
|
226
|
-
</form>
|
227
|
-
</td>
|
228
|
-
</tr>
|
236
|
+
<%= render partial: 'govuk_admin_template/table_filter', locals: {placeholder: 'Filter fruity things'} %>
|
229
237
|
</thead>
|
230
238
|
<tbody>
|
231
239
|
<tr>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_admin_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- app/assets/stylesheets/govuk_admin_template/bootstrap-ie7.scss
|
167
167
|
- app/controllers/govuk_admin_template/application_controller.rb
|
168
168
|
- app/controllers/govuk_admin_template/style_guide_controller.rb
|
169
|
+
- app/views/govuk_admin_template/_table_filter.html.erb
|
169
170
|
- app/views/govuk_admin_template/style_guide/index.html.erb
|
170
171
|
- app/views/layouts/govuk_admin_template.html.erb
|
171
172
|
- config/routes.rb
|