summaryrefslogtreecommitdiff
path: root/app/views/common
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-24 11:10:01 +0200
committerAzul <azul@leap.se>2014-04-24 11:10:01 +0200
commit1da12752c3b3aa3d4a03e67ede133e807e9434df (patch)
treea91cf9b6cb71f758dc4a4aa955a8f08352aae38a /app/views/common
parentdad200e2cb0b03995eb06024d3fcf788ad2486ff (diff)
cleanup homepage buttons some
let's devide the partials rather than having super specific parameters (on_user_page)
Diffstat (limited to 'app/views/common')
-rw-r--r--app/views/common/_action_buttons.html.haml11
-rw-r--r--app/views/common/_download_button.html.haml6
-rw-r--r--app/views/common/_home_page_buttons.html.haml27
3 files changed, 23 insertions, 21 deletions
diff --git a/app/views/common/_action_buttons.html.haml b/app/views/common/_action_buttons.html.haml
new file mode 100644
index 0000000..c74fcd1
--- /dev/null
+++ b/app/views/common/_action_buttons.html.haml
@@ -0,0 +1,11 @@
+.home-buttons
+ .row-fluid.second
+ .login.span4
+ %span.link= link_to(icon('ok-sign', icon_color) + t(:login), login_path, :class => 'btn')
+ %span.info= t(:login_info)
+ .signup.span4
+ %span.link= link_to(icon('user', icon_color) + t(:signup), signup_path, :class => 'btn')
+ %span.info= t(:signup_info)
+ .help.span4
+ %span.link= link_to(icon('question-sign', icon_color) + t(:get_help), new_ticket_path, :class => 'btn')
+ %span.info= t(:help_info)
diff --git a/app/views/common/_download_button.html.haml b/app/views/common/_download_button.html.haml
new file mode 100644
index 0000000..157c40a
--- /dev/null
+++ b/app/views/common/_download_button.html.haml
@@ -0,0 +1,6 @@
+.home-buttons
+ .row-fluid.first
+ .span2
+ .download.span8
+ = render partial: 'common/download_for_os', collection: available_clients + ['other']
+ .span2
diff --git a/app/views/common/_home_page_buttons.html.haml b/app/views/common/_home_page_buttons.html.haml
index c9ea7a2..8c47983 100644
--- a/app/views/common/_home_page_buttons.html.haml
+++ b/app/views/common/_home_page_buttons.html.haml
@@ -1,23 +1,8 @@
- icon_color = :black
-.home-buttons
- .row-fluid.first
- .span2
- .download.span8
- = render partial: 'common/download_for_os', collection: available_clients + ['other']
- .span2
- - if local_assigns[:divider]
- .row-fluid
- .span12
- = render local_assigns[:divider]
- - if !local_assigns[:on_user_page]
- .row-fluid.second
- .login.span4
- %span.link= link_to(icon('ok-sign', icon_color) + t(:login), login_path, :class => 'btn')
- %span.info= t(:login_info)
- .signup.span4
- %span.link= link_to(icon('user', icon_color) + t(:signup), signup_path, :class => 'btn')
- %span.info= t(:signup_info)
- .help.span4
- %span.link= link_to(icon('question-sign', icon_color) + t(:get_help), new_ticket_path, :class => 'btn')
- %span.info= t(:help_info)
+= render 'common/download_button'
+- if local_assigns[:divider]
+ .row-fluid
+ .span12
+ = render local_assigns[:divider]
+= render 'common/action_buttons', icon_color: icon_color