From 2df08b7348c1c9ca615962623970368f61d57d3e Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Wed, 25 Feb 2015 10:05:38 +0100 Subject: [PATCH] further foundation refactor --- .../cmtool/structure.js.coffee.erb | 2 +- app/views/cmtool/application/_links.html.slim | 12 ++++----- app/views/cmtool/contact_forms/edit.html.slim | 4 +-- .../cmtool/contact_forms/index.html.slim | 2 +- app/views/cmtool/contact_forms/new.html.slim | 2 +- app/views/cmtool/contact_forms/show.html.slim | 4 +-- app/views/cmtool/directories/edit.html.slim | 4 +-- app/views/cmtool/directories/index.html.slim | 2 +- app/views/cmtool/directories/new.html.slim | 2 +- app/views/cmtool/directories/show.html.slim | 10 ++++---- app/views/cmtool/faqs/edit.html.slim | 4 +-- app/views/cmtool/faqs/index.html.slim | 2 +- app/views/cmtool/faqs/new.html.slim | 2 +- app/views/cmtool/faqs/show.html.slim | 4 +-- app/views/cmtool/images/edit.html.slim | 4 +-- app/views/cmtool/images/index.html.slim | 2 +- app/views/cmtool/images/new.html.slim | 2 +- app/views/cmtool/images/show.html.slim | 6 ++--- app/views/cmtool/news/_form.html.slim | 8 +++--- app/views/cmtool/news/edit.html.slim | 4 +-- app/views/cmtool/news/index.html.slim | 2 +- app/views/cmtool/news/new.html.slim | 2 +- app/views/cmtool/news/show.html.slim | 4 +-- .../newsletter_subscriptions/edit.html.slim | 4 +-- .../newsletter_subscriptions/index.html.slim | 2 +- .../newsletter_subscriptions/new.html.slim | 2 +- .../newsletter_subscriptions/show.html.slim | 4 +-- app/views/cmtool/pages/_form.html.slim | 10 ++++---- app/views/cmtool/passwords/edit.html.slim | 4 +-- app/views/cmtool/quotes/_form.html.slim | 6 ++--- app/views/cmtool/quotes/edit.html.slim | 4 +-- app/views/cmtool/quotes/index.html.slim | 2 +- app/views/cmtool/quotes/new.html.slim | 2 +- app/views/cmtool/quotes/show.html.slim | 4 +-- .../sessions}/_devise_links.html.slim | 0 app/views/cmtool/sessions/new.html.slim | 2 +- app/views/devise/confirmations/new.html.erb | 12 --------- .../mailer/confirmation_instructions.html.erb | 5 ---- .../reset_password_instructions.html.erb | 8 ------ .../mailer/unlock_instructions.html.erb | 7 ------ app/views/devise/passwords/edit.html.slim | 14 ----------- app/views/devise/passwords/new.html.slim | 10 -------- app/views/devise/registrations/edit.html.erb | 25 ------------------- app/views/devise/registrations/new.html.slim | 16 ------------ app/views/devise/sessions/new.html.slim | 19 -------------- app/views/devise/unlocks/new.html.erb | 12 --------- .../layouts/cmtool/application.html.slim | 2 +- 47 files changed, 69 insertions(+), 197 deletions(-) rename app/views/{devise => cmtool/sessions}/_devise_links.html.slim (100%) delete mode 100644 app/views/devise/confirmations/new.html.erb delete mode 100644 app/views/devise/mailer/confirmation_instructions.html.erb delete mode 100644 app/views/devise/mailer/reset_password_instructions.html.erb delete mode 100644 app/views/devise/mailer/unlock_instructions.html.erb delete mode 100644 app/views/devise/passwords/edit.html.slim delete mode 100644 app/views/devise/passwords/new.html.slim delete mode 100644 app/views/devise/registrations/edit.html.erb delete mode 100644 app/views/devise/registrations/new.html.slim delete mode 100644 app/views/devise/sessions/new.html.slim delete mode 100644 app/views/devise/unlocks/new.html.erb diff --git a/app/assets/javascripts/cmtool/structure.js.coffee.erb b/app/assets/javascripts/cmtool/structure.js.coffee.erb index c453c45..927f43e 100644 --- a/app/assets/javascripts/cmtool/structure.js.coffee.erb +++ b/app/assets/javascripts/cmtool/structure.js.coffee.erb @@ -8,5 +8,5 @@ $ -> relative_urls: false removed_menuitems: 'newdocument' $('.editor_basic').tinymce - theme: 'simple' + theme: 'modern' language: tinymce_language diff --git a/app/views/cmtool/application/_links.html.slim b/app/views/cmtool/application/_links.html.slim index 689d28c..1760e10 100644 --- a/app/views/cmtool/application/_links.html.slim +++ b/app/views/cmtool/application/_links.html.slim @@ -1,19 +1,19 @@ ul.nav.nav-pills - if controller_name != 'sessions' - li= link_to t('devise.sessions.button'), new_session_path(resource_name), class: [:devise, :btn] + li= link_to t('devise.sessions.button'), new_session_path(resource_name), class: [:devise, :button] - if devise_mapping.registerable? && controller_name != 'registrations' - li= link_to t('devise.registrations.button'), new_registration_path(resource_name), class: [:devise, :btn] + li= link_to t('devise.registrations.button'), new_registration_path(resource_name), class: [:devise, :button] - if devise_mapping.recoverable? && controller_name != 'passwords' - li= link_to t('devise.sessions.forgot_your_password'), new_password_path(resource_name), class: [:devise, :btn] + li= link_to t('devise.sessions.forgot_your_password'), new_password_path(resource_name), class: [:devise, :button] - if devise_mapping.confirmable? && controller_name != 'confirmations' - li= link_to t('devise.confirmations.did_not_receive_instructions_link'), new_confirmation_path(resource_name), class: [:devise, :btn] + li= link_to t('devise.confirmations.did_not_receive_instructions_link'), new_confirmation_path(resource_name), class: [:devise, :button] - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - li= link_to t('devise.unlocks.did_not_receive_instructions_link'), new_unlock_path(resource_name), class: [:devise, :btn] + li= link_to t('devise.unlocks.did_not_receive_instructions_link'), new_unlock_path(resource_name), class: [:devise, :button] - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| - li= link_to t('devise.omniauth_callbacks.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), class: [:devise, :btn] + li= link_to t('devise.omniauth_callbacks.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), class: [:devise, :button] diff --git a/app/views/cmtool/contact_forms/edit.html.slim b/app/views/cmtool/contact_forms/edit.html.slim index 6fcb5c8..b476fdd 100644 --- a/app/views/cmtool/contact_forms/edit.html.slim +++ b/app/views/cmtool/contact_forms/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@contact_form), cmtool.contact_form_path(@contact_form), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: [:btn] + li= link_to link_to_show_content(@contact_form), cmtool.contact_form_path(@contact_form), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: 'to-index-button' diff --git a/app/views/cmtool/contact_forms/index.html.slim b/app/views/cmtool/contact_forms/index.html.slim index 6c0b264..19bd0cc 100644 --- a/app/views/cmtool/contact_forms/index.html.slim +++ b/app/views/cmtool/contact_forms/index.html.slim @@ -23,4 +23,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path, class: 'record-new-button' diff --git a/app/views/cmtool/contact_forms/new.html.slim b/app/views/cmtool/contact_forms/new.html.slim index bf6da82..d48ab21 100644 --- a/app/views/cmtool/contact_forms/new.html.slim +++ b/app/views/cmtool/contact_forms/new.html.slim @@ -2,4 +2,4 @@ = render 'form', :submit => create_button_text(@contact_form) - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: 'to-index-button' diff --git a/app/views/cmtool/contact_forms/show.html.slim b/app/views/cmtool/contact_forms/show.html.slim index 0facd84..21e396c 100644 --- a/app/views/cmtool/contact_forms/show.html.slim +++ b/app/views/cmtool/contact_forms/show.html.slim @@ -17,5 +17,5 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@contact_form), cmtool.edit_contact_form_path(@contact_form), class: ['btn', 'btn-warning'] - li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: [:btn] + li= link_to link_to_edit_content(@contact_form), cmtool.edit_contact_form_path(@contact_form), class: 'record-edit-button' + li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: 'to-index-button' diff --git a/app/views/cmtool/directories/edit.html.slim b/app/views/cmtool/directories/edit.html.slim index 0f6749a..f8ef63e 100644 --- a/app/views/cmtool/directories/edit.html.slim +++ b/app/views/cmtool/directories/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@directory), cmtool.directory_path(@directory), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn] + li= link_to link_to_show_content(@directory), cmtool.directory_path(@directory), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: 'to-index-button' diff --git a/app/views/cmtool/directories/index.html.slim b/app/views/cmtool/directories/index.html.slim index bfc5515..8a26de7 100644 --- a/app/views/cmtool/directories/index.html.slim +++ b/app/views/cmtool/directories/index.html.slim @@ -17,4 +17,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path, class: 'record-new-button' diff --git a/app/views/cmtool/directories/new.html.slim b/app/views/cmtool/directories/new.html.slim index 84cb21c..42868c1 100644 --- a/app/views/cmtool/directories/new.html.slim +++ b/app/views/cmtool/directories/new.html.slim @@ -4,4 +4,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: 'to-index-button' diff --git a/app/views/cmtool/directories/show.html.slim b/app/views/cmtool/directories/show.html.slim index 198cea2..edeeefc 100644 --- a/app/views/cmtool/directories/show.html.slim +++ b/app/views/cmtool/directories/show.html.slim @@ -8,8 +8,8 @@ = f.hidden_field :directory_id = f.file_field :file .modal-footer - a.btn.btn-inverse href: '#', role: :button, data: {dismiss: :modal}, 'aria-hidden' => true x - = f.submit t('cmtool.directory.add_image.label', image: Cmtool::Image.model_name.human), class: ['btn', 'btn-success'] + a.secondary.button href: '#', role: :button, data: {dismiss: :modal}, 'aria-hidden' => true x + = f.submit t('cmtool.directory.add_image.label', image: Cmtool::Image.model_name.human), class: 'record-new-button' .directory.caption= "/# @directory.tree_path.map{|d| link_to(d.name, cmtool.directory_path(d))}.join('/') ".html_safe table#directory-view.table.table-striped.table-hover thead @@ -31,6 +31,6 @@ table#directory-view.table.table-striped.table-hover ul - if @directory.parent li= link_to '..', cmtool.directory_path(@directory.parent) - li= link_to link_to_edit_content(@directory), cmtool.edit_directory_path(@directory), class: ['btn', 'btn-warning'] - li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn] - li= link_to t('cmtool.directory.add_file'), '#add-image-container', class: ['btn', 'btn-success'], role: :button, data: toggle: :modal + li= link_to link_to_edit_content(@directory), cmtool.edit_directory_path(@directory), class: 'record-edit-button' + li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: 'to-index-button' + li= link_to t('cmtool.directory.add_file'), '#add-image-container', class: 'record-new-button', role: :button, data: toggle: :modal diff --git a/app/views/cmtool/faqs/edit.html.slim b/app/views/cmtool/faqs/edit.html.slim index 9ae7a3a..647519f 100644 --- a/app/views/cmtool/faqs/edit.html.slim +++ b/app/views/cmtool/faqs/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@faq), cmtool.faq_path(@faq), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn] + li= link_to link_to_show_content(@faq), cmtool.faq_path(@faq), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: 'to-index-button' diff --git a/app/views/cmtool/faqs/index.html.slim b/app/views/cmtool/faqs/index.html.slim index 4557c9e..84e3b3a 100644 --- a/app/views/cmtool/faqs/index.html.slim +++ b/app/views/cmtool/faqs/index.html.slim @@ -19,4 +19,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path, class: 'record-new-button' diff --git a/app/views/cmtool/faqs/new.html.slim b/app/views/cmtool/faqs/new.html.slim index 852e3ab..c7a0727 100644 --- a/app/views/cmtool/faqs/new.html.slim +++ b/app/views/cmtool/faqs/new.html.slim @@ -3,4 +3,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: 'to-index-button' diff --git a/app/views/cmtool/faqs/show.html.slim b/app/views/cmtool/faqs/show.html.slim index 9364de0..aefb564 100644 --- a/app/views/cmtool/faqs/show.html.slim +++ b/app/views/cmtool/faqs/show.html.slim @@ -8,6 +8,6 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@faq), cmtool.edit_faq_path(@faq), class: ['btn', 'btn-warning'] + li= link_to link_to_edit_content(@faq), cmtool.edit_faq_path(@faq), class: 'record-edit-button' - li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: 'to-index-button' diff --git a/app/views/cmtool/images/edit.html.slim b/app/views/cmtool/images/edit.html.slim index 57e9ab6..df1c502 100644 --- a/app/views/cmtool/images/edit.html.slim +++ b/app/views/cmtool/images/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@image), cmtool.image_path(@image), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn] + li= link_to link_to_show_content(@image), cmtool.image_path(@image), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: 'to-index-button' diff --git a/app/views/cmtool/images/index.html.slim b/app/views/cmtool/images/index.html.slim index 0d73881..5c6d718 100644 --- a/app/views/cmtool/images/index.html.slim +++ b/app/views/cmtool/images/index.html.slim @@ -27,4 +27,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: 'record-new-button' diff --git a/app/views/cmtool/images/new.html.slim b/app/views/cmtool/images/new.html.slim index 2620c84..c4e4c66 100644 --- a/app/views/cmtool/images/new.html.slim +++ b/app/views/cmtool/images/new.html.slim @@ -3,4 +3,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: 'to-index-button' diff --git a/app/views/cmtool/images/show.html.slim b/app/views/cmtool/images/show.html.slim index ffa4e11..e1bc46c 100644 --- a/app/views/cmtool/images/show.html.slim +++ b/app/views/cmtool/images/show.html.slim @@ -17,6 +17,6 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@image), cmtool.edit_image_path(@image), class: ['btn', 'btn-warning'] - li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: ['btn', 'btn-primary'] - li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn] + li= link_to link_to_edit_content(@image), cmtool.edit_image_path(@image), class: 'record-edit-button' + li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: 'record-new-button' + li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: 'to-index-button' diff --git a/app/views/cmtool/news/_form.html.slim b/app/views/cmtool/news/_form.html.slim index 980a897..a65713a 100644 --- a/app/views/cmtool/news/_form.html.slim +++ b/app/views/cmtool/news/_form.html.slim @@ -1,5 +1,5 @@ -= form_for [cmtool, @news], :html => {:multipart => true} do |f| - = render 'error_messages', :target => @news += form_for [cmtool, @news], html: {multipart: true} do |f| + = render 'error_messages', target: @news .field = f.label :title = f.text_field :title @@ -12,11 +12,11 @@ | (yyyy-mm-dd) .field = f.label :body - = f.text_area :body, :class => 'editor_full' + = f.text_area :body, class: 'editor_full' .field = f.label :image = f.file_field :image .field - = render "cmtool/keywords/habtm", :subject => @news + = render "cmtool/keywords/habtm", subject: @news .actions = f.submit @submit || update_button_text(@news) diff --git a/app/views/cmtool/news/edit.html.slim b/app/views/cmtool/news/edit.html.slim index c169dda..d9f914e 100644 --- a/app/views/cmtool/news/edit.html.slim +++ b/app/views/cmtool/news/edit.html.slim @@ -5,5 +5,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@news), cmtool.news_path(@news), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn] + li= link_to link_to_show_content(@news), cmtool.news_path(@news), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: 'to-index-button' diff --git a/app/views/cmtool/news/index.html.slim b/app/views/cmtool/news/index.html.slim index 02dbc69..12f973b 100644 --- a/app/views/cmtool/news/index.html.slim +++ b/app/views/cmtool/news/index.html.slim @@ -21,4 +21,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path, class: 'record-new-button' diff --git a/app/views/cmtool/news/new.html.slim b/app/views/cmtool/news/new.html.slim index a42b1d4..7875fb3 100644 --- a/app/views/cmtool/news/new.html.slim +++ b/app/views/cmtool/news/new.html.slim @@ -3,4 +3,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: 'to-index-button' diff --git a/app/views/cmtool/news/show.html.slim b/app/views/cmtool/news/show.html.slim index a15dedc..d504fa5 100644 --- a/app/views/cmtool/news/show.html.slim +++ b/app/views/cmtool/news/show.html.slim @@ -24,5 +24,5 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@news), cmtool.edit_news_path(@news), class: ['btn', 'btn-warning'] - li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn] + li= link_to link_to_edit_content(@news), cmtool.edit_news_path(@news), class: 'record-edit-button' + li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: 'to-index-button' diff --git a/app/views/cmtool/newsletter_subscriptions/edit.html.slim b/app/views/cmtool/newsletter_subscriptions/edit.html.slim index 0a50376..16990f4 100644 --- a/app/views/cmtool/newsletter_subscriptions/edit.html.slim +++ b/app/views/cmtool/newsletter_subscriptions/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@newsletter_subscription), cmtool.newsletter_subscription_path(@newsletter_subscription), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn] + li= link_to link_to_show_content(@newsletter_subscription), cmtool.newsletter_subscription_path(@newsletter_subscription), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: 'to-index-button' diff --git a/app/views/cmtool/newsletter_subscriptions/index.html.slim b/app/views/cmtool/newsletter_subscriptions/index.html.slim index def1fd8..e8c8c4d 100644 --- a/app/views/cmtool/newsletter_subscriptions/index.html.slim +++ b/app/views/cmtool/newsletter_subscriptions/index.html.slim @@ -21,4 +21,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path, class: 'record-new-button' diff --git a/app/views/cmtool/newsletter_subscriptions/new.html.slim b/app/views/cmtool/newsletter_subscriptions/new.html.slim index e721cea..2f84a6c 100644 --- a/app/views/cmtool/newsletter_subscriptions/new.html.slim +++ b/app/views/cmtool/newsletter_subscriptions/new.html.slim @@ -3,4 +3,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: 'to-index-button' diff --git a/app/views/cmtool/newsletter_subscriptions/show.html.slim b/app/views/cmtool/newsletter_subscriptions/show.html.slim index 01eb649..b4e4171 100644 --- a/app/views/cmtool/newsletter_subscriptions/show.html.slim +++ b/app/views/cmtool/newsletter_subscriptions/show.html.slim @@ -11,5 +11,5 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@newsletter_subscription), cmtool.edit_newsletter_subscription_path(@newsletter_subscription), class: ['btn', 'btn-warning'] - li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn] + li= link_to link_to_edit_content(@newsletter_subscription), cmtool.edit_newsletter_subscription_path(@newsletter_subscription), class: 'record-edit-button' + li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: 'to-index-button' diff --git a/app/views/cmtool/pages/_form.html.slim b/app/views/cmtool/pages/_form.html.slim index bd03ad8..6bed1c3 100644 --- a/app/views/cmtool/pages/_form.html.slim +++ b/app/views/cmtool/pages/_form.html.slim @@ -1,5 +1,5 @@ = form_for [cmtool, @page] do |f| - = render 'error_messages', :target => @page + = render 'error_messages', target: @page .form-row .form-label= f.label :name .form-field.full @@ -22,13 +22,13 @@ .form-field= f.select :locale, Page.locales .form-row = f.label :body - = f.text_area :body, :rows => 30, :cols => 80, :class => 'editor_full' + = f.text_area :body, rows: 30, cols: 80, class: 'editor_full' .field = f.label :footer - = f.text_area :footer, :rows => 15, :cols => 80, :class => 'editor_full' + = f.text_area :footer, rows: 15, cols: 80, class: 'editor_full' .field = f.label :sidebar - = f.text_area :sidebar, :rows => 15, :cols => 80, :class => 'editor_full' + = f.text_area :sidebar, rows: 15, cols: 80, class: 'editor_full' .form-row .form-label= f.label :parent_id .form-field= f.select :parent_id, tree_options_for_select(Page.full_tree(@page.locale || Page.locales.first), exclude: @page.id, selected: @page.parent_id), include_blank: ' -- ' @@ -42,7 +42,7 @@ .form-label= f.label :in_menu .form-field= f.check_box :in_menu .field - = render "cmtool/keywords/habtm", :subject => @page + = render "cmtool/keywords/habtm", subject: @page .form-row: .form-actions = f.submit @submit || update_button_text(f.object), class: 'button' -#= button_tag 'Preview (unsupported)', onclick: %{$('form').attr('action', '/' + $('#page_name').val()).submit();} diff --git a/app/views/cmtool/passwords/edit.html.slim b/app/views/cmtool/passwords/edit.html.slim index 7e2fd3e..361d97f 100644 --- a/app/views/cmtool/passwords/edit.html.slim +++ b/app/views/cmtool/passwords/edit.html.slim @@ -1,5 +1,5 @@ h2= t('devise.passwords.edit.title') -= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f| += form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f| = devise_error_messages! = f.hidden_field :reset_password_token .control-group @@ -10,5 +10,5 @@ h2= t('devise.passwords.edit.title') .controls= f.password_field :password_confirmation .control-group .controls - = f.submit t('devise.passwords.edit.button'), class: 'btn btn-primary' + = f.submit t('devise.passwords.edit.button'), class: 'record-edit-button' = render "devise_links" diff --git a/app/views/cmtool/quotes/_form.html.slim b/app/views/cmtool/quotes/_form.html.slim index d524dd6..154e5d7 100644 --- a/app/views/cmtool/quotes/_form.html.slim +++ b/app/views/cmtool/quotes/_form.html.slim @@ -1,5 +1,5 @@ -= form_for [cmtool, @quote], :html => {:multipart => true} do |f| - = render 'error_messages', :target => @quote += form_for [cmtool, @quote], html: {multipart: true} do |f| + = render 'error_messages', target: @quote .field = f.label :owner = f.text_field :owner @@ -14,7 +14,7 @@ = f.file_field :image .field = f.label :body - = f.text_area :body, :rows => 8, :class => 'mceEditor' + = f.text_area :body, rows: 8, class: 'editor_basic' .field = f.label :active = f.check_box :active diff --git a/app/views/cmtool/quotes/edit.html.slim b/app/views/cmtool/quotes/edit.html.slim index 5729421..be9cd88 100644 --- a/app/views/cmtool/quotes/edit.html.slim +++ b/app/views/cmtool/quotes/edit.html.slim @@ -3,5 +3,5 @@ - content_for :page_links do ul - li= link_to link_to_show_content(@quote), cmtool.quote_path(@quote), class: ['btn', 'btn-info'] - li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn] + li= link_to link_to_show_content(@quote), cmtool.quote_path(@quote), class: 'record-show-button' + li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: 'to-index-button' diff --git a/app/views/cmtool/quotes/index.html.slim b/app/views/cmtool/quotes/index.html.slim index de6ea7c..8cefbe9 100644 --- a/app/views/cmtool/quotes/index.html.slim +++ b/app/views/cmtool/quotes/index.html.slim @@ -23,4 +23,4 @@ - content_for :page_links do ul - li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path, class: ['btn', 'btn-primary'] + li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path, class: 'record-new-button' diff --git a/app/views/cmtool/quotes/new.html.slim b/app/views/cmtool/quotes/new.html.slim index e6b565d..2d4d2b2 100644 --- a/app/views/cmtool/quotes/new.html.slim +++ b/app/views/cmtool/quotes/new.html.slim @@ -3,4 +3,4 @@ - content_for :page_links do ul - li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn] + li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: 'to-index-button' diff --git a/app/views/cmtool/quotes/show.html.slim b/app/views/cmtool/quotes/show.html.slim index f93cfd3..affa738 100644 --- a/app/views/cmtool/quotes/show.html.slim +++ b/app/views/cmtool/quotes/show.html.slim @@ -21,5 +21,5 @@ - content_for :page_links do ul - li= link_to link_to_edit_content(@quote), cmtool.edit_quote_path(@quote), class: ['btn', 'btn-warning'] - li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn] + li= link_to link_to_edit_content(@quote), cmtool.edit_quote_path(@quote), class: 'record-edit-button' + li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: 'to-index-button' diff --git a/app/views/devise/_devise_links.html.slim b/app/views/cmtool/sessions/_devise_links.html.slim similarity index 100% rename from app/views/devise/_devise_links.html.slim rename to app/views/cmtool/sessions/_devise_links.html.slim diff --git a/app/views/cmtool/sessions/new.html.slim b/app/views/cmtool/sessions/new.html.slim index 05f5bfc..bd3b82e 100644 --- a/app/views/cmtool/sessions/new.html.slim +++ b/app/views/cmtool/sessions/new.html.slim @@ -15,5 +15,5 @@ h2= t('devise.sessions.title') = t('devise.sessions.remember_me') .control-group .controls - = f.submit t('devise.sessions.button'), class: 'btn btn-primary' + = f.submit t('devise.sessions.button'), class: 'button' = render "devise_links" diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb deleted file mode 100644 index 1dc5ca6..0000000 --- a/app/views/devise/confirmations/new.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Resend confirmation instructions

