diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-11-19 15:12:27 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-11-19 15:22:00 +0000 |
commit | bb07940e9e3d6d80bd6af9d18ead285cdcdb26f2 (patch) | |
tree | 989e4db0e59967aca9545fe8d96e6ef977a6f780 | |
parent | a8f45b97bd0b91f714ff77fa9d3fbdf0e6981a15 (diff) |
Add encouraging message about help to admin front.
Fixes #929. Also move admin hint CSS to base CSS, not just layout.
-rw-r--r-- | templates/web/base/admin/index.html | 11 | ||||
-rw-r--r-- | web/cobrands/sass/_admin.scss | 152 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 2 | ||||
-rw-r--r-- | web/cobrands/sass/_layout.scss | 157 |
4 files changed, 170 insertions, 152 deletions
diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html index ad5932d97..17f7bd22a 100644 --- a/templates/web/base/admin/index.html +++ b/templates/web/base/admin/index.html @@ -1,5 +1,16 @@ [% INCLUDE 'admin/header.html' title=loc('Summary') -%] +<div class="fms-admin-info fms-admin-floated"> +This is the administration interface for [% c.cobrand.site_title %]. If you +need any help or guidance, there is <a href="http://fixmystreet.org/">plenty of +online documentation</a>. The FixMyStreet Platform is +<a href="https://github.com/mysociety/fixmystreet">actively supported</a> by +its developers, and has a community of people using or working on the code. +Please <a href="http://fixmystreet.org/community/">sign up to the mailing list +or get in touch</a> to let us know about your use of the FixMyStreet Platform, +and to receive notices of updates. +</div> + [% IF total_bodies == 0 %] <p class="fms-admin-info"> [% loc('Currently no bodies have been created.') %] diff --git a/web/cobrands/sass/_admin.scss b/web/cobrands/sass/_admin.scss new file mode 100644 index 000000000..741c058a2 --- /dev/null +++ b/web/cobrands/sass/_admin.scss @@ -0,0 +1,152 @@ +// Admin tables + +$table_border_color: #ccc; +$table_heading_bg_col: #595959; +$table_heading_border_col: #7a7a7a; +$table_heading_col: #fff; +$table_heading_underline_col: #393939; +$button_col: #fff; +$button_bg_col: #a1a1a1; // also search bar (tables) + +.admin { + table { + width: 100%; + font-size: 0.9em; + border: 1px solid $table_border_color; + border-collapse: collapse; + margin-bottom: 1em; + th, td { + padding: 0.666em 0.5em; + border: 1px solid $table_border_color; + } + th { + color: white; + background-color: $table_heading_bg_col; + border-bottom: 2px solid $table_heading_underline_col; + border-left: 1px solid $table_heading_border_col; + border-right: 1px solid $table_heading_border_col; + a:link, a:visited { + color: white; + } + } + td.record-id { + text-align: center; + font-weight: bold; + } + tr.filter-row td { + display: none; /* TODO: reveal when filtering is implemented */ + padding: 4px 4px 4px 40px; + background-color: $button_bg_col; + background-image: url('search-icon-white.png'); + background-position: 14px center; + background-repeat: no-repeat; + border-bottom: 2px solid $table_border_color; + } + tr.filter-row td input[type=text] { + background-color: #e1e1e1; + width: 16em; + @include border-radius(4px); + border: none; + padding: 3px 0.5em; + } + tr.is-deleted { + background-color: #ffdddd; + td.contact-category { + text-decoration: line-through; + } + } + } + .no-bullets { + margin-left: 0; + > li { + list-style: none; + } + } + .admin-box { // for delimiting forms, etc + border:1px solid #999; + padding:0.5em 1em; + margin:1.5em 0; + h2 { // only really want on first-child + margin-top: 0; + } + } + .fms-admin-warning, .fms-admin-info, .admin-hint, .admin-offsite-link { + display: none; // don't display admin-notes unless .show-admin-notes class is present + } + &.show-admin-notes { + .fms-admin-warning, .fms-admin-info, .admin-hint { + display: block; + } + .admin-offsite-link { + display: inline; + } + .fms-admin-warning, .fms-admin-info { + padding: 1em; + font-size: 90%; + border-style: solid; + border-width: 1px; + border-left-width: 1em; + margin-bottom: 1em; + } + .fms-admin-warning { + border-color: #f99; + background-color: #ffe1e1; + } + .fms-admin-info { + border-color: #9f9; + background-color: #e1ffe1; + } + .admin-open311-only { + border:1px solid #666; + padding:1em; + margin: 1em 0; + } + .admin-hint { + font-size: 80%; // little question marks are small + cursor: pointer; + display: block; + float:left; + overflow: hidden; + padding: 0.2em; + margin-right: 0.666em; + text-align: center; + color: #fff; + font-weight: bold; + background-color: #f93; + -moz-border-radius: 0.333em; + -webkit-border-radius: 0.333em; + border-radius: 0.333em; + p { + display:none; + } + &:before { content: "?" } + &.admin-hint-show { + font-size: 90%; + text-align: left; + display: block; + float:none; + margin:1em 0; + &:before { content: "" } + background-color: inherit !important; + p { + font-weight: normal; + display: block; + background-color: #ff9; + color: #000; + border-style: solid; + border-width: 1px; + border-left-width: 1em; + border-color: #f93; + padding:1em; + margin: 0; + } + } + } + .admin-offsite-link { + padding-right: 12px; + background-image: url(../../i/external-link.png); + background-position: right top; + background-repeat: no-repeat; + } + } +} diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index d50d31e3e..5bc1105cf 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -1576,3 +1576,5 @@ table.nicetable { float: right; } } + +@import "_admin"; diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index b7c1c9f96..632385cac 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -1079,159 +1079,12 @@ body.frontpage { } } -// Admin tables - -$table_border_color: #ccc; -$table_heading_bg_col: #595959; -$table_heading_border_col: #7a7a7a; -$table_heading_col: #fff; -$table_heading_underline_col: #393939; -$button_col: #fff; -$button_bg_col: #a1a1a1; // also search bar (tables) - -.admin { - table { - width: 100%; - font-size: 0.9em; - border: 1px solid $table_border_color; - border-collapse: collapse; - margin-bottom: 1em; - th, td { - padding: 0.666em 0.5em; - border: 1px solid $table_border_color; - } - th { - color: white; - background-color: $table_heading_bg_col; - border-bottom: 2px solid $table_heading_underline_col; - border-left: 1px solid $table_heading_border_col; - border-right: 1px solid $table_heading_border_col; - a:link, a:visited { - color: white; - } - } - td.record-id { - text-align: center; - font-weight: bold; - } - tr.filter-row td { - display: none; /* TODO: reveal when filtering is implemented */ - padding: 4px 4px 4px 40px; - background-color: $button_bg_col; - background-image: url('search-icon-white.png'); - background-position: 14px center; - background-repeat: no-repeat; - border-bottom: 2px solid $table_border_color; - } - tr.filter-row td input[type=text] { - background-color: #e1e1e1; - width: 16em; - @include border-radius(4px); - border: none; - padding: 3px 0.5em; - } - tr.is-deleted { - background-color: #ffdddd; - td.contact-category { - text-decoration: line-through; - } - } - } - .no-bullets { - margin-left: 0; - > li { - list-style: none; - } - } - .admin-box { // for delimiting forms, etc - border:1px solid #999; - padding:0.5em 1em; - margin:1.5em 0; - h2 { // only really want on first-child - margin-top: 0; - } - } - .fms-admin-warning, .fms-admin-info, .admin-hint, .admin-offsite-link { - display: none; // don't display admin-notes unless .show-admin-notes class is present - } - &.show-admin-notes { - .fms-admin-warning, .fms-admin-info, .admin-hint { - display: block; - } - .admin-offsite-link { - display: inline; - } - .fms-admin-warning, .fms-admin-info { - padding: 1em; - font-size: 90%; - border-style: solid; - border-width: 1px; - border-left-width: 1em; - margin-bottom: 1em; - } - .fms-admin-warning { - border-color: #f99; - background-color: #ffe1e1; - } - .fms-admin-info { - border-color: #9f9; - background-color: #e1ffe1; - } - .admin-open311-only { - border:1px solid #666; - padding:1em; - margin: 1em 0; - } - .admin-hint { - font-size: 80%; // little question marks are small - cursor: pointer; - display: block; - float:left; - overflow: hidden; - padding: 0.2em; - margin-right: 0.666em; - text-align: center; - color: #fff; - font-weight: bold; - background-color: #f93; - -moz-border-radius: 0.333em; - -webkit-border-radius: 0.333em; - border-radius: 0.333em; - p { - display:none; - } - &:before { content: "?" } - &.admin-hint-show { - font-size: 90%; - text-align: left; - display: block; - float:none; - margin:1em 0; - &:before { content: "" } - background-color: inherit !important; - p { - font-weight: normal; - display: block; - background-color: #ff9; - color: #000; - border-style: solid; - border-width: 1px; - border-left-width: 1em; - border-color: #f93; - padding:1em; - margin: 0; - } - } - } - .admin-offsite-link { - padding-right: 12px; - background-image: url(../../i/external-link.png); - background-position: right top; - background-repeat: no-repeat; - } - } -} +/* Admin interface */ +.fms-admin-floated { + float: right; + width: 25%; +} /* MEDIA QUERIES */ @media only screen and (min-width: 48em) and (max-width: 61em) { |