From 0fe1678cd37c8e917cb28eed9eb28777d3a92283 Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 1 Oct 2013 13:56:59 -0700 Subject: Allow admins to view past-due subscriptions. --- app/views/layouts/_navigation.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index b89655f..992aa46 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -3,5 +3,5 @@ = link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users) - # will want link for identity settings = link_to_navigation t(:support_tickets), auto_tickets_path, :active => controller?(:tickets) - = link_to_navigation t(:billing_settings), show_or_new_customer_link(@user), :active => controller?(:customer, :payments, :subscriptions, :credit_card_info) if APP_CONFIG[:payment].present? + = link_to_navigation t(:billing_settings), billing_top_link(@user), :active => controller?(:customer, :payments, :subscriptions, :credit_card_info) if APP_CONFIG[:payment].present? = link_to_navigation t(:logout), logout_path, :method => :delete -- cgit v1.2.3 From 8e5aa5093ab6e67db4f603a44bb7027245b91a21 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 15 Oct 2013 14:31:52 +0200 Subject: detect os in browser and show proper download link We add a class to the html element based on the detected os and use that to pick which download link should be visible. If we detect an os that is not supported we display a deactivated download link instead with all alternatives. --- app/assets/javascripts/application.js | 3 +- app/assets/stylesheets/leap.scss | 85 ++++++++++++++++++++++++++++++++--- app/helpers/application_helper.rb | 23 ++++++---- 3 files changed, 95 insertions(+), 16 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index cd90934..03a40da 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,9 +16,8 @@ //= require bootstrap //= require rails.validations //= require rails.validations.simple_form - //= require leap +//= require platform //= require tickets //= require users - //= require_tree . diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index b382773..30f7741 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -42,26 +42,96 @@ display: none; } +// +// OS specific +// + +.os-android { + display: none !important; +} + +html.android .os-android { + display: inherit !important; +} + +.os-linux32 { + display: none !important; +} + +html.linux .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-mac { + display: none !important; +} + +html.mac .os-mac { + display: inherit !important; +} + +.os-other { + display: none !important; +} + +html.oldmac, html.oldwin, html.ios, html.fxos, html.other { + .os-other { + display: inherit !important; + } +} + // // ICONS // -[class^="big-icon-"], -[class*=" big-icon-"] { +[class*="-icon-"] { display: inline-block; - width: 32px; - height: 32px; @include ie7-restore-right-whitespace(); - line-height: 32px; vertical-align: middle; background-repeat: no-repeat; margin-top: 1px; } +[class^="big-icon-"], +[class*=" big-icon-"] { + width: 32px; + height: 32px; + line-height: 32px; +} + +[class^="huge-icon-"], +[class*=" huge-icon-"] { + width: 128px; + height: 128px; + line-height: 128px; +} + + .big-icon-arrow-down { background-image: url(/leap-img/32/arrow-down.png) } +.huge-icon-mask { + height: 64px; + background-image: url(/leap-img/128/mask.png) +} + // // TYPOGRAPHY // @@ -152,6 +222,9 @@ input, textarea { .download { a.btn { width: 14em; + small { + font-weight: normal; + } } } a.btn { @@ -191,4 +264,4 @@ input, textarea { .overview li { padding: 6px 0; -} \ No newline at end of file +} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1e79990..90e649a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,18 +19,25 @@ module ApplicationHelper # http://twitter.github.io/bootstrap/base-css.html#icons # def icon(name, color=nil) + " ".html_safe + end + + def big_icon(name, color=nil) + " ".html_safe + end + + def huge_icon(name, color=nil) + " ".html_safe + end + + def color_class(color) if color.nil? - color_class = nil + nil elsif color == :black - color_class = 'icon-black' + 'icon-black' elsif color == :white - color_class = 'icon-white' + 'icon-white' end - " ".html_safe - end - - def big_icon(name, color=nil) - " ".html_safe end def format_flash(msg) -- cgit v1.2.3 From 9cdd17f630f6e0399e841117f4d6fc98cd437bb8 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 21 Oct 2013 18:30:19 +0200 Subject: adopt css to mac-> osx change --- app/assets/stylesheets/leap.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index 30f7741..af3bde4 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -78,11 +78,11 @@ html.windows .os-windows { display: inherit !important; } -.os-mac { +.os-osx { display: none !important; } -html.mac .os-mac { +html.osx .os-osx { display: inherit !important; } -- cgit v1.2.3 From 7b3dd8c2c0436518c7c80d37498b57fcf3b1eaf8 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 21 Oct 2013 18:55:26 +0200 Subject: the class for the html tag is linux32 - not just linux --- app/assets/stylesheets/leap.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index af3bde4..abfea05 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -58,7 +58,7 @@ html.android .os-android { display: none !important; } -html.linux .os-linux32 { +html.linux32 .os-linux32 { display: inherit !important; } -- cgit v1.2.3 From dd88c7f84cb3c497c6327c364b3c08993c51a08f Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 28 Oct 2013 12:47:46 +0100 Subject: notify user their account was successfully deleted (refs #4216) Also fixes a cornercase when admins deleted their own account. So far they would be redirected to the users list - which then refused access. Now they'll be redirected to the home landing page as well. --- app/views/home/index.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 728b5b8..5a54354 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -6,6 +6,10 @@ %p We provide secure communication services, including encrypted internet, email (coming soon), and chat (coming later). + .row-fluid + .span6.offset3 + = render 'layouts/messages' + .row-fluid = home_page_buttons - if Rails.env == 'development' -- cgit v1.2.3 From 11e80906b49bea120ae398c7d6524127eaa9363a Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 12 Nov 2013 14:50:14 +0100 Subject: make sure we log json request errors and their backtraces --- app/controllers/application_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b808e1c..de8d06b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,12 +10,14 @@ class ApplicationController < ActionController::Base rescue_from StandardError do |e| respond_to do |format| - format.json { render_json_error } + format.json { render_json_error(e) } format.all { raise e } # reraise the exception so the normal thing happens. end end - def render_json_error + def render_json_error(e) + Rails.logger.error e + Rails.logger.error e.backtrace.join("\n") render status: 500, json: {error: "The server failed to process your request. We'll look into it."} end -- cgit v1.2.3 From 496817bd512fe43c4cb80cc49a19dae3ed3eb165 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 13 Dec 2013 14:27:15 +0100 Subject: refactor: remove Overview controller - we can use Users#show we were only using Users#show to redirect to the edit action. So I replaced that with the overview and we have no more use for the extra controller. This also simplifies linking to the users in question a lot. --- app/controllers/home_controller.rb | 2 +- app/views/layouts/_navigation.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index be26eb6..1d62178 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -3,7 +3,7 @@ class HomeController < ApplicationController def index if logged_in? - redirect_to user_overview_url(current_user) + redirect_to current_user end end end diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 992aa46..6de567a 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -1,5 +1,5 @@ %ul.nav.sidenav - = link_to_navigation t(:overview), user_overview_path(@user), :active => controller?(:overviews) + = link_to_navigation t(:overview), @user, :active => controller?(:overviews) = link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users) - # will want link for identity settings = link_to_navigation t(:support_tickets), auto_tickets_path, :active => controller?(:tickets) -- cgit v1.2.3