summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2014-05-06 09:35:35 +0200
committerazul <azul@riseup.net>2014-05-06 09:35:35 +0200
commita4131d472329dc6416623691dcc956dc32793638 (patch)
treeba74769a2f0781ccbdd920f6e47f0de7cc7c7661
parent55fcdd3975baf6f6e167ab5164203ab9a2245186 (diff)
parentf1c45566aaa06a1a4b2d2bb1f9b5abb4ab645dab (diff)
Merge pull request #155 from azul/feature/simplify-download-btn
Feature/simplify download btn
-rw-r--r--Gemfile.lock8
-rw-r--r--app/assets/stylesheets/leap.scss61
-rw-r--r--app/views/common/_download_button.html.haml4
-rw-r--r--app/views/common/_download_for_os.html.haml17
-rw-r--r--app/views/users/show.html.haml7
-rw-r--r--test/integration/os_detection_test.rb20
6 files changed, 14 insertions, 103 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index a2a1785..c7d10db 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -74,7 +74,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.3)
- columnize (0.3.6)
+ columnize (0.8.9)
couchrest (1.1.3)
mime-types (~> 1.15)
multi_json (~> 1.0)
@@ -89,12 +89,12 @@ GEM
couchrest
couchrest_model
daemons (1.1.9)
- debugger (1.6.3)
+ debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
- debugger-ruby_core_source (~> 1.2.4)
+ debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
- debugger-ruby_core_source (1.2.4)
+ debugger-ruby_core_source (1.3.2)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.2)
diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss
index 4c0dfe3..d4db879 100644
--- a/app/assets/stylesheets/leap.scss
+++ b/app/assets/stylesheets/leap.scss
@@ -44,65 +44,6 @@
}
//
-// OS specific
-//
-
-.os-android {
- display: none !important;
-}
-
-html.android .os-android {
- display: inherit !important;
-}
-
-.os-linux {
- display: none !important;
-}
-
-html.linux .os-linux {
- display: inherit !important;
-}
-
-// .os-linux32 {
-// display: none !important;
-// }
-// html.linux32 .os-linux32 {
-// display: inherit !important;
-// }
-// .os-linux64 {
-// display: none !important;
-// }
-// html.linux64 .os-linux64 {
-// display: inherit !important;
-// }
-
-.os-windows {
- display: none !important;
-}
-
-html.windows .os-windows {
- display: inherit !important;
-}
-
-.os-osx {
- display: none !important;
-}
-
-html.osx .os-osx {
- display: inherit !important;
-}
-
-.os-other {
- display: none !important;
-}
-
-html.oldmac, html.oldwin, html.ios, html.fxos, html.other {
- .os-other {
- display: inherit !important;
- }
-}
-
-//
// ICONS
//
@@ -231,13 +172,13 @@ input, textarea {
.download {
a.btn {
width: 14em;
+ font-weight: bold;
small {
font-weight: normal;
}
}
}
a.btn {
- font-weight: bold;
width: 11em;
margin: 10px auto;
display: block;
diff --git a/app/views/common/_download_button.html.haml b/app/views/common/_download_button.html.haml
index 157c40a..e57c56b 100644
--- a/app/views/common/_download_button.html.haml
+++ b/app/views/common/_download_button.html.haml
@@ -2,5 +2,7 @@
.row-fluid.first
.span2
.download.span8
- = render partial: 'common/download_for_os', collection: available_clients + ['other']
+ = link_to client_download_url, class: "btn btn-large btn-primary" do
+ = big_icon('download')
+ = t(:download_client)
.span2
diff --git a/app/views/common/_download_for_os.html.haml b/app/views/common/_download_for_os.html.haml
deleted file mode 100644
index 3a11d10..0000000
--- a/app/views/common/_download_for_os.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-- os = download_for_os
-%div{:class => "os-#{os}"}
- %span.link
- - btn_class = (os == "other") ? "disabled" : "btn-primary"
- = link_to client_download_url(os), :class => "btn btn-large #{btn_class}" do
- = big_icon('download')
- .pull-right
- = t(:download_client)
- %br/
- %small= I18n.t("os.#{os}")
- %span.info
- %div= t(:client_info, :provider => content_tag(:b,APP_CONFIG[:domain])).html_safe
- %div
- - if os == "other"
- = t(:all_downloads_info, :clients => alternative_client_links(os).to_sentence).html_safe
- - else
- = t(:other_downloads_info, :clients => alternative_client_links(os).to_sentence).html_safe
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 3c73147..ddc33ab 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -20,6 +20,11 @@
- # %li= icon('envelope') + link_to(t(:overview_email), {insert path for user identities, presuambly}
%li= icon('question-sign') + link_to(t(:overview_tickets), user_tickets_path(@user))
%li= icon('shopping-cart') + link_to(t(:overview_billing), billing_top_link(@user)) if APP_CONFIG[:billing]
+
+
.container-fluid
.row-fluid
- = render 'common/download_button'
+ %h4 To use bitmask services:
+ = link_to client_download_url, class: "btn btn-primary" do
+ %i.icon-arrow-down.icon-white
+ = t(:download_client)
diff --git a/test/integration/os_detection_test.rb b/test/integration/os_detection_test.rb
deleted file mode 100644
index 6d9a648..0000000
--- a/test/integration/os_detection_test.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require 'test_helper'
-
-class OsDetectionTest < BrowserIntegrationTest
-
- test "old windows shows deactivated download" do
- page.driver.add_headers "User-Agent" => "Win98"
- visit '/'
- assert_selector "html.oldwin"
- assert has_text? "not available"
- end
-
- test "android shows android download" do
- page.driver.add_headers "User-Agent" => "Android"
- visit '/'
- assert_selector "html.android"
- assert has_no_text? "not available"
- assert_selector "small", text: "Android"
- end
-
-end