aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/manifesttheme/form.html71
-rw-r--r--templates/web/base/admin/manifesttheme/index.html35
-rw-r--r--templates/web/base/common_header_tags.html6
-rw-r--r--templates/web/base/reports/_list-filters.html2
-rw-r--r--templates/web/buckinghamshire/report/form/user_name.html13
-rw-r--r--templates/web/fixmystreet.com/header_extra.html1
6 files changed, 126 insertions, 2 deletions
diff --git a/templates/web/base/admin/manifesttheme/form.html b/templates/web/base/admin/manifesttheme/form.html
new file mode 100644
index 000000000..6d02487a6
--- /dev/null
+++ b/templates/web/base/admin/manifesttheme/form.html
@@ -0,0 +1,71 @@
+[% INCLUDE 'admin/header.html' title=loc('Theme') -%]
+
+<form method="post" enctype="multipart/form-data">
+ <div class="admin-hint">
+ <p>[% loc("The <strong>name</strong> is a string that represents the name of the web application as it is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon).") %]</p>
+ </div>
+ [% form.field('name').render | safe %]
+
+ <div class="admin-hint">
+ <p>[% loc("The <strong>short name</strong> is a string that represents the name of the web application displayed to the user if there is not enough space to display name (e.g., as a label for an icon on the phone home screen).") %]</p>
+ </div>
+ [% form.field('short_name').render | safe %]
+
+ <div class="admin-hint">
+ <p>[% loc("The <strong>theme colour</strong> defines the default theme colour for the application. This sometimes affects how the OS displays the site (e.g., on Android's task switcher, the theme colour surrounds the site). Colours should be specified with CSS syntax, e.g. <strong><code>#ff00ff</code></strong> or <strong><code>rgb(255, 0, 255)</code></strong> or a named colour like <strong><code>fuchsia</code></strong>.") %]</p>
+ </div>
+ [% form.field('theme_colour').render | safe %]
+
+ <div class="admin-hint">
+ <p>[% loc("The <strong>background colour</strong> defines a placeholder background colour for the application splash screen before it has loaded. Colours should be specified with CSS syntax, e.g. <strong><code>#ff00ff</code></strong> or <strong><code>rgb(255, 0, 255)</code></strong> or a named colour like <strong><code>fuchsia</code></strong>.") %]</p>
+ </div>
+ [% form.field('background_colour').render | safe %]
+
+ [% IF show_all %]
+ [% form.field('cobrand').render | safe %]
+ [% ELSE %]
+ <input type=hidden name=cobrand value='[% c.cobrand.moniker %]' />
+ [% END %]
+
+ <table>
+ <thead>
+ <tr>
+ <th>Icon</th>
+ <th>Size</th>
+ <th>Delete?</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH icon IN editing_manifest_theme.icons %]
+ <tr>
+ <td><img src="[% icon.src %]" /></td>
+ <td class="icon-size">[% icon.sizes %]</td>
+ <td><input type=checkbox name=delete_icon value='[% icon.src %]' /></td>
+ </tr>
+ [% END %]
+ <tr>
+ <td colspan=3>
+ <div class="admin-hint">
+ <p>[% loc("The <strong>icons</strong> are used when the application is installed to the user's home screen. Icons must be <strong>square</strong>, with <strong>512x512</strong>px and <strong>192x192</strong>px being the most common sizes.") %]</p>
+ </div>
+ [% form.field('icon').render | safe %]
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>
+ <input class="btn" type="submit" name="submit" value="[% loc('Save changes') %]">
+ </p>
+ [% IF form.item.id %]
+ <p>
+ <input class="btn-danger" type="submit" name="delete_theme" value="[% loc('Delete theme') %]" data-confirm="[% loc('Are you sure?') %]">
+ </p>
+ [% END %]
+</form>
+
+[% IF show_all %]
+ <p><a href="[% c.uri_for(c.controller.action_for('list')) %]">Return to themes list</a></p>
+[% END %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/base/admin/manifesttheme/index.html b/templates/web/base/admin/manifesttheme/index.html
new file mode 100644
index 000000000..df94c394f
--- /dev/null
+++ b/templates/web/base/admin/manifesttheme/index.html
@@ -0,0 +1,35 @@
+[% INCLUDE 'admin/header.html' title=loc('Themes') %]
+
+<table>
+ <thead>
+ <tr>
+ <th> [% loc('Cobrand') %] </th>
+ <th> [% loc('Name') %] </th>
+ <th> [% loc('Short Name') %] </th>
+ <th> [% loc('Background Colour') %] </th>
+ <th> [% loc('Theme Colour') %] </th>
+ <th> &nbsp; </th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOR theme IN rs.all %]
+ <tr>
+ <td>[% theme.cobrand %]</td>
+ <td>[% theme.name %]</td>
+ <td>[% theme.short_name %]</td>
+ <td>[% theme.background_colour %]</td>
+ <td>[% theme.theme_colour %]</td>
+ <td> <a href="[% c.uri_for(c.controller.action_for('edit'), [theme.cobrand]) %]" class="btn">[% loc('Edit') %]</a> </td>
+ </tr>
+ [% END %]
+ </tbody>
+</table>
+
+
+
+<p>
+ <a href="[% c.uri_for(c.controller.action_for('create')) %]">[% loc('Create') %]</a>
+ </p>
+
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html
index 279f561df..6edcc63a4 100644
--- a/templates/web/base/common_header_tags.html
+++ b/templates/web/base/common_header_tags.html
@@ -2,6 +2,12 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="manifest" href="/.well-known/manifest.webmanifest">
+[% IF manifest_theme %]
+ <meta name='theme-color' content='[% manifest_theme.theme_colour %]'>
+ [% FOREACH icon IN manifest_theme.icons %]
+ <link rel="apple-touch-icon" sizes="[% icon.sizes %]" href="[% icon.src %]">
+ [% END %]
+[% END %]
[% IF csrf_token %]
<meta content="[% csrf_token %]" name="csrf-token" />
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 3125f63b1..f5d1faa65 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -2,7 +2,7 @@
[% BLOCK category_options %]
[% FOR cat IN categories %]
- <option value="[% cat.category %]"[% ' selected' IF filter_category.${cat.category} OR ( filter_group AND ( cat.get_extra_metadata('group') == filter_group OR cat.category == filter_group ) ) %]>
+ <option value="[% cat.category %]"[% ' selected' IF filter_category.${cat.category} OR ( filter_group AND ( cat.get_extra_metadata('group').grep(filter_group).size OR cat.category == filter_group ) ) %]>
[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
diff --git a/templates/web/buckinghamshire/report/form/user_name.html b/templates/web/buckinghamshire/report/form/user_name.html
new file mode 100644
index 000000000..0cefb1b1d
--- /dev/null
+++ b/templates/web/buckinghamshire/report/form/user_name.html
@@ -0,0 +1,13 @@
+<!-- user_name.html -->
+<label for="form_name">Full name
+[% TRY %]
+ [% INCLUDE 'report/form/after_name.html' %]
+ [% CATCH file %]
+[% END %]
+</label>
+[% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+[% END %]
+<input type="text" class="form-control [% valid_class OR 'validName' %] js-form-name [% extra_class %]"
+ value="[% object.name || c.user.name | html %]" name="name" id="form_name">
+<!-- /user_name.html -->
diff --git a/templates/web/fixmystreet.com/header_extra.html b/templates/web/fixmystreet.com/header_extra.html
index 5292d4804..12d9fe9d4 100644
--- a/templates/web/fixmystreet.com/header_extra.html
+++ b/templates/web/fixmystreet.com/header_extra.html
@@ -10,7 +10,6 @@
<link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]">
[% END %]
-<meta name='theme-color' content='#ffd000'>
<link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/fixmystreet.com/favicon.ico">
[% INCLUDE 'tracking_code.html' %]