diff options
Diffstat (limited to 'app')
69 files changed, 2350 insertions, 98 deletions
diff --git a/app/assets/images/search.png b/app/assets/images/search.png Binary files differnew file mode 100644 index 000000000..9e427ba94 --- /dev/null +++ b/app/assets/images/search.png diff --git a/app/assets/stylesheets/responsive/_attachments_layout.scss b/app/assets/stylesheets/responsive/_attachments_layout.scss new file mode 100644 index 000000000..1eedc601b --- /dev/null +++ b/app/assets/stylesheets/responsive/_attachments_layout.scss @@ -0,0 +1,66 @@ +/* Layout for the HTML view of attachments */ + +/* Generated HTML should be full row width */ +#view-html-content { + @include grid-column(12); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + table { + border-collapse:collapse; + margin-bottom:1em; + } + + td { + vertical-align:top; + max-width:30em; + overflow:auto; + } + +} + +.view_html_prefix { + + @include grid-column(12); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + width: $main_menu-mobile_menu_cutoff; + } + + .view_html_logo { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:3); + @include ie8{ + padding-right: 0.9375em; + } + } + } + + .view_html_description { + @include grid-column(12); + @include respond-min($main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:7, $pull: 2); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + } + } + + .view_html_download_link { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:2, $push: 7); + @include ie8{ + padding-left: 0.9375em; + } + } + } +} + + + + diff --git a/app/assets/stylesheets/responsive/_attachments_style.scss b/app/assets/stylesheets/responsive/_attachments_style.scss new file mode 100644 index 000000000..79d52b7f6 --- /dev/null +++ b/app/assets/stylesheets/responsive/_attachments_style.scss @@ -0,0 +1,26 @@ +/* Styling for the HTML view of attachments */ + +#view-html-content { + + td,th { + border:solid 1px #000; + } + + tr:nth-child(odd) { + background-color:#bbb; + } + + tr:nth-child(even) { + background-color:#ddd; + } +} + +.view_html_prefix { + text-align:center; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + text-align:left; + min-height:3em; + padding:0.5em 1em; + } + border-bottom: 1px solid #5F5F5F; +} diff --git a/app/assets/stylesheets/responsive/_blog_layout.scss b/app/assets/stylesheets/responsive/_blog_layout.scss new file mode 100644 index 000000000..d15f46c76 --- /dev/null +++ b/app/assets/stylesheets/responsive/_blog_layout.scss @@ -0,0 +1,4 @@ +/* Layout for blog */ +.blog_post { + margin-bottom:2em; +} diff --git a/app/assets/stylesheets/responsive/_blog_style.scss b/app/assets/stylesheets/responsive/_blog_style.scss new file mode 100644 index 000000000..1d27289fc --- /dev/null +++ b/app/assets/stylesheets/responsive/_blog_style.scss @@ -0,0 +1,10 @@ +.blog_post { + h2 a { + text-decoration: none; + &:hover, + &:active, + &:focus { + text-decoration: underline; + } + } +} diff --git a/app/assets/stylesheets/responsive/_categorization_game_layout.scss b/app/assets/stylesheets/responsive/_categorization_game_layout.scss new file mode 100644 index 000000000..138dfe005 --- /dev/null +++ b/app/assets/stylesheets/responsive/_categorization_game_layout.scss @@ -0,0 +1,41 @@ +/* Layout for categorisation game */ + +#request_game_play { + @include grid-row($behavior: nest); +} + +#game_sidebar { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:4, $float:right); + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7 { + width: 17.438em; + } + } +} + +#game { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:8); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } +} + +/* Don't display request extracts floated right as there is constrained space */ +#request_game_play{ + span.desc { + float: none; + padding: 0; + background: none; + min-height: inherit; + } +} diff --git a/app/assets/stylesheets/responsive/_categorization_game_style.scss b/app/assets/stylesheets/responsive/_categorization_game_style.scss new file mode 100644 index 000000000..59c971a89 --- /dev/null +++ b/app/assets/stylesheets/responsive/_categorization_game_style.scss @@ -0,0 +1,8 @@ +/* Styling for categorisation game */ +#game_sidebar { + font-size:0.9em; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + text-align: center; + } + +} diff --git a/app/assets/stylesheets/responsive/_contact_layout.scss b/app/assets/stylesheets/responsive/_contact_layout.scss new file mode 100644 index 000000000..9fb7bd2f1 --- /dev/null +++ b/app/assets/stylesheets/responsive/_contact_layout.scss @@ -0,0 +1,4 @@ +/* Layout for contact form page */ +#contact_preamble { + margin-bottom: 30px; +} diff --git a/app/assets/stylesheets/responsive/_contact_style.scss b/app/assets/stylesheets/responsive/_contact_style.scss new file mode 100644 index 000000000..6a4abfcac --- /dev/null +++ b/app/assets/stylesheets/responsive/_contact_style.scss @@ -0,0 +1 @@ +/* Styles for contact form page */ diff --git a/app/assets/stylesheets/responsive/_footer_layout.scss b/app/assets/stylesheets/responsive/_footer_layout.scss new file mode 100644 index 000000000..2b0c956fa --- /dev/null +++ b/app/assets/stylesheets/responsive/_footer_layout.scss @@ -0,0 +1,50 @@ +/* Footer layout */ +#footer { + width:100%; + margin:5em 0 0; + padding:0.5em 0; +} + +#footer-nav{ + + @include grid-row(); + @include ie8{ + width: $main_menu-mobile_menu_cutoff; + } + img { + display: none; + } + + ul{ + padding: 0; + list-style: none outside none; + } + + @include respond-min( $main_menu-mobile_menu_cutoff ){ + ul { + @include block-grid(4); + } + @include ie8{ + #footer-nav ul > li:nth-child(4n+1) { + padding-left: 0em; + padding-right: 1.40625em; + } + #footer-nav ul > li:nth-child(4n+2) { + padding-left: 0.46875rem; + padding-right: 0.9375rem; + } + #footer-nav ul > li:nth-child(4n+3) { + padding-left: 0.9375em; + padding-right: 0.46875em; + } + #footer-nav ul > li:nth-child(4n) { + padding-left: 1.40625em; + padding-right: 0em; + } + } + + img { + display: inherit; + } + } +} diff --git a/app/assets/stylesheets/responsive/_footer_style.scss b/app/assets/stylesheets/responsive/_footer_style.scss new file mode 100644 index 000000000..81d29b7e1 --- /dev/null +++ b/app/assets/stylesheets/responsive/_footer_style.scss @@ -0,0 +1,5 @@ +/* Footer styles */ +#footer { + text-align: center; + font-size:0.85em; +} diff --git a/app/assets/stylesheets/responsive/_frontpage_layout.scss b/app/assets/stylesheets/responsive/_frontpage_layout.scss new file mode 100644 index 000000000..4559c0f6d --- /dev/null +++ b/app/assets/stylesheets/responsive/_frontpage_layout.scss @@ -0,0 +1,86 @@ +/* Frontpage layout */ + +#frontpage_splash { + @include grid-row($behavior: nest); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + min-height: 375px; + } + + #left_column { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(8); + margin-top:66px; + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7{ + width: 36.813em; + } + } + } + + #right_column { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(4); + margin-top: 30px; + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7{ + width: 17.438em; + } + } + + input[type=text] { + width:180px; + } + } + + #frontpage_splash #frontpage_search_box { + margin-bottom:30px; + margin-top:-10px; + } + + #frontpage_right_to_know { + line-height:20px; + } +} + +/* Two even columns */ +#frontpage_examples { + @include grid-row($behavior: nest); + margin-top: 2em; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + margin-top: 0; + } + + #examples_0 { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:6); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7{ + width: 27.125em; + } + } + } + + #examples_1 { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:6); + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7{ + width: 27.125em; + } + } + } + + +} diff --git a/app/assets/stylesheets/responsive/_frontpage_style.scss b/app/assets/stylesheets/responsive/_frontpage_style.scss new file mode 100644 index 000000000..99270231f --- /dev/null +++ b/app/assets/stylesheets/responsive/_frontpage_style.scss @@ -0,0 +1,28 @@ +/* Frontpage styles */ +#frontpage_splash { + h1, h2 { + font-weight: normal; + } + strong { + font-weight: bold; + } +} + +#frontpage_examples { + ul { + list-style:none outside none; + padding: 0; + } + .excerpt { + cursor:pointer; + font-style:italic; + padding:0 0 0 2em; + } + + #examples_1 { + li { + border-bottom:1px solid #ddd; + padding-top: 1em; + } + } +} diff --git a/app/assets/stylesheets/responsive/_global_layout.scss b/app/assets/stylesheets/responsive/_global_layout.scss new file mode 100644 index 000000000..d7b24df41 --- /dev/null +++ b/app/assets/stylesheets/responsive/_global_layout.scss @@ -0,0 +1,100 @@ +/* Layout across the site */ +#wrapper{ + @include grid-row(); + @include ie8{ + width: $main_menu-mobile_menu_cutoff; + } +} + +/* A global 12 column element provides padding for all pages */ +#content{ + @include grid-column(12); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 56.125em; + } +} + + +textarea{ + @include respond-min( $main_menu-mobile_menu_cutoff ){ + width: inherit; + } +} + + +/* Container grid-rows for pages that use these generic headers and columns */ +#public_body_list, +#user_profile_header, +#general_blog, +#request_show, +#info_request_batch_show { + @include grid-row($behavior: nest); +} + +/* Column headers */ +#header_right { + @include grid-column(12); + + + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:4, $float:right); + padding-top:27px; + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7 { + width: 17.438em; + } + } +} + +#header_left { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(8); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } +} + +/* Columns */ +#left_column_flip, #left_column{ + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(9); + @include lte-ie7 { + width: 41.625em; + } + } +} + +#right_column_flip, #right_column { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:3); + margin-top:20px; + @include lte-ie7 { + width: 12.625em; + } + } +} + +#left_column_flip, #right_column { + @include ie8{ + padding-left: 0.9375em; + } +} + +#right_column_flip, #left_column { + @include ie8{ + padding-right: 0.9375em; + } +} diff --git a/app/assets/stylesheets/responsive/_global_style.scss b/app/assets/stylesheets/responsive/_global_style.scss new file mode 100644 index 000000000..5b268f3a6 --- /dev/null +++ b/app/assets/stylesheets/responsive/_global_style.scss @@ -0,0 +1,225 @@ +html { + height: 100%; + font-size: 1em; +} + +body { + color: #333; + line-height: 1.5em; + height: 100%; + min-height: 100%; +} + +a { + color: #2688dc; + &:hover, + &:active, + &:focus { + color: #333333; + } +} + +h1, h2, h3, h4, h5, h6 { + margin-bottom: 18px; + margin-bottom: 1rem; + line-height: 1.1em; + text-rendering: optimizeLegibility; +} + +h1 { + font-size: 2.5em; +} + + +h2 { + font-size: 2em; +} + +h3 { + font-size: 1.6em +} + +h4 { + font-size: 1.3em; +} + +h5 { + font-size: 1em; +} + +p { + margin-top: 0; + margin-bottom: 1em; +} + +p.subtitle { + margin-top:0.5em; + margin-bottom:1.5em; + font-size:1.2em; + font-style:normal; + color:#222; +} + +hr { + border: none; + border-top: 1px solid #e9e9e9; + margin: 0; +} + +img { + max-width: 100%; + height: auto; +} + +dt { + margin-top: 1em; +} + +dd { + margin-left: 2em; +} + +dt + dd { + margin-top: 0.5em; + > p { + margin-top: 0; + } +} + + +/* Links in sidebars usually only underlined on hover */ +.feed_link,.act_link { + margin-bottom:10px; + a{ + text-decoration:none; + } + a:hover{ + text-decoration:underline; + } +} + +#header_right { + > a { + text-decoration:none; + } + > a:hover{ + text-decoration:underline; + } + + br{ + line-height:200%; + } + +} + +/* Notices to the user (usually on action completion) */ +#notice, #error { + font-size:1em; + border-radius:3px; + margin:1em 0; + padding:1.5em; + + p:first-child { + margin-top:0; + } + + p:last-child { + margin-bottom:0; + } + +} + +#notice { + background-color: lighten(#62b356, 23%); +} + +#error { + background-color: lighten(#b05460, 23%); +} + +.big { + font-size: 1.2em; +} + +/* Form styling */ + +label.form_label { + font-size: 1.1em; +} + +.form_item_note,.form_note { + font-size:0.875em; +} + +p + .form_item_note { + position: relative; + top: -1.25em; +} + +form input[type=text],form input[type=password] { + font-size:1.1em; + width:200px; + border-radius:3px; + -moz-border-radius:3px; + border-color:#BBB; + border-style:solid; + border-width:1px; + padding:5px; + display: inline-block; +} + +.fieldWithErrors { + display:block; + padding:0.2em; + textarea, input { + border:solid 1px Red !important; + } +} + +.errorExplanation { + border-radius:6px; + -moz-border-radius:6px; + font-weight: normal; + margin:20px 0 30px; +} + +#error,#hidden_request { + font-weight: bold; + padding:0.5em; +} + +#preview_form ul { + margin:0; + padding:1px 32px 10px; +} + +#preview_form ul li { + margin:10px 0; +} + +label small{ + text-transform: none; +} + +/* Pagination */ + +div.pagination { + text-align:center; + padding-top:0.3em; + + span.current { + padding:0 0.6em 0.1em; + } + + span.disabled { + padding:0 0.6em 0.1em; + } + + a, a:visited { + text-decoration:none; + padding:0 0.6em 0.1em; + } + +} + + diff --git a/app/assets/stylesheets/responsive/_header_layout.scss b/app/assets/stylesheets/responsive/_header_layout.scss new file mode 100644 index 000000000..b3103e3a9 --- /dev/null +++ b/app/assets/stylesheets/responsive/_header_layout.scss @@ -0,0 +1,205 @@ +/* Header layout */ + +#banner_content{ + @include grid-row; + position: relative; + @include ie8{ + width: $main_menu-mobile_menu_cutoff; + } +} + +#banner{ + // Hide menu items by default on mobile + #logged_in_bar, + #topnav, + #user_locale_switcher{ + display:none; + } + + // …and show a button to reveal them + .rsp_menu_button{ + @include grid-column(4); + padding: 1em 1em 0 1em; + float: right; + a { + text-align: right; + &.open{ + display: block; + } + &.close{ + display: none; + } + } + } + + // Squeeze the logo up on small screens to make room for the button + #logo_wrapper{ + @include grid-column(8); + padding: 1em 1em 0 1em; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(4); + padding: 1em; + margin-bottom: 1em; + @include lte-ie7 { + width: 17.313em; + } + } + } + + &:target{ + // Hide menu button when menu is open + .rsp_menu_button{ + .open{ + display:none; + } + .close{ + display:block; + } + } + @media( max-width: $main_menu-mobile_menu_cutoff ){ + // Show menu items when menu is targeted + #logged_in_bar, + #topnav, + #user_locale_switcher{ + display:block; + clear:both; + } + } + + + } + + @include respond-min( $main_menu-mobile_menu_cutoff ){ + // On larger screens show the menu + #banner_nav, + #logged_in_bar, + #topnav, + #user_locale_switcher{ + display:block; + } + + // …and hide the menu button + .rsp_menu_button{ + display:none; + } + } + +} + + +#topnav{ + padding: 0 0 1em 0; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + padding: 0; + } +} + +#navigation { + list-style: none outside none; + @include grid-row; + padding: 0; + position: relative; + @include ie8{ + width: $main_menu-mobile_menu_cutoff; + } + /* Spread the nav elements horizontally on larger screens */ + li{ + display: block; + + @include respond-min( $main_menu-mobile_menu_cutoff ){ + display: inline-block; + float: left; + } + @include lte-ie7 { + display: inline; + } + } + a{ + padding: 0.5em 1em; + display: block; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + display: inline-block; + } + } +} + +#navigation_search { + @include respond-min( $main_menu-mobile_menu_cutoff ){ + position: absolute; + top: 0; + right: 0; + } + form{ + @include grid-row; + padding-right: 1em; + @include lte-ie7 { + display: inline; + } + } + input{ + @include grid-column($columns:9); + margin:0; + @include lte-ie7 { + width: 10.063em; + } + } + label{ + @include prefix-postfix-base; + @include grid-column($columns:3,$float:left); + border:none; + img{ + max-width: 100%; + } + @include lte-ie7 { + width: 2.125em; + } + } +} + +#logged_in_bar{ + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(8); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } + + a, .greeting { + display:block; + padding: 0.5em 1em; + } + + @include respond-min( $main_menu-mobile_menu_cutoff ){ + #logged_in_links { + top: 3em; + position: absolute; + right: 0.9375em; + a, .greeting{ + display:inline; + font-weight: bold; + padding:0 0 0 1em; + } + + } + } +} + +#user_locale_switcher { + @include respond-min( $main_menu-mobile_menu_cutoff ){ + position: absolute; + right: 0; + top: 0; + } + a{ + display: block; + padding: 0.5em 1em; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + display: inline-block; + } + } + +} diff --git a/app/assets/stylesheets/responsive/_header_style.scss b/app/assets/stylesheets/responsive/_header_style.scss new file mode 100644 index 000000000..9008a73a7 --- /dev/null +++ b/app/assets/stylesheets/responsive/_header_style.scss @@ -0,0 +1,4 @@ +/* Header style */ +#navigation { + border-bottom: 1px solid #e9e9e9; +} diff --git a/app/assets/stylesheets/responsive/_help_layout.scss b/app/assets/stylesheets/responsive/_help_layout.scss new file mode 100644 index 000000000..60e557660 --- /dev/null +++ b/app/assets/stylesheets/responsive/_help_layout.scss @@ -0,0 +1,17 @@ +/* Help layout */ + +/* These help pages use grid-column elements, so need grid-row mixed in */ +#help_about, +#help_alaveteli, +#help_api, +#help_credits, +#help_officers, +#help_privacy, +#help_requesting, +#help_unhappy { + @include grid-row($behavior: nest); +} + +#hash_link_padding { + margin-bottom:10em; +} diff --git a/app/assets/stylesheets/responsive/_help_style.scss b/app/assets/stylesheets/responsive/_help_style.scss new file mode 100644 index 000000000..f339bec8c --- /dev/null +++ b/app/assets/stylesheets/responsive/_help_style.scss @@ -0,0 +1,29 @@ +/* Help style */ + +div.controller_help { + /* Underline links on hover */ + dt a, h1 a { + text-decoration:none; + font-size:0.9em; + } + dt:hover, h1:hover { + > a { + color:#777; + } + > a:hover{ + text-decoration: underline; + } + } +} + + + +ul.no_bullets { + list-style-type:none; + margin:0 0 30px; + padding:0; + + li { + margin-bottom:6px; + } +} diff --git a/app/assets/stylesheets/responsive/_lists_layout.scss b/app/assets/stylesheets/responsive/_lists_layout.scss new file mode 100644 index 000000000..69237ae91 --- /dev/null +++ b/app/assets/stylesheets/responsive/_lists_layout.scss @@ -0,0 +1,84 @@ +/* Layout for lists of requests, authorities, users */ +.request_listing,.body_listing,.user_listing { + overflow:hidden; + margin-top: 1.5em; + .head { + display:block; + margin-bottom: 0.33em; + } + .requester { + margin-bottom: 0.5em; + } + .bottomline { + display:block; + margin-bottom: 0.5em; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + margin-bottom: 1.5em; + } + } +} + +.desc { + display:block; + float:right; + clear:none; + overflow:hidden; + margin-bottom: 1.5em; +} + +.body_listing, .user_listing { + .desc, .bottomline { + clear: both; + float: none; + margin-bottom: 0; + } + .bottomline { + margin-bottom: 1.5em + } +} + +.info_request_batch_intro{ + @include grid-column(12); +} + +.request_listing{ + @include grid-row($behavior:nest); + margin-top: 1.5em; + .request_right { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:4, $float:right); + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7 { + width: 17.438em; + } + } + } + + .request_left { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:8); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } + } + + .desc { + width:100%; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + padding:0 0 0 2em; + @include lte-ie7 { + padding: 0; + } + } + } +} + + diff --git a/app/assets/stylesheets/responsive/_lists_style.scss b/app/assets/stylesheets/responsive/_lists_style.scss new file mode 100644 index 000000000..762901a5f --- /dev/null +++ b/app/assets/stylesheets/responsive/_lists_style.scss @@ -0,0 +1,107 @@ +/* Styles for lists of requests, authorities, users */ +.request_listing,.body_listing,.user_listing { + border-bottom:1px solid #e9e9e9; + .head { + font-weight: bold; + font-size: 1.6em; // =h3 + } + a { + text-decoration: none; + &:hover, + &:active, + &:focus { + text-decoration: underline; + } + } +} + +.request_listing{ + .bottomline { + background-position:top left; + background-repeat: no-repeat; + padding:0 0 0 27px; + } + .desc { + font-style: italic; + } +} + +.request_icon_line { + background-repeat:no-repeat; + background-position:left center; + padding:0 0 0 42px; +} + +.request_short_listing { + margin-top:1em; + h3 { + font-size: 1.3em; + margin-bottom: 0.33em; + } + a { + text-decoration: none; + &:hover, + &:active, + &:focus { + text-decoration: underline; + } + } +} + +/* Status lines and icons */ +.icon_waiting_response,.icon_waiting_classification,.icon_waiting_clarification { + background-image:image-url('status-pending.png'); + color:#A68C2E; +} + + +.icon_not_held, .icon_attention_requested { + background-image:image-url('status-not-held.png'); + color:#A68C2E; +} + +.icon_successful,.icon_partially_successful { + background-image:image-url('status-complete.png'); + color:#69952F; +} + +.icon_requires_admin,.icon_waiting_response_overdue,.icon_waiting_response_very_overdue { + background-image:image-url('status-overdue.png'); + color:#C1272D; +} + +.icon_gone_postal { + background-image:image-url('status-gone-postal.png'); + color:#A68C2E; +} + +.icon_error_message { + background-image:image-url('status-error.png'); + color:#C1272D; +} + +.icon_internal_review { + background-image:image-url('status-internal-review.png'); + color:#A68C2E; +} + +.icon_user_withdrawn { + background-image:image-url('status-withdrawn.png'); + color:#A68C2E; +} + +.icon_failed,.icon_rejected { + background-image:image-url('status-denied.png'); + color:#C1272D; +} + +#public_body_list { + ul { + list-style: none outside none; + padding-left: 0; + } + li { + line-height: 1.2em; + margin-bottom: 0.4em; + } +} diff --git a/app/assets/stylesheets/responsive/_new_request_layout.scss b/app/assets/stylesheets/responsive/_new_request_layout.scss new file mode 100644 index 000000000..eec95ae77 --- /dev/null +++ b/app/assets/stylesheets/responsive/_new_request_layout.scss @@ -0,0 +1,184 @@ +/* Layout for pages in making a new request */ + +/* /select_authority page */ +#authority_selection { + @include grid-column($columns: 12, $collapse: true); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns: 6, $collapse: true); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 27.125em; + } + } +} + +.new_info_request{ + @include grid-row($behavior: nest); +} + +#authority_preview { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(6); + margin-top:-67px; + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 26.188em; + } + } + + /* Hide some elements of the public body that aren't appropriate in this + context */ + #list-filter, h2.foi_results, .public-body-name-prefix { + display: none; + } + + /* Compact request list for viewing in authority preview column */ + .request_left, #header_left { + @include grid-column(12, $collapse: true); + } + + .request_right { + @include grid-column(12, $collapse: true); + } + + span.desc { + background:none; + line-height:18px; + padding: 0; + } + +} +/* /new/[body_name] page */ +#request_header { + @include grid-row; + + /* Restrict width of form elements on wide screens */ + #request_header_body, #request_header_subject, #typeahead_response { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:8, $last-column:true); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } + } + + span#to_public_body { + display:block; + margin-bottom:15px; + } +} + +/* Advice sits on right hand side */ +#request_advice { + + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:4, $push: 8); + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7 { + width: 17.438em; + } + } +} + +#request_form { + + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:8, $pull: 4); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 36.813em; + } + } + +} + +#preview_form { + @include grid-column(12); +} + + +/* Batch request page*/ + +div.batch_public_body_toggle { + display:none; +} + +#body_selection { + @include grid-row($behavior: nest); + /* Equal columns */ + .body_list { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(5); + } + @include lte-ie7 { + width: 22.313em; + } + } + + select { + height: inherit; + } + + #body_candidates { + float: left; + @include ie8{ + padding-right: 0.9375em; + } + } + + #body_selections { + float: right; + @include ie8{ + padding-left: 0.9375em; + } + } + + input[type='submit'] { + margin: 10px 0; + width: 45%; + } + + #body_select_all_button, #body_deselect_button { + float: right; + } + + #body_submission { + input[type='submit'] { + margin: 10px 0; + width:100%; + } + } + + .select_all_button { + display: none; + } + + .body_select { + width: 100%; + } + +} + +.batch_public_body_list { + margin-left: 110px; +} + + + + diff --git a/app/assets/stylesheets/responsive/_new_request_style.scss b/app/assets/stylesheets/responsive/_new_request_style.scss new file mode 100644 index 000000000..ab144b39f --- /dev/null +++ b/app/assets/stylesheets/responsive/_new_request_style.scss @@ -0,0 +1,56 @@ +/* Styles for pages in making a new request */ + +/* /new/[body_name] page */ +.new_info_request { + label { + display: block; + margin-bottom: 0.5em; + } + input[type=text], + textarea { + width: 100%; + font-size: 1em; + } +} + +#request_header { + padding-top:0.5em; + padding-bottom:1em; + +} + +#to_public_body { + font-weight: bold; + font-size: 1.3em; +} + +#request_header_text { + border-radius:3px; + background-color: lighten(#62b356, 23%); + padding:0 1em; + margin-bottom: 1.5em; + margin-top: 1.5em; + overflow: hidden; + h3 { + font-size: 1em; + } + +} + +#request_advice { + ul { + margin:0 auto; + + li { + margin:0 0 1em; + } + } +} + + +/* Batch request page */ + +.batch_public_body_toggle { + color: #0000EE; + font-size: 0.9em; +} diff --git a/app/assets/stylesheets/responsive/_popups_layout.scss b/app/assets/stylesheets/responsive/_popups_layout.scss new file mode 100644 index 000000000..700361609 --- /dev/null +++ b/app/assets/stylesheets/responsive/_popups_layout.scss @@ -0,0 +1,31 @@ +/* Layout for popup messages */ + +.popup { + @include ie8{ + width: 100%; + } +} +.popup .popup-content{ + margin:0.5em; + width: 95%; + float: left; +} + +.popup .popup-close { + display:inline-block; + overflow:hidden; + float:right; + padding:10px 0; +} + +#other-country-notice{ + display:none; +} + +#link_box { + position:absolute; + z-index:999; + display:none; +} + + diff --git a/app/assets/stylesheets/responsive/_popups_style.scss b/app/assets/stylesheets/responsive/_popups_style.scss new file mode 100644 index 000000000..dd6af7ba5 --- /dev/null +++ b/app/assets/stylesheets/responsive/_popups_style.scss @@ -0,0 +1,57 @@ +/* Styles for popup messages */ +.popup { + background-color:#D5FFD8; + border:solid 3px #16C132; + z-index:2000; + overflow:auto; + text-align:center; + margin-top:2px; +} + +.popup p { + margin: 0; +} + +#everypage h2,#everypage h3 { + margin:0.5em 0; +} + +.popup .popup-close { + color:#FFF; + text-decoration:none; + border-radius:2px; + -moz-border-radius:2px; + width:15px; + height:15px; + cursor:pointer; + background: image-url('small-green-cross.png') no-repeat 0; + border:solid 0 #FFF; + text-indent:-999px; + overflow:hidden; + float:right; +} + +/* Box that appears when you click the link icon in a request thread */ +#link_box { + text-align:left; + background-color:#FFF; + opacity:0.9; + border-radius:6px; + -moz-border-radius:6px; + border:1px solid #444; + padding:5px; +} + +#link_box .close-button { + background-color:#444; + margin-left:15px; + padding:0; +} + +a.link_to_this { + display:inline-block; + width:20px; + letter-spacing:-1000em; + overflow:hidden; + background:image-url('link-icon.png') no-repeat; +} diff --git a/app/assets/stylesheets/responsive/_print_layout.scss b/app/assets/stylesheets/responsive/_print_layout.scss new file mode 100644 index 000000000..514d22f83 --- /dev/null +++ b/app/assets/stylesheets/responsive/_print_layout.scss @@ -0,0 +1,45 @@ +div#content, div#left_column, div.entirebody div#wrapper { + width: 100%; + margin: 0; + float: none; +} + +div#content { + padding-right: 0; + width: 96%; +} + +#wrapper { + width: auto; + padding: 0; + +} + +p.event_actions, +div#after_actions, +#right_column, +#banner, +.admin .navbar, +#header_right, +#describe_state_form_1, +#describe_state_form_2, +.attachment_image, +#footer { + display: none; +} + +p#request_status { + page-break-after: avoid; +} +div.correspondence { + page-break-before: avoid; +} + +#other-country-notice { + display: none; +} + +.not-for-print { + display: none !IMPORTANT; +} + diff --git a/app/assets/stylesheets/responsive/_print_style.scss b/app/assets/stylesheets/responsive/_print_style.scss new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/app/assets/stylesheets/responsive/_print_style.scss diff --git a/app/assets/stylesheets/responsive/_public_body_layout.scss b/app/assets/stylesheets/responsive/_public_body_layout.scss new file mode 100644 index 000000000..ac02b1c10 --- /dev/null +++ b/app/assets/stylesheets/responsive/_public_body_layout.scss @@ -0,0 +1,5 @@ +/* Layout for public body pages */ + +#foi_results_section { + @include grid-column(12); +} diff --git a/app/assets/stylesheets/responsive/_public_body_stats_layout.scss b/app/assets/stylesheets/responsive/_public_body_stats_layout.scss new file mode 100644 index 000000000..81e784094 --- /dev/null +++ b/app/assets/stylesheets/responsive/_public_body_stats_layout.scss @@ -0,0 +1,24 @@ +/* Layout for public body stats page */ +.public-body-ranking { + margin-bottom: 40px; +} + +.public-body-ranking-title { + margin-top: 25px; + margin-bottom: 10px; +} + +.public-body-ranking table { + margin-top: 20px; + margin-left: 30px; +} + +.public-body-ranking td, th { + border: 0px; + padding: 5px; + padding-right: 20px; +} + +.public-body-ranking td.statistic { + text-align: center; +} diff --git a/app/assets/stylesheets/responsive/_public_body_stats_style.scss b/app/assets/stylesheets/responsive/_public_body_stats_style.scss new file mode 100644 index 000000000..79a379af1 --- /dev/null +++ b/app/assets/stylesheets/responsive/_public_body_stats_style.scss @@ -0,0 +1,11 @@ +/* Style for public body stats page */ +.public-body-ranking .axisLabels { + /* Justification for using !important here: the axis label color is + set in the style attribute in Flot's Javascript to the same + colour as the grid background. Changing this requires quite + invasive changes to the Javascript, and is likely to be + irrelevant in the next version of Flot anyway, which will have + core support for axis labels. So, just use !important to make + the axes black rather than transparent grey for the moment: */ + color: #000 !important; +} diff --git a/app/assets/stylesheets/responsive/_public_body_style.scss b/app/assets/stylesheets/responsive/_public_body_style.scss new file mode 100644 index 000000000..240d92618 --- /dev/null +++ b/app/assets/stylesheets/responsive/_public_body_style.scss @@ -0,0 +1,14 @@ +/* Style for public body pages */ +.public-body-name-prefix { + color:#888; + font-size: 1.3em; + position: relative; + top: 1em; +} + +#follow_count { + font-weight: bold; + font-size: 3em; + position: relative; + top: 0.25em; +} diff --git a/app/assets/stylesheets/responsive/_request_layout.scss b/app/assets/stylesheets/responsive/_request_layout.scss new file mode 100644 index 000000000..ec2d0d149 --- /dev/null +++ b/app/assets/stylesheets/responsive/_request_layout.scss @@ -0,0 +1,50 @@ +/* Layout for request page */ + + +.gone_postal_help{ + @include grid-column(12); +} + +#describe_state_form_1 { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(9); + } +} + +#show_response_view { + @include grid-row(); + + > h2 { + @include grid-column($columns: 12, $collapse: true); + } + + .correspondence { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(9); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 41.625em; + } + } + } + + + #followup { + @include grid-column(12, $collapse: true); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column(8, $collapse: true); + } + } +} + + +/* Event history details */ +#request_details { + table { + margin-bottom:1em; + } +} diff --git a/app/assets/stylesheets/responsive/_request_style.scss b/app/assets/stylesheets/responsive/_request_style.scss new file mode 100644 index 000000000..c33688793 --- /dev/null +++ b/app/assets/stylesheets/responsive/_request_style.scss @@ -0,0 +1,112 @@ +/* Style for request page */ + +div.correspondence { + border: 1px solid #ccc; + margin: 0 0 1em; + padding: 0.5em 1em 0 0.5em; + + h2 { + text-align:right; + font-size:1em; + } +} + +div.comment_in_request { + border: 1px dotted #ccc; + margin:0 0 1em 3em; + padding:0 0.5em; + + h2 { + font-size:1em; + } + p { + font-size: 0.9em; + } +} + +.event_actions { + text-align:right; + line-height: 1em; + margin-bottom: 1em; +} + +.correspondence_text,.comment_in_request_text { + margin:0 1.2em 0 0.9em; +} + +.user_photo_on_request img { + width:48px; + height:48px; + float:left; + vertical-align:middle; + margin-right:0.5em; +} + +.user_photo_on_comment img { + width:36px; + height:36px; + float:left; + vertical-align:middle; + margin-top: 0.5em; + margin-right:0.5em; +} + +a img.attachment_image { + float:left; + border:0; + vertical-align:middle; + margin:0 0.2em 0.2em 0; +} + +.attachments hr.top { + clear:both; + margin:0 0 1em; +} + +.attachments hr.bottom { + clear:both; + margin:1em 0 0; +} + +.describe_state_form,#other_recipients { + + border-radius:3px; + -moz-border-radius:3px; + margin:1em 0; + padding:0.5em 1em; +} + +.describe_state_form { + hr { + margin-top: 1em; + &+p { + margin-top: 1em; + } + } +} + +#follow_box .feed_link { + text-align: center; +} + + +/* Event history details */ + +#request_details { + + table { + border-collapse: collapse; + } + + td,th { + border:solid 1px #000; + } + + tr.odd { + background-color:#bbb; + } + + tr.even { + background-color:#ddd; + } +} diff --git a/app/assets/stylesheets/responsive/_search_layout.scss b/app/assets/stylesheets/responsive/_search_layout.scss new file mode 100644 index 000000000..48dd0c6a7 --- /dev/null +++ b/app/assets/stylesheets/responsive/_search_layout.scss @@ -0,0 +1,59 @@ +/* Layout for search (and filters on request list)*/ +/* These pages use grid-columns, so are contained in a grid-row */ +#general_search, +#general_search_redirect, +#public_body_show, +#request_list { + @include grid-row($behavior: nest); +} + + +#filter_requests_form, #search_form, #filter_form { + + label { + display:inline; + float:none; + padding-right:5px; + } + + label.title { + @include respond-min( $main_menu-mobile_menu_cutoff ){ + display:inline-block; + float:none; + width:110px; + } + } + + .filter-request-types { + display: inline-block; + line-height: 1.5em; + } + + #requests-subfilters div { + margin-top:10px; + } + + .list-filter-item{ + margin-bottom:0.5em; + } +} + + +.results_section { + @include grid-column(12); + .results-block:last-child { + border-bottom: none; + padding-bottom:0; + } + .results_section { + @include grid-column(12, $collapse:true); + } +} + +#advanced-search input[type=text] { + width:50%; +} + +#advanced-search-tips{ + @include grid-column(12); +} diff --git a/app/assets/stylesheets/responsive/_search_style.scss b/app/assets/stylesheets/responsive/_search_style.scss new file mode 100644 index 000000000..dfd40fc67 --- /dev/null +++ b/app/assets/stylesheets/responsive/_search_style.scss @@ -0,0 +1,54 @@ +/* Style for search (and filters on request list) */ +.user_photo_on_search img { + width:48px; + height:48px; + vertical-align:middle; + border:1px solid #ddd; + margin-right:5px; + padding:2px; + float: left; +} + +input.use-datepicker[type=text] { + width: 130px; + background:image-url('calendar.png') no-repeat 100px 5px; +} + +#ui-datepicker-div.ui-widget { + font-family:Arial, sans-serif; +} + +#ui-datepicker-div .ui-datepicker-header,#ui-datepicker-div .ui-widget-header { + background:none; + border:solid 0 #FFF; + color:#444; + font-size:17px; + font-weight:normal; + line-height:1.5em !important; +} + +#ui-datepicker-div { + .ui-datepicker-prev, .ui-datepicker-next { + margin-top:2px; + opacity:0.5; + } + .ui-datepicker-prev-hover { + left:2px; + top:2px; + border:none; + background:#FFF; + cursor:pointer; + opacity:1; + } + + .ui-datepicker-next-hover { + right:2px; + top:2px; + border:none; + background:#FFF; + cursor:pointer; + opacity:1; + } +} + + diff --git a/app/assets/stylesheets/responsive/_settings.scss b/app/assets/stylesheets/responsive/_settings.scss new file mode 100644 index 000000000..c52451b46 --- /dev/null +++ b/app/assets/stylesheets/responsive/_settings.scss @@ -0,0 +1,5 @@ +$main_menu-mobile_menu_cutoff: 58em; +$row-width: 64em; +$body-font-family: "Helvetica Neue", Arial, Helvetica, Helmet, Freesans, sans-serif; +$form-label-font-color: #333333; +$base-font-size: 16px; diff --git a/app/assets/stylesheets/responsive/_signin_layout.scss b/app/assets/stylesheets/responsive/_signin_layout.scss new file mode 100644 index 000000000..44999d31b --- /dev/null +++ b/app/assets/stylesheets/responsive/_signin_layout.scss @@ -0,0 +1,82 @@ +/* Signin layout */ + +#sign_in_reason { + @include grid-column(12); +} +#left_half { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:5,$float:left); + @include ie8{ + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 22.313em; + } + } +} + +#right_half { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:5,$float:right); + @include ie8{ + padding-left: 0.9375em; + } + @include lte-ie7 { + width: 22.313em; + } + } +} + +#middle_strip { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:2,$float:left); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + @include lte-ie7 { + width: 7.438em; + } + } +} + +#sign_together{ + @include grid-row($behavior: nest); +} + +#sign_alone{ + @include grid-row($behavior: nest); + #signin { + @include grid-column(12); + @include respond-min( $main_menu-mobile_menu_cutoff ){ + @include grid-column($columns:6,$push:3); + @include ie8{ + padding-left: 0.9375em; + padding-right: 0.9375em; + } + } + } + +} + +#signup, #signin { +margin-top:20px; + + .form_checkbox { + input{ + margin-bottom: 0; + } + label { + font-size:1em; + display:inline; + margin-right: 0; + } + } +} + +#sign_in_reason { + margin-top: 0.5em; +} diff --git a/app/assets/stylesheets/responsive/_signin_style.scss b/app/assets/stylesheets/responsive/_signin_style.scss new file mode 100644 index 000000000..2bd2802b4 --- /dev/null +++ b/app/assets/stylesheets/responsive/_signin_style.scss @@ -0,0 +1,28 @@ +/* Signin styles */ +#signup, #signin { + input[type=text], + input[type=password] { + width: 100%; + } +} + +#middle_strip { + text-align:center; + position: relative; + @include respond-min( $main_menu-mobile_menu_cutoff ){ + top: 3em; + } + font-size:1.2em; +} + +p#sign_in_reason, p#superuser_message { + font-size:2em; + font-weight:bold; + line-height:1em; +} + +p#superuser_message { + font-size:1.2em; +} + + diff --git a/app/assets/stylesheets/responsive/_user_layout.scss b/app/assets/stylesheets/responsive/_user_layout.scss new file mode 100644 index 000000000..8087f978c --- /dev/null +++ b/app/assets/stylesheets/responsive/_user_layout.scss @@ -0,0 +1,2 @@ +/* Layout for user pages */ + diff --git a/app/assets/stylesheets/responsive/_user_style.scss b/app/assets/stylesheets/responsive/_user_style.scss new file mode 100644 index 000000000..31e7e6bc0 --- /dev/null +++ b/app/assets/stylesheets/responsive/_user_style.scss @@ -0,0 +1,36 @@ +/* Style for user pages */ + +#set_photo { + background:image-url('defaultprofilepic.png'); +} + +#user_public_banned { + background-color:#d0d0d0; +} + +#user_photo_on_profile { + img, #set_photo { + width:96px; + height:96px; + float:left; + vertical-align:middle; + text-align:center; + margin-right:0.5em; + } +} + +div.user_about_me { + overflow:auto; + margin:1em 1.5em; + padding:0 0.5em; +} + +#user_public_banned { + + padding:0.5em 1em; + + .details { + font-size:0.9em; + font-style:italic; + } +} diff --git a/app/assets/stylesheets/responsive/_utils.css b/app/assets/stylesheets/responsive/_utils.css new file mode 100644 index 000000000..68884fa7a --- /dev/null +++ b/app/assets/stylesheets/responsive/_utils.css @@ -0,0 +1,35 @@ +$fix-mqs: false !default; + +@mixin respond-min($width) { + // If we're outputting for a fixed media query set... + @if $fix-mqs { + // ...and if we should apply these rules... + @if $fix-mqs >= $width { + // ...output the content the user gave us. + @content; + } + } + @else { + // Otherwise, output it using a regular media query + @media(min-width: $width) { + @content; + } + } +} + +$ie8: false !default; +$lte-ie7: false !default; + +@mixin ie8 { + // Only use this content if we're dealing with IE8 + @if $ie8 { + @content; + } +} + +@mixin lte-ie7 { + // Only use this content if we're dealing with oldest IE (<= 7) + @if $lte-ie7 { + @content; + } +} diff --git a/app/assets/stylesheets/responsive/all.css b/app/assets/stylesheets/responsive/all.css new file mode 100644 index 000000000..4c935bed3 --- /dev/null +++ b/app/assets/stylesheets/responsive/all.css @@ -0,0 +1,68 @@ +@import "foundation/functions"; +@import "_settings"; + +@import "foundation/components/grid"; +@import "foundation/components/block-grid"; +@import "foundation/components/forms"; + + +// Our own style components +@import "_utils"; + +// Global styles +@import "_global_layout"; +@import "_global_style"; + +@import "_header_layout"; +@import "_header_style"; + +@import "_popups_layout"; +@import "_popups_style"; + +@import "_footer_layout"; +@import "_footer_style"; + +@import "_lists_layout"; +@import "_lists_style"; + +// Styles that are only used on particular pages +@import "_attachments_layout"; +@import "_attachments_style"; + +@import "_blog_layout"; +@import "_blog_style"; + +@import "_categorization_game_style"; +@import "_categorization_game_layout"; + +@import "_contact_style"; +@import "_contact_layout"; + +@import "_frontpage_layout"; +@import "_frontpage_style"; + +@import "_help_style"; +@import "_help_layout"; + +@import "_new_request_layout"; +@import "_new_request_style"; + +@import "_search_layout"; +@import "_search_style"; + +@import "_request_layout"; +@import "_request_style"; + +@import "_signin_layout"; +@import "_signin_style"; + +@import "_public_body_layout"; +@import "_public_body_style"; + +@import "_public_body_stats_layout"; +@import "_public_body_stats_style"; + +@import "_user_style"; +@import "_user_layout"; + +@import "custom"; diff --git a/app/assets/stylesheets/responsive/application-ie8.css b/app/assets/stylesheets/responsive/application-ie8.css new file mode 100644 index 000000000..38cdf3b47 --- /dev/null +++ b/app/assets/stylesheets/responsive/application-ie8.css @@ -0,0 +1,7 @@ +/* ... +*= require_self +*= require normalize +*= require responsive/ie8 +*= require jquery.ui.datepicker +*= require jquery.ui.tabs +*/ diff --git a/app/assets/stylesheets/responsive/application-lte-ie7.css b/app/assets/stylesheets/responsive/application-lte-ie7.css new file mode 100644 index 000000000..5b8802cd5 --- /dev/null +++ b/app/assets/stylesheets/responsive/application-lte-ie7.css @@ -0,0 +1,7 @@ +/* ... +*= require_self +*= require normalize +*= require responsive/lte-ie7 +*= require jquery.ui.datepicker +*= require jquery.ui.tabs +*/ diff --git a/app/assets/stylesheets/responsive/application.css b/app/assets/stylesheets/responsive/application.css new file mode 100644 index 000000000..0b5aa8d66 --- /dev/null +++ b/app/assets/stylesheets/responsive/application.css @@ -0,0 +1,7 @@ +/* ... +*= require_self +*= require normalize +*= require responsive/main +*= require jquery.ui.datepicker +*= require jquery.ui.tabs +*/ diff --git a/app/assets/stylesheets/responsive/custom.css b/app/assets/stylesheets/responsive/custom.css new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/app/assets/stylesheets/responsive/custom.css diff --git a/app/assets/stylesheets/responsive/ie8.scss b/app/assets/stylesheets/responsive/ie8.scss new file mode 100644 index 000000000..32d545c47 --- /dev/null +++ b/app/assets/stylesheets/responsive/ie8.scss @@ -0,0 +1,3 @@ +$ie8: true; +$fix-mqs: 58em; +@import 'all'; diff --git a/app/assets/stylesheets/responsive/lte-ie7.scss b/app/assets/stylesheets/responsive/lte-ie7.scss new file mode 100644 index 000000000..b1519d6f0 --- /dev/null +++ b/app/assets/stylesheets/responsive/lte-ie7.scss @@ -0,0 +1,4 @@ +$lte-ie7: true; +$ie8: true; +$fix-mqs: 58em; +@import 'all'; diff --git a/app/assets/stylesheets/responsive/main.scss b/app/assets/stylesheets/responsive/main.scss new file mode 100644 index 000000000..ff4314781 --- /dev/null +++ b/app/assets/stylesheets/responsive/main.scss @@ -0,0 +1 @@ +@import 'all'; diff --git a/app/assets/stylesheets/responsive/print.scss b/app/assets/stylesheets/responsive/print.scss new file mode 100644 index 000000000..b643c11ff --- /dev/null +++ b/app/assets/stylesheets/responsive/print.scss @@ -0,0 +1,2 @@ +@import "_print_layout"; +@import "_print_style"; diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 9cb344f14..03ec270ee 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -60,6 +60,34 @@ class PublicBody < ActiveRecord::Base translates :name, :short_name, :request_email, :url_name, :notes, :first_letter, :publication_scheme + # Public: Search for Public Bodies whose name, short_name, request_email or + # tags contain the given query + # + # query - String to query the searchable fields + # locale - String to specify the language of the seach query + # (default: I18n.locale) + # + # Returns an ActiveRecord::Relation + def self.search(query, locale = I18n.locale) + locale = locale.to_s.gsub('-', '_') # Clean the locale string + + sql = <<-SQL + ( + lower(public_body_translations.name) like lower('%'||?||'%') + OR lower(public_body_translations.short_name) like lower('%'||?||'%') + OR lower(public_body_translations.request_email) like lower('%'||?||'%' ) + OR lower(has_tag_string_tags.name) like lower('%'||?||'%' ) + ) + AND has_tag_string_tags.model_id = public_bodies.id + AND has_tag_string_tags.model = 'PublicBody' + AND (public_body_translations.locale = ?) + SQL + + PublicBody.joins(:translations, :tags). + where([sql, query, query, query, query, locale]). + uniq + end + # Convenience methods for creating/editing translations via forms def find_translation_by_locale(locale) self.translations.find_by_locale(locale) diff --git a/app/views/comment/_single_comment.html.erb b/app/views/comment/_single_comment.html.erb index a6d234b34..cdcb3b85f 100644 --- a/app/views/comment/_single_comment.html.erb +++ b/app/views/comment/_single_comment.html.erb @@ -9,9 +9,8 @@ <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %> <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>) </h2> - <div class="comment_in_request_text"> + <div class="comment_in_request_text"> <p> - <%= image_tag "quote-marks.png", :class => "comment_quote" %> <%= comment.get_body_for_html_display %> </p> </div> diff --git a/app/views/general/_responsive_credits.html.erb b/app/views/general/_responsive_credits.html.erb new file mode 100644 index 000000000..01a5df13a --- /dev/null +++ b/app/views/general/_responsive_credits.html.erb @@ -0,0 +1,2 @@ +<li><%= _('Powered by <a href="http://www.alaveteli.org/">Alaveteli</a>') %> +</li> diff --git a/app/views/general/_responsive_footer.html.erb b/app/views/general/_responsive_footer.html.erb new file mode 100644 index 000000000..2967872f1 --- /dev/null +++ b/app/views/general/_responsive_footer.html.erb @@ -0,0 +1,15 @@ +<div class="footer" id="footer"> + <div id="footer-nav"> + <ul> + <li><%= link_to image_tag('logo.png'), frontpage_path, :id => 'logo' %></li> + <li><%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_path %></li> + <% unless AlaveteliConfiguration::twitter_username.blank? %> + <li><a href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>"><%= _("Follow us on twitter") %></a></li> + <% end %> + + <%= render :partial => 'general/responsive_credits' %> + + </ul> + + </div> +</div> diff --git a/app/views/general/_responsive_header.html.erb b/app/views/general/_responsive_header.html.erb new file mode 100644 index 000000000..3a2994b4d --- /dev/null +++ b/app/views/general/_responsive_header.html.erb @@ -0,0 +1,31 @@ +<div id="banner"> + <div id="banner_inner"> + <div id="banner_content"> + <div id="logo_wrapper"> + <%= link_to image_tag('logo.png'), frontpage_path, :id => 'logo' %> + </div> + <div class="rsp_menu_button"> + <a href="#banner" class="open"> <i class="icon-menu"></i> Menu </a> + <a href="#" class="close"> <i class="icon-menu"></i> Close </a> + </div> + <%= render :partial => 'general/locale_switcher' %> + <% if ! (controller.action_name == 'signin' or controller.action_name == 'signup') %> + <div id="logged_in_bar"> + <div id="logged_in_links"> + <% if @user %> + <span class="greeting"><%= _('Hello, {{username}}!', :username => @user.name) %></span> + <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %> + <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %> + <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %> + <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %> + <% else %> + <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %> + <% end %> + </div> + </div> + <% end %> + </div> + <%= render :partial => 'general/responsive_topnav' %> + </div> +</div> + diff --git a/app/views/general/_responsive_stylesheets.html.erb b/app/views/general/_responsive_stylesheets.html.erb new file mode 100644 index 000000000..e3c3660c4 --- /dev/null +++ b/app/views/general/_responsive_stylesheets.html.erb @@ -0,0 +1,11 @@ +<!--[if LTE IE 7]> +<%= stylesheet_link_tag 'responsive/application-lte-ie7', :title => "Main", :rel => "stylesheet", :media => "all" %> +<![endif]--> + +<!--[if IE 8]> +<%= stylesheet_link_tag 'responsive/application-ie8', :title => "Main", :rel => "stylesheet", :media => "all" %> +<![endif]--> + +<!--[if GT IE 8]><!--> +<%= stylesheet_link_tag 'responsive/application', :title => "Main", :rel => "stylesheet", :media => "all" %> +<!--<![endif]--> diff --git a/app/views/general/_responsive_topnav.html.erb b/app/views/general/_responsive_topnav.html.erb new file mode 100644 index 000000000..e726c17f4 --- /dev/null +++ b/app/views/general/_responsive_topnav.html.erb @@ -0,0 +1,32 @@ +<div id="topnav"> + <ul id="navigation"> + + <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"> + <%= link_to _("Make a request"), select_authority_path, :id => 'make-request-link' %> + </li> + + <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"> + <%= link_to _("View requests"), request_list_successful_path %> + </li> + + <li class="<%= 'selected' if params[:controller] == 'public_body' %>"> + <%= link_to _("View authorities"), list_public_bodies_default_path %> + </li> + + <% unless AlaveteliConfiguration::blog_feed.empty? %> + <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_path %></li> + <% end %> + <li class="<%= 'selected' if params[:controller] == 'help' %>"> + <%= link_to _("Help"), help_about_path %> + </li> + + <li id="navigation_search"> + <form id="navigation_search_form" method="post" action="<%= search_redirect_path %>"> + <label for="navigation_search_button"> + <img src="/assets/search.png" alt="Search:"> + </label> + <%= text_field_tag 'query', params[:query], { :id => "navigation_search_button", :title => "type your search term here" } %> + </form> + </li> + </ul> +</div> diff --git a/app/views/general/_stylesheet_includes.html.erb b/app/views/general/_stylesheet_includes.html.erb index f76c146de..ac7c37217 100644 --- a/app/views/general/_stylesheet_includes.html.erb +++ b/app/views/general/_stylesheet_includes.html.erb @@ -1,22 +1,40 @@ -<%- if @render_to_file %> - <style> - <%= Rails.application.assets["main.css"].to_s %> - <%= Rails.application.assets["print.css"].to_s %> - </style> -<%- else %> - <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet", :media => "all" %> - <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %> - <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print" %> - <% if !params[:print_stylesheet].nil? %> - <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all" %> +<% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <%- if @render_to_file %> + <style> + <%= Rails.application.assets["responsive/application.css"].to_s %> + <%= Rails.application.assets["responsive/print.css"].to_s %> + </style> + <%- else %> + <%= render :partial => 'general/responsive_stylesheets' %> + <%= stylesheet_link_tag 'responsive/print', :rel => "stylesheet", :media => "print" %> + <% if !params[:print_stylesheet].nil? %> + <%= stylesheet_link_tag 'responsive/print', :rel => "stylesheet", :media => "all" %> + <% end %> + <% if AlaveteliConfiguration::force_registration_on_new_request %> + <%= stylesheet_link_tag 'fancybox.css', :rel => "stylesheet" %> + <% end %> <% end %> - <!--[if LT IE 7]> - <%= stylesheet_link_tag 'ie6.css' %> - <![endif]--> - <!--[if LT IE 8]> - <%= stylesheet_link_tag 'ie7.css' %> - <![endif]--> - <% if AlaveteliConfiguration::force_registration_on_new_request %> +<% else %> + <%- if @render_to_file %> + <style> + <%= Rails.application.assets["main.css"].to_s %> + <%= Rails.application.assets["print.css"].to_s %> + </style> + <%- else %> + <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet", :media => "all" %> + <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %> + <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print" %> + <% if !params[:print_stylesheet].nil? %> + <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all" %> + <% end %> + <!--[if LT IE 7]> + <%= stylesheet_link_tag 'ie6.css' %> + <![endif]--> + <!--[if LT IE 8]> + <%= stylesheet_link_tag 'ie7.css' %> + <![endif]--> + <% if AlaveteliConfiguration::force_registration_on_new_request %> <%= stylesheet_link_tag 'fancybox.css', :rel => "stylesheet" %> + <% end %> <% end %> <% end %> diff --git a/app/views/general/blog.html.erb b/app/views/general/blog.html.erb index b81989ca8..5dda7ab74 100644 --- a/app/views/general/blog.html.erb +++ b/app/views/general/blog.html.erb @@ -1,21 +1,5 @@ <% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %> -<% if !@twitter_user.empty? %> -<div id="right_column"> - <div class="act_link"> - <h2><%= _("Stay up to date") %></h2> - <%= image_tag "twitter-16.png", :alt => "twitter icon", :class => "twitter-icon" %> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/> - <%= image_tag "feed-16.png", :alt => "RSS icon" %> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a> - </div> - <% if AlaveteliConfiguration::twitter_widget_id %> - <div id="twitter"> - <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>" data-widget-id="<%= AlaveteliConfiguration::twitter_widget_id %>">Tweets by @<%= AlaveteliConfiguration::twitter_username %></a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <% end %> -</div> -<% end %> - <div id="left_column"> <h1><%=@title %></h1> @@ -42,3 +26,18 @@ </div> </div> +<% if !@twitter_user.empty? %> +<div id="right_column"> + <div class="act_link"> + <h2><%= _("Stay up to date") %></h2> + <%= image_tag "twitter-16.png", :alt => "twitter icon", :class => "twitter-icon" %> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/> + <%= image_tag "feed-16.png", :alt => "RSS icon" %> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a> + </div> + <% if AlaveteliConfiguration::twitter_widget_id %> + <div id="twitter"> + <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>" data-widget-id="<%= AlaveteliConfiguration::twitter_widget_id %>">Tweets by @<%= AlaveteliConfiguration::twitter_username %></a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <% end %> +</div> +<% end %> diff --git a/app/views/general/search.html.erb b/app/views/general/search.html.erb index 45268d7f0..3914a2f30 100644 --- a/app/views/general/search.html.erb +++ b/app/views/general/search.html.erb @@ -136,15 +136,18 @@ <div style="clear:both;"></div> <% if @total_hits == 0 %> + <div class="results_section"> <h2><%=@title %></h2> <% if @spelling_correction %> <p id="did_you_mean"><%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction)) %></p> <% end %> + </div> <% end %> <% if not @query.nil? %> - <div class="results_section"> - <% if @xapian_bodies_hits > 0 %> + + <% if @xapian_bodies_hits > 0 %> + <div class="results_section"> <% if @xapian_bodies_hits == 1 && @page == 1 %> <h2 class="publicbody_results"><%= _('One public authority found') %></h2> <% else %> @@ -158,13 +161,13 @@ </div> <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %> - <% elsif @variety_postfix == 'bodies' %> - <p><%= raw(_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add one</a>.', :browse_url => list_public_bodies_default_path.html_safe, :add_url => (help_requesting_path + '#missing_body').html_safe)) %></p> - <% end %> - </div> + </div> + <% elsif @variety_postfix == 'bodies' %> + <p><%= raw(_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add one</a>.', :browse_url => list_public_bodies_default_path.html_safe, :add_url => (help_requesting_path + '#missing_body').html_safe)) %></p> + <% end %> - <div class="results_section"> - <% if @xapian_users_hits > 0 %> + <% if @xapian_users_hits > 0 %> + <div class="results_section"> <% if @xapian_users_hits == 1 && @page == 1 %> <h2 class="person_results"><%= _("One person found") %></h2> <% else %> @@ -178,11 +181,12 @@ </div> <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %> - <% end %> - </div> + </div> + <% end %> - <div class="results_section"> - <% if @xapian_requests_hits > 0 %> + + <% if @xapian_requests_hits > 0 %> + <div class="results_section"> <% if @xapian_requests_hits == 1 && @page == 1 %> <h2 class="foi_results"><%= _("One FOI request found") %></h2> <% else %> @@ -196,8 +200,8 @@ </div> <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> - <% end %> - </div> + </div> + <% end %> <% end %> <% if @advanced %> diff --git a/app/views/info_request_batch/show.html.erb b/app/views/info_request_batch/show.html.erb index 2c7e42072..8bb834b3c 100644 --- a/app/views/info_request_batch/show.html.erb +++ b/app/views/info_request_batch/show.html.erb @@ -1,25 +1,29 @@ <% @title = _("{{title}} - a batch request", :title => @info_request_batch.title) %> -<h1><%= @title %></h1> -<% if @info_request_batch.sent_at %> - <%= n_('Sent to one authority by {{info_request_user}} on {{date}}.', 'Sent to {{authority_count}} authorities by {{info_request_user}} on {{date}}.', @info_request_batch.info_requests.size, :authority_count=> @info_request_batch.info_requests.size, :info_request_user => user_link(@info_request_batch.user), :date => simple_date(@info_request_batch.sent_at)) %> - <div class="results_section"> - <div class="results_block"> - <% @info_requests.each do |info_request| %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => info_request.last_event_forming_initial_request } %> - <% end %> - </div> - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.info_requests.visible.count) %> +<div class="info_request_batch_intro"> + <h1><%= @title %></h1> + <% if @info_request_batch.sent_at %> + <%= n_('Sent to one authority by {{info_request_user}} on {{date}}.', 'Sent to {{authority_count}} authorities by {{info_request_user}} on {{date}}.', @info_request_batch.info_requests.size, :authority_count=> @info_request_batch.info_requests.size, :info_request_user => user_link(@info_request_batch.user), :date => simple_date(@info_request_batch.sent_at)) %> + + </div> + <div class="results_section"> + <div class="results_block"> + <% @info_requests.each do |info_request| %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => info_request.last_event_forming_initial_request } %> + <% end %> + </div> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.info_requests.visible.count) %> </div> <% else %> <%= _('Created by {{info_request_user}} on {{date}}.', :info_request_user => user_link(@info_request_batch.user), :date => simple_date(@info_request_batch.created_at)) %> - <%= _('Requests will be sent to the following bodies:') %> - <div class="results_section"> - <div class="results_block"> - <%= render :partial => 'public_body/body_listing', :locals => { :public_bodies => @public_bodies } %> - </div> - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.public_bodies.count) %> - </div> + <%= _('Requests will be sent to the following bodies:') %> + </div> + <div class="results_section"> + <div class="results_block"> +<%= render :partial => 'public_body/body_listing', :locals => { :public_bodies => @public_bodies } %> + </div> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.public_bodies.count) %> + </div> <% end %> diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 93b3c3698..50abc59c3 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -40,7 +40,9 @@ <% if @no_crawl %> <meta name="robots" content="noindex, nofollow"> <% end %> - + <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <% end %> <%= render :partial => 'general/before_head_end' %> </head> <body class="<%= 'front' if params[:action] == 'frontpage' %>"> @@ -50,7 +52,7 @@ $(document).ready(function() { $("#make-request-link").fancybox({ 'modal': false, - 'width': 920, + 'width': 950, 'height': 400, 'type': 'iframe', 'href': '/<%= FastGettext.locale %>/profile/sign_in?modal=1', @@ -84,7 +86,11 @@ </span> <span class="popup-close"><a href="#top" ><%= _('Close') %></a></span> </div> - <%= render :partial => 'general/header' %> + <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <%= render :partial => 'general/responsive_header' %> + <% else %> + <%= render :partial => 'general/header' %> + <% end %> <div id="wrapper"> <div id="content"> <% if flash[:notice] %> @@ -100,8 +106,11 @@ <div style="clear:both"></div> </div> </div> - - <%= render :partial => 'general/footer' %> + <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <%= render :partial => 'general/responsive_footer' %> + <% else %> + <%= render :partial => 'general/footer' %> + <% end %> </div> <div id="link_box"><span class="close-button">X</span> diff --git a/app/views/layouts/no_chrome.html.erb b/app/views/layouts/no_chrome.html.erb index a4278ab24..f3ca9ef9e 100644 --- a/app/views/layouts/no_chrome.html.erb +++ b/app/views/layouts/no_chrome.html.erb @@ -14,11 +14,15 @@ <%= javascript_include_tag "application" %> - <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet" %> - <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %> - <!--[if LT IE 7]> - <%= stylesheet_link_tag 'ie6', :rel => "stylesheet" %> - <![endif]--> + <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <%= render :partial => 'general/responsive_stylesheets' %> + <% else %> + <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet" %> + <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %> + <!--[if LT IE 7]> + <%= stylesheet_link_tag 'ie6', :rel => "stylesheet" %> + <![endif]--> + <% end %> </head> <body> <div class="entirebody"> diff --git a/app/views/request/_summary_suggestion.html.erb b/app/views/request/_summary_suggestion.html.erb index a5da09cda..74d9c46c5 100644 --- a/app/views/request/_summary_suggestion.html.erb +++ b/app/views/request/_summary_suggestion.html.erb @@ -1,5 +1,5 @@ <% if @info_request.law_used == 'eir' %> - <%= _("'Pollution levels over time for the River Tyne'") %> + <%= _("'Pollution levels over time for the River Tyne'") -%> <% else %> - <%= _("'Crime statistics by ward level for Wales'") %> + <%= _("'Crime statistics by ward level for Wales'") -%> <% end %> diff --git a/app/views/request/_view_html_prefix.html.erb b/app/views/request/_view_html_prefix.html.erb index 63fac7c6d..d21f234b9 100644 --- a/app/views/request/_view_html_prefix.html.erb +++ b/app/views/request/_view_html_prefix.html.erb @@ -6,7 +6,7 @@ <%=link_to _("Download original attachment"), @attachment_url %> <br>(<%=h @attachment.name_of_content_type %>) </div> - <%= _('This is an HTML version of an attachment to the Freedom of Information request')%> - '<%=link_to h(@info_request.title), incoming_message_path(@incoming_message)%>'. + <p class="view_html_description"><%= _('This is an HTML version of an attachment to the Freedom of Information request')%> + '<%=link_to h(@info_request.title), incoming_message_path(@incoming_message)%>'.</p> </div> diff --git a/app/views/request/_view_html_stylesheet.html.erb b/app/views/request/_view_html_stylesheet.html.erb index 125ce66ec..6746cf71b 100644 --- a/app/views/request/_view_html_stylesheet.html.erb +++ b/app/views/request/_view_html_stylesheet.html.erb @@ -1 +1,6 @@ -<link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css"> +<% if AlaveteliConfiguration::responsive_styling || params[:responsive] %> + <%= render :partial => 'general/responsive_stylesheets' %> +<% else %> + <link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css"> + +<% end %> diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb index 83abdb184..ed072cf64 100644 --- a/app/views/request/select_authority.html.erb +++ b/app/views/request/select_authority.html.erb @@ -18,6 +18,7 @@ $("#authority_preview").show(); $(window).scrollTop($("#banner").height()); $("#authority_preview #header_right").hide(); + location.hash = '#header_left'; }); return false; }); diff --git a/app/views/request_game/play.html.erb b/app/views/request_game/play.html.erb index d5aa0d00e..6020bd101 100644 --- a/app/views/request_game/play.html.erb +++ b/app/views/request_game/play.html.erb @@ -27,20 +27,21 @@ <% end %> </table> </div> -<h2><%= _("Play the request categorisation game!")%></h2> -<p><%= _("Some people who've made requests haven't let us know whether they were -successful or not. We need <strong>your</strong> help – -choose one of these requests, read it, and let everyone know whether or not the -information has been provided. Everyone'll be exceedingly grateful.")%></p> -<% for info_request in @requests %> - <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> -<% end %> -<p id="game_buttons"> -<%= button_to _('I don\'t like these ones — give me some more!'), categorise_play_url %> -<%= button_to _('I don\'t want to do any more tidying now!'), categorise_stop_url %> -</p> -<p><%= _('Thanks for helping - your work will make it easier for everyone to find successful -responses, and maybe even let us make league tables...')%></p> - +<div id="game"> + <h2><%= _("Play the request categorisation game!")%></h2> + <p><%= _("Some people who've made requests haven't let us know whether they were + successful or not. We need <strong>your</strong> help – + choose one of these requests, read it, and let everyone know whether or not the + information has been provided. Everyone'll be exceedingly grateful.")%></p> + <% for info_request in @requests %> + <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> + <% end %> + <p id="game_buttons"> + <%= button_to _('I don\'t like these ones — give me some more!'), categorise_play_url %> + <%= button_to _('I don\'t want to do any more tidying now!'), categorise_stop_url %> + </p> + <p><%= _('Thanks for helping - your work will make it easier for everyone to find successful + responses, and maybe even let us make league tables...')%></p> +</div> diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb index 8dd8c6b88..ce328b46f 100644 --- a/app/views/user/show.html.erb +++ b/app/views/user/show.html.erb @@ -42,7 +42,7 @@ <% end %> </div> - <div class="header_left"> + <div id="header_left"> <p id="user_photo_on_profile"> <% if @display_user.profile_photo %> <% if @is_you %> |