summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-10-20 14:39:33 +0200
committerAzul <azul@riseup.net>2016-10-20 14:39:33 +0200
commitb97daaed9b513006ace7e8eb5232a2211e965e77 (patch)
treee27002e8368e92410e5d4af2a945260c2ea6e2d1 /app/views
parentc6c4d9fd10b8ca8e24889112727e44c9bf68dd60 (diff)
parent6eb2dae802e5453e2a4361ab28f614cce9294f4c (diff)
Merge remote-tracking branch 'origin/develop'
We'll only use the master branch for development from now on.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/account/new.html.haml (renamed from app/views/users/new.html.haml)10
-rw-r--r--app/views/api/sessions/new.json.erb (renamed from app/views/v1/sessions/new.json.erb)0
-rw-r--r--app/views/common/_action_buttons.html.haml10
-rw-r--r--app/views/common/_download_button.html.haml8
-rw-r--r--app/views/common/_home_page_buttons.html.haml4
-rw-r--r--app/views/home/_content.html.haml43
-rw-r--r--app/views/home/_provider_message.html.haml2
-rw-r--r--app/views/layouts/_content.html.haml2
-rw-r--r--app/views/layouts/application.html.haml8
-rw-r--r--app/views/sessions/_warnings.html.haml (renamed from app/views/users/_warnings.html.haml)0
-rw-r--r--app/views/sessions/new.html.haml6
-rw-r--r--app/views/twitter/_index.html.erb34
-rw-r--r--app/views/users/_change_password.html.haml2
-rw-r--r--app/views/users/_change_pgp_key.html.haml2
-rw-r--r--app/views/users/_change_service_level.html.haml17
-rw-r--r--app/views/users/_contact_email.html.haml2
-rw-r--r--app/views/users/show.html.haml2
17 files changed, 106 insertions, 46 deletions
diff --git a/app/views/users/new.html.haml b/app/views/account/new.html.haml
index bc0b1af..d40259e 100644
--- a/app/views/users/new.html.haml
+++ b/app/views/account/new.html.haml
@@ -1,18 +1,18 @@
-#
-# This form is handled entirely by javascript
-# Please take care when changing element ids.
--#
--# The form is hidden when no js is available
+-#
+-# The form is hidden when no js is available
-# to prevent submission in the clear.
-#
- form_options = {url: '/not-used', html: {id: 'new_user', class: user_form_class('form-horizontal'), style: 'display:none'}, validate: true}
-.span1
-.span9
+.col-md-1
+.col-md-9
%h2=t :signup
.lead=t :signup_info
- = render :partial => 'warnings'
+ = render "sessions/warnings"
= simple_form_for(@user, form_options) do |f|
= f.input :login, :label => t(:username), :required => false, :input_html => { :id => :srp_username }
= f.input :password, :label => t(:password), :required => false, :validate => true, :input_html => { :id => :srp_password }
diff --git a/app/views/v1/sessions/new.json.erb b/app/views/api/sessions/new.json.erb
index 36154b8..36154b8 100644
--- a/app/views/v1/sessions/new.json.erb
+++ b/app/views/api/sessions/new.json.erb
diff --git a/app/views/common/_action_buttons.html.haml b/app/views/common/_action_buttons.html.haml
index 81ebf67..eb663c0 100644
--- a/app/views/common/_action_buttons.html.haml
+++ b/app/views/common/_action_buttons.html.haml
@@ -1,14 +1,14 @@
.home-buttons
- .row-fluid.second
- .login.span4
+ .row.second
+ .login.col-md-4
%span.link= btn icon('ok-sign') + t(:login), login_path
%span.info= t(:login_info, default: "")
- if APP_CONFIG[:allow_registration]
- .signup.span4
+ .signup.col-md-4
%span.link= btn icon('user') + t(:signup), signup_path
%span.info= t(:signup_info, default: "")
- else
- .signup.span4
- .help.span4
+ .signup.col-md-4
+ .help.col-md-4
%span.link= btn icon('question-sign') + t(:get_help), new_ticket_path
%span.info= t(:support_info, default: "")
diff --git a/app/views/common/_download_button.html.haml b/app/views/common/_download_button.html.haml
index 9c26860..1278230 100644
--- a/app/views/common/_download_button.html.haml
+++ b/app/views/common/_download_button.html.haml
@@ -1,8 +1,8 @@
.home-buttons
- .row-fluid.first
- .span2
- .download.span8
+ .row.first
+ .col-md-2
+ .download.col-md-8
= btn client_download_url, type: [:large, :primary] do
= big_icon('download')
= t(:download_bitmask)
- .span2
+ .col-md-2
diff --git a/app/views/common/_home_page_buttons.html.haml b/app/views/common/_home_page_buttons.html.haml
index fc6348e..cfe3734 100644
--- a/app/views/common/_home_page_buttons.html.haml
+++ b/app/views/common/_home_page_buttons.html.haml
@@ -1,6 +1,6 @@
= render 'common/download_button'
- if local_assigns[:divider]
- .row-fluid
- .span12
+ .row
+ .col-md-12
= render local_assigns[:divider]
= render 'common/action_buttons'
diff --git a/app/views/home/_content.html.haml b/app/views/home/_content.html.haml
index d96a1e0..c7902b1 100644
--- a/app/views/home/_content.html.haml
+++ b/app/views/home/_content.html.haml
@@ -1,12 +1,31 @@
-.row-fluid
- %h1= t(:welcome, :provider => APP_CONFIG[:domain])
- .p=t(:welcome_message_html)
-
-.row-fluid
- = home_page_buttons
-
- - if Rails.env == 'development'
- .row-fluid
- %hr
- %p
- = link_to "make donation", new_payment_path if APP_CONFIG[:payment].present?
+- if twitter_enabled == true
+ .col-md-8
+ .row
+ %h1= t(:welcome, :provider => APP_CONFIG[:domain])
+ .p=t(:welcome_message_html)
+
+ .row
+ = home_page_buttons
+ .row
+ = render 'home/provider_message'
+
+ .col-md-1
+
+ .col-md-3
+ .row
+ = render 'twitter/index'
+- else
+ .row
+ %h1= t(:welcome, :provider => APP_CONFIG[:domain])
+ .p=t(:welcome_message_html)
+
+ .row
+ = home_page_buttons
+ .row
+ = render 'home/provider_message'
+
+ - if Rails.env == 'development'
+ .row
+ %hr
+ %p
+ = link_to "make donation", new_payment_path if APP_CONFIG[:payment].present?
diff --git a/app/views/home/_provider_message.html.haml b/app/views/home/_provider_message.html.haml
new file mode 100644
index 0000000..928215a
--- /dev/null
+++ b/app/views/home/_provider_message.html.haml
@@ -0,0 +1,2 @@
+-# please overwrite me in your customization files at
+-# config/customization/views/home/_provider_message.html.haml
diff --git a/app/views/layouts/_content.html.haml b/app/views/layouts/_content.html.haml
index 07f9189..b72b7c1 100644
--- a/app/views/layouts/_content.html.haml
+++ b/app/views/layouts/_content.html.haml
@@ -8,7 +8,7 @@
- content = yield
- if @show_navigation && @user
- .span2
+ .col-md-2
= render 'layouts/navigation'
.span10
= render 'layouts/messages'
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 0aeda8b..e242a5f 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -15,13 +15,13 @@
#main
.container-fluid
- if @show_navigation && !admin?
- .row-fluid
+ .row
%h1= t(:user_control_panel)
- if logged_in?
- .row-fluid
- .span12
+ .row
+ .col-md-12
= render 'layouts/header'
- .row-fluid
+ .row
= render 'layouts/content'
#push
-# #push is used for sticky footer in bootstrap 2. remove when upgrading to bootstrap 3
diff --git a/app/views/users/_warnings.html.haml b/app/views/sessions/_warnings.html.haml
index baf80a4..baf80a4 100644
--- a/app/views/users/_warnings.html.haml
+++ b/app/views/sessions/_warnings.html.haml
diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml
index bb7e4bd..6695123 100644
--- a/app/views/sessions/new.html.haml
+++ b/app/views/sessions/new.html.haml
@@ -1,8 +1,8 @@
-.span1
-.span9
+.col-md-1
+.col-md-9
%h2=t :login
.lead=t :login_info
- = render :partial => 'users/warnings'
+ = render 'warnings'
= simple_form_for [:api, @session], validate: true, html: { id: :new_session, class: 'form-horizontal hidden js-show', style: "display:none;" } 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/twitter/_index.html.erb b/app/views/twitter/_index.html.erb
new file mode 100644
index 0000000..6e592c7
--- /dev/null
+++ b/app/views/twitter/_index.html.erb
@@ -0,0 +1,34 @@
+<% if twitter_enabled == true %>
+ <div class="twitter">
+
+ <div class="twitter_header">
+ <div class="twitter_id">
+ <div class="twitter_image_frame"><%= image_tag("Avatar_Pic.png") %></div>
+ <div class="twitter_name"><%= twitter_name%><br><a href="https://twitter.com/<%= twitter_handle %>">@<%= twitter_handle %></a></div>
+ </div>
+ </div>
+
+ <div class="twitter_list">
+ <%if tweets == [] then%><%= error_message %><% end %>
+ <% tweets.each do |e| %>
+ <div class="tweet">
+ <div class="tweet_text"><%= sanitize(e.text) %>
+ </div>
+ <div class="tweet_text_date">tweeted on <% t = e.created_at%> <%= t.strftime("%m/%d/%y").to_s %>
+ </div>
+ </div>
+ <% end %>
+ <%if all_tweets_count > num_of_tweets then%>
+ <div class="tweet">
+ <div class="more_tweets_link"><a href="https://twitter.com/<%= twitter_handle %>">Show more tweets...</a>
+ </div>
+ </div>
+ <% end %>
+ </div>
+
+ <div class="twitter_footer">
+
+ <p>This feed uses a Ruby interface to access the Twitter API. Within LEAP Twitter does not track you.</p>
+ </div>
+</div>
+<% end %>
diff --git a/app/views/users/_change_password.html.haml b/app/views/users/_change_password.html.haml
index 425e3ee..64a4d0a 100644
--- a/app/views/users/_change_password.html.haml
+++ b/app/views/users/_change_password.html.haml
@@ -15,7 +15,7 @@
= 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, :input_html => { :id => :srp_password_confirmation }
- .control-group
+ .form-group
.controls
= f.submit t(:save), :class => 'btn btn-primary'
diff --git a/app/views/users/_change_pgp_key.html.haml b/app/views/users/_change_pgp_key.html.haml
index e465125..af3eb5e 100644
--- a/app/views/users/_change_pgp_key.html.haml
+++ b/app/views/users/_change_pgp_key.html.haml
@@ -8,6 +8,6 @@
= simple_form_for [:api, @user], form_options do |f|
%legend= t(:advanced_options)
= f.input :public_key, :as => :text, :hint => t(:use_ascii_key), :input_html => {:class => "full-width", :rows => 4}
- .control-group
+ .form-group
.controls
= f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."}
diff --git a/app/views/users/_change_service_level.html.haml b/app/views/users/_change_service_level.html.haml
index 42315a2..32ea8c0 100644
--- a/app/views/users/_change_service_level.html.haml
+++ b/app/views/users/_change_service_level.html.haml
@@ -1,8 +1,13 @@
--# TODO: probably won't want here, but here for now. Also, we will need way to ensure payment if they pick a non-free plan.
--#
--# SERVICE LEVEL
--#
-- if APP_CONFIG[:service_levels]
+:ruby
+ # DISABLED! this form points to a route that does not exist.
+ # It's a draft for implementing service levels.
+ # TODO: probably won't want here, but here for now.
+ # We will need way to ensure payment for a non-free plan.
+ #
+ # SERVICE LEVEL
+ #
+ #
+- if APP_CONFIG[:service_levels] && false
- form_options = {:html => {:class => user_form_class('form-horizontal'), :id => 'update_service_level', :data => {token: session[:token]}}, :validate => true}
= simple_form_for @user, form_options do |f|
%legend= t(:service_level)
@@ -13,6 +18,6 @@
%p
= t(:effective_service_level)
= f.select :effective_service_level_code, ServiceLevel.select_options, :selected => @user.effective_service_level.id
- .control-group
+ .form-group
.controls
= f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."}
diff --git a/app/views/users/_contact_email.html.haml b/app/views/users/_contact_email.html.haml
index ad768b7..1627ff6 100644
--- a/app/views/users/_contact_email.html.haml
+++ b/app/views/users/_contact_email.html.haml
@@ -4,6 +4,6 @@
= f.input :contact_email, :label => false
-# %p= t(:public_key)
-# = f.text_area :contact_email_key, {:class => "full-width", :rows => 4}
- .control-group
+ .form-group
.controls
= f.submit t(:save), :class => 'btn', :data => {"loading-text" => "Saving..."} \ No newline at end of file
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index da8e467..3bdf952 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -1,6 +1,6 @@
= render 'overview'
.container-fluid
- .row-fluid
+ .row
%h4 To use bitmask services:
= btn client_download_url, type: "primary" do
%i.icon-arrow-down.icon-white