summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2014-04-25 12:10:48 +0200
committerazul <azul@riseup.net>2014-04-25 12:10:48 +0200
commit2b6200f508ddb8e1c8a76fd3778881c39d787d8d (patch)
tree7f8fd9a78b619bf886bd3b985369c21260c8ea0a /app/views
parent14b43488b968a1544fdb65caa4fb0df99606c3ff (diff)
parent1da12752c3b3aa3d4a03e67ede133e807e9434df (diff)
Merge pull request #151 from azul/bugfix/5549-prefer-client-signup
Bugfix/5549 prefer client signup
Diffstat (limited to 'app/views')
-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
-rw-r--r--app/views/sessions/new.html.haml1
-rw-r--r--app/views/users/new.html.haml2
-rw-r--r--app/views/users/show.html.haml2
6 files changed, 26 insertions, 23 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
diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml
index 771dc97..316eec1 100644
--- a/app/views/sessions/new.html.haml
+++ b/app/views/sessions/new.html.haml
@@ -2,6 +2,7 @@
.span9
= render :partial => 'users/warnings'
%h2=t :login
+ .lead=t :login_info
= simple_form_for [:api, @session], :validate => true, :html => { :id => :new_session, :class => 'form-horizontal' } do |f|
= f.input :login, :required => false, :label => t(:username), :input_html => { :id => :srp_username }
= f.input :password, :required => false, :input_html => { :id => :srp_password }
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml
index aecf831..173dd8c 100644
--- a/app/views/users/new.html.haml
+++ b/app/views/users/new.html.haml
@@ -8,8 +8,8 @@
.span9
= render :partial => 'warnings'
%h2=t :signup
+ .lead=t :signup_info
= simple_form_for(@user, form_options) do |f|
- %legend= t(:signup_message)
= f.input :login, :label => t(:username), :required => false, :input_html => { :id => :srp_username }
= f.input :password, :required => false, :validate => true, :input_html => { :id => :srp_password }
= f.input :password_confirmation, :required => false, :validate => true, :input_html => { :id => :srp_password_confirmation }
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index c587017..3c73147 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -22,4 +22,4 @@
%li= icon('shopping-cart') + link_to(t(:overview_billing), billing_top_link(@user)) if APP_CONFIG[:billing]
.container-fluid
.row-fluid
- = home_page_buttons(true) \ No newline at end of file
+ = render 'common/download_button'