From 63621aa5268aa5165405c7d12a9d4b951456b2c5 Mon Sep 17 00:00:00 2001 From: Alessandro Cuoghi Date: Sat, 22 Jul 2017 18:32:12 +0200 Subject: [PATCH] Style radio buttons. Added icon inside the table. Adjusted buttons with the same width. Changed position buttons in responsive. Pass scss-lint. --- app/assets/stylesheets/layout.scss | 74 ++++++++++++++++++++++---- app/views/documents/_document.html.erb | 4 +- 2 files changed, 67 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 015abb183..651333613 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2132,16 +2132,70 @@ table { } // 19. Documents -.documents-list{ - table { - border: 0; - } - td { - position: relative; - - &:first-child { - padding-left: $line-height * 1.5; - width: 75%; +.document-form form { + .radio-buttons { + label { + margin-right: $line-height; } } } + +.documents-list { + + table { + border: 0; + } + + td { + position: relative; + + @include breakpoint(small) { + float: left; + width: 100%; + } + + @include breakpoint(medium) { + float: none; + } + + a { + width: 100%; + } + + &:first-child { + padding-left: $line-height * 1.5; + + @include breakpoint(small) { + width: 100%; + } + + @include breakpoint(medium) { + width: 70%; + } + + @include breakpoint(large) { + width: 80%; + } + } + + &:first-child::before { + color: #007bb7; + content: 'G'; + font-family: "icons" !important; + font-size: rem-calc(24); + left: rem-calc(6); + position: absolute; + top: 0; + + @include breakpoint(small) { + padding-top: rem-calc(12); + } + + @include breakpoint(medium) { + padding-top: rem-calc(22); + } + + } + + } +} diff --git a/app/views/documents/_document.html.erb b/app/views/documents/_document.html.erb index 36fbfd378..a33de3bb0 100644 --- a/app/views/documents/_document.html.erb +++ b/app/views/documents/_document.html.erb @@ -1,5 +1,7 @@ - <%= document.title %> + + <%= document.title %> + <%= link_to t('documents.buttons.download_document'), document.attachment.url, target: :blank, class: 'button hollow' %>