- -<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> - <%= devise_error_messages! %> - -
<%= f.label :email %>
- <%= f.email_field :email %>
- -
<%= f.submit "Resend confirmation instructions" %>
-<% end %> - -<%= render "devise_links" %> \ No newline at end of file diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb deleted file mode 100644 index a5c4585..0000000 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

Welcome <%= @resource.email %>!

- -

You can confirm your account email through the link below:

- -

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>

diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb deleted file mode 100644 index ae9e888..0000000 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hello <%= @resource.email %>!

- -

Someone has requested a link to change your password, and you can do this through the link below.

- -

<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>

- -

If you didn't request this, please ignore this email.

-

Your password won't change until you access the link above and create a new one.

diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb deleted file mode 100644 index 2263c21..0000000 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -

Hello <%= @resource.email %>!

- -

Your account has been locked due to an excessive amount of unsuccessful sign in attempts.

- -

Click the link below to unlock your account:

- -

<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %>

diff --git a/app/views/devise/passwords/edit.html.slim b/app/views/devise/passwords/edit.html.slim deleted file mode 100644 index 7e2fd3e..0000000 --- a/app/views/devise/passwords/edit.html.slim +++ /dev/null @@ -1,14 +0,0 @@ -h2= t('devise.passwords.edit.title') -= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f| - = devise_error_messages! - = f.hidden_field :reset_password_token - .control-group - = f.label :password, class: 'control-label' - .controls= f.password_field :password - .control-group - = f.label :password_confirmation, class: 'control-label' - .controls= f.password_field :password_confirmation - .control-group - .controls - = f.submit t('devise.passwords.edit.button'), class: 'btn btn-primary' -= render "devise_links" diff --git a/app/views/devise/passwords/new.html.slim b/app/views/devise/passwords/new.html.slim deleted file mode 100644 index b3c0ca3..0000000 --- a/app/views/devise/passwords/new.html.slim +++ /dev/null @@ -1,10 +0,0 @@ -h2= t('devise.passwords.title') -= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal'}) do |f| - = devise_error_messages! - .control-group - = f.label :email, class: 'control-label' - .controls= f.email_field :email - .control-group - .controls - = f.submit t('devise.passwords.button'), class: 'btn btn-primary' -= render "devise_links" diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb deleted file mode 100644 index bb66fbf..0000000 --- a/app/views/devise/registrations/edit.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -

