summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-03-26 18:17:55 +0100
committerAzul <azul@riseup.net>2016-05-02 08:31:17 -0300
commit65f67e1829666a65a3b354d4d95f9d38aa15a81e (patch)
tree876d346a9b9f7d1576500c920806c3cff2e12a6d /app
parenta0d9fbc4bcbd2f37e8d86d99c2e01753eecb14d7 (diff)
upgrade: fix buttons for bootstrap3
bootstrap3 now requires btn-default if no other btn option is present. download button on home page was too small in german translation
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/leap.scss2
-rw-r--r--app/helpers/link_helper.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss
index 329fc09..8c4d702 100644
--- a/app/assets/stylesheets/leap.scss
+++ b/app/assets/stylesheets/leap.scss
@@ -198,7 +198,7 @@ input, textarea {
}
.download {
a.btn {
- width: 15em;
+ width: 18em;
font-weight: bold;
small {
font-weight: normal;
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb
index ddb063e..b74e1d7 100644
--- a/app/helpers/link_helper.rb
+++ b/app/helpers/link_helper.rb
@@ -39,6 +39,10 @@ module LinkHelper
def btn(*args, &block)
html_options = extract_html_options!(args, &block)
type = Array(html_options.delete(:type))
+ btn_opts = [:default, :primary, :success, :info, :warning, :danger, :link]
+ if (type & btn_opts).blank?
+ type << :default
+ end
type.map! {|t| "btn-#{t}"}
html_options[:class] = concat_classes(html_options[:class], 'btn', type)
args[0] = t(args[0]) if args[0].is_a?(Symbol)