Edit <%= resource_name.to_s.humanize %>

- -<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> - <%= devise_error_messages! %> - -
<%= f.label :email %>
- <%= f.email_field :email %>
- -
<%= f.label :password %> (leave blank if you don't want to change it)
- <%= f.password_field :password, :autocomplete => "off" %>
- -
<%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation %>
- -
<%= f.label :current_password %> (we need your current password to confirm your changes)
- <%= f.password_field :current_password %>
- -
<%= f.submit "Update" %>
-<% end %> - -

Cancel my account

- -

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.

- -<%= link_to "Back", :back %> diff --git a/app/views/devise/registrations/new.html.slim b/app/views/devise/registrations/new.html.slim deleted file mode 100644 index af57f04..0000000 --- a/app/views/devise/registrations/new.html.slim +++ /dev/null @@ -1,16 +0,0 @@ -h2= t('devise.registrations.title') -= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f| - = devise_error_messages! - .control-group - = f.label :email, class: 'control-label' - .controls= f.email_field :email - .control-group - = f.label :password, class: 'control-label' - .controls= f.password_field :password - .control-group - = f.label :password_confirmation, class: 'control-label' - .controls= f.password_field :password_confirmation - .control-group - .controls - = f.submit t('devise.registrations.button'), class: 'btn btn-primary' -= render "devise_links" diff --git a/app/views/devise/sessions/new.html.slim b/app/views/devise/sessions/new.html.slim deleted file mode 100644 index 05f5bfc..0000000 --- a/app/views/devise/sessions/new.html.slim +++ /dev/null @@ -1,19 +0,0 @@ -h2= t('devise.sessions.title') -= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f| - = devise_error_messages! - .control-group - = f.label :email, class: 'control-label' - .controls= f.email_field :email - .control-group - = f.label :password, class: 'control-label' - .controls= f.password_field :password - .control-group - .controls - = f.label :remember_me do - = f.check_box :remember_me - |  - = t('devise.sessions.remember_me') - .control-group - .controls - = f.submit t('devise.sessions.button'), class: 'btn btn-primary' -= render "devise_links" diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb deleted file mode 100644 index a1aaff2..0000000 --- a/app/views/devise/unlocks/new.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Resend unlock instructions

- -<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> - <%= devise_error_messages! %> - -
<%= f.label :email %>
- <%= f.email_field :email %>
- -
<%= f.submit "Resend unlock instructions" %>
-<% end %> - -<%= render "devise_links" %> \ No newline at end of file diff --git a/app/views/layouts/cmtool/application.html.slim b/app/views/layouts/cmtool/application.html.slim index 87a13b1..5053eff 100644 --- a/app/views/layouts/cmtool/application.html.slim +++ b/app/views/layouts/cmtool/application.html.slim @@ -30,7 +30,7 @@ html lang="en" = content_for?(:content) ? yield(:content) : yield - if content_for?(:page_links) #sub-navigation-container= yield(:page_links) - .show-for-large-only.large-3.columns + .show-for-large-up.large-3.columns .panel.sidebar-nav h3= content_for?(:page_title) ? yield(:page_title) : application_title ul.nav.nav-list