diff --git a/Gemfile b/Gemfile index c1cb864..d7d50c8 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec group :assets do gem 'sass-rails' - #gem 'bourbon' + gem 'bourbon' gem 'coffee-script' gem 'therubyracer', :platforms => :ruby gem 'less-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 33533d3..55203c5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,6 +245,7 @@ PLATFORMS ruby DEPENDENCIES + bourbon cmtool! coffee-script couch_potato! diff --git a/app/assets/stylesheets/cmtool/structure.css.sass b/app/assets/stylesheets/cmtool/structure.css.sass index 3984a08..5590937 100644 --- a/app/assets/stylesheets/cmtool/structure.css.sass +++ b/app/assets/stylesheets/cmtool/structure.css.sass @@ -36,13 +36,8 @@ a margin: 0 padding: 0 li - @include linear-gradient(#2989d8, #1e5799) float: left margin-right: 10px - padding: 3px 6px - +border-bottom-radius(5px) - a - color: white #title-container margin-top: 12px @include linear-gradient(#aaa, #fff) diff --git a/app/assets/stylesheets/cmtool/table.css.sass b/app/assets/stylesheets/cmtool/table.css.sass index 6d838a1..89440f0 100644 --- a/app/assets/stylesheets/cmtool/table.css.sass +++ b/app/assets/stylesheets/cmtool/table.css.sass @@ -1,13 +1,5 @@ @import bourbon -table +table.index-table td.action - //@include radial-gradient(50% 50%, circle cover, #1e5799, #2989d8) - a - display: block - width: 16px - height: 16px - padding: 4px - @include radial-gradient(50% 50%, circle cover, #fff, #aaa) - &:hover - @include radial-gradient(50% 50%, circle cover, #ffc, #aaa) + width: 24px diff --git a/app/assets/stylesheets/cmtool/twittered.css.sass b/app/assets/stylesheets/cmtool/twittered.css.sass new file mode 100644 index 0000000..040274a --- /dev/null +++ b/app/assets/stylesheets/cmtool/twittered.css.sass @@ -0,0 +1,13 @@ + +#sub-navigation-container + ul + list-style: none + margin: 0 + padding: 0 + li + float: left + margin-right: 10px +body + textarea + &.editor_full + width: 100% diff --git a/app/controllers/cmtool/passwords_controller.rb b/app/controllers/cmtool/passwords_controller.rb index 17da516..5d9db33 100644 --- a/app/controllers/cmtool/passwords_controller.rb +++ b/app/controllers/cmtool/passwords_controller.rb @@ -1,5 +1,5 @@ module Cmtool class PasswordsController < Devise::PasswordsController - layout 'cmtool/sessions' + layout 'cmtool/devise' end end diff --git a/app/controllers/cmtool/sessions_controller.rb b/app/controllers/cmtool/sessions_controller.rb index b4ca969..3830363 100644 --- a/app/controllers/cmtool/sessions_controller.rb +++ b/app/controllers/cmtool/sessions_controller.rb @@ -1,5 +1,5 @@ module Cmtool class SessionsController < ::Devise::SessionsController - layout 'cmtool/sessions' + layout 'cmtool/devise' end end diff --git a/app/helpers/cmtool/application_helper.rb b/app/helpers/cmtool/application_helper.rb index d6391dd..a0387a8 100644 --- a/app/helpers/cmtool/application_helper.rb +++ b/app/helpers/cmtool/application_helper.rb @@ -116,14 +116,14 @@ module Cmtool def edit_td(obj) content_tag( :td, - link_to((content_tag(:span, 'edit', class: ['ui-icon', 'ui-icon-pencil'])), cmtool.url_for([:edit, obj]), class: [:edit]), + link_to((content_tag(:span, t('cmtool.table.index.edit'), class: [:edit, 'icon-pencil'])), cmtool.url_for([:edit, obj]), class: [:edit, :btn, 'btn-warning', 'btn-mini']), class: [:action, :edit] ) end def destroy_td(obj) content_tag( :td, - link_to(content_tag(:span, 'delete', class: ['ui-icon', 'ui-icon-trash']), cmtool.url_for(obj), method: :delete, confirm: are_you_sure(obj), class: [:destroy]), + link_to(content_tag(:span, t('cmtool.table.index.destroy'), class: [:destroy, 'icon-trash']), cmtool.url_for(obj), method: :delete, confirm: are_you_sure(obj), class: [:destroy, :btn, 'btn-danger', 'btn-mini']), class: [:action, :destroy] ) end diff --git a/app/views/cmtool/application/_links.html.slim b/app/views/cmtool/application/_links.html.slim new file mode 100644 index 0000000..689d28c --- /dev/null +++ b/app/views/cmtool/application/_links.html.slim @@ -0,0 +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] + + - if devise_mapping.registerable? && controller_name != 'registrations' + li= link_to t('devise.registrations.button'), new_registration_path(resource_name), class: [:devise, :btn] + + - if devise_mapping.recoverable? && controller_name != 'passwords' + li= link_to t('devise.sessions.forgot_your_password'), new_password_path(resource_name), class: [:devise, :btn] + + - 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] + + - 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] + + - 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] diff --git a/app/views/cmtool/contact_forms/edit.html.haml b/app/views/cmtool/contact_forms/edit.html.haml index f1c6368..ce93b37 100644 --- a/app/views/cmtool/contact_forms/edit.html.haml +++ b/app/views/cmtool/contact_forms/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@contact_form), cmtool.contact_form_path(@contact_form) - - %li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path + %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] diff --git a/app/views/cmtool/contact_forms/index.html.haml b/app/views/cmtool/contact_forms/index.html.haml index c40af17..251726e 100644 --- a/app/views/cmtool/contact_forms/index.html.haml +++ b/app/views/cmtool/contact_forms/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::ContactForm - if @contact_forms.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::ContactForm.human_attribute_name(:gender) @@ -23,4 +23,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path + %li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/contact_forms/new.html.haml b/app/views/cmtool/contact_forms/new.html.haml index 730119c..8053acc 100644 --- a/app/views/cmtool/contact_forms/new.html.haml +++ b/app/views/cmtool/contact_forms/new.html.haml @@ -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 + %li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: [:btn] diff --git a/app/views/cmtool/contact_forms/show.html.haml b/app/views/cmtool/contact_forms/show.html.haml index 4c1d1b6..bcabac2 100644 --- a/app/views/cmtool/contact_forms/show.html.haml +++ b/app/views/cmtool/contact_forms/show.html.haml @@ -17,6 +17,5 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@contact_form), cmtool.edit_contact_form_path(@contact_form) - - %li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path + %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] diff --git a/app/views/cmtool/directories/_image.html.haml b/app/views/cmtool/directories/_image.html.haml index ad591b3..48dc2a3 100644 --- a/app/views/cmtool/directories/_image.html.haml +++ b/app/views/cmtool/directories/_image.html.haml @@ -1,5 +1,5 @@ %tr - %td.image.thumb= link_to(image_tag(image.file.url(:thumb)), cmtool.image_path(image) + %td.image.thumb= link_to(image_tag(image.file.url(:thumb)), cmtool.image_path(image)) %td= link_to image.clean_name, cmtool.image_path(image) %td %td.action.destroy.directory= link_to link_to_destroy_content(image), cmtool.image_path(image), :method => :delete, :confirm => are_you_sure(image) diff --git a/app/views/cmtool/directories/edit.html.haml b/app/views/cmtool/directories/edit.html.haml index 510e01c..5c43f93 100644 --- a/app/views/cmtool/directories/edit.html.haml +++ b/app/views/cmtool/directories/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@directory), cmtool.directory_path(@directory) - - %li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path + %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] diff --git a/app/views/cmtool/directories/index.html.haml b/app/views/cmtool/directories/index.html.haml index b9be5a0..00950ea 100644 --- a/app/views/cmtool/directories/index.html.haml +++ b/app/views/cmtool/directories/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::Directory - if @directories.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::Directory.human_attribute_name(:name) @@ -17,4 +17,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path + %li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/directories/new.html.haml b/app/views/cmtool/directories/new.html.haml index 5918f0a..849a10e 100644 --- a/app/views/cmtool/directories/new.html.haml +++ b/app/views/cmtool/directories/new.html.haml @@ -4,4 +4,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path + %li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn] diff --git a/app/views/cmtool/directories/show.html.haml b/app/views/cmtool/directories/show.html.haml index 8cdf950..3f04d73 100644 --- a/app/views/cmtool/directories/show.html.haml +++ b/app/views/cmtool/directories/show.html.haml @@ -1,13 +1,17 @@ - title :show, Cmtool::Directory - content_for :onload_javascript do $('.add-image-container').dialog({modal: true, autoOpen: false, width: 400}) -.add-image-container - = form_for [cmtool, Cmtool::Image.new(directory_id: @directory.id)], :html => { :multipart => true } do |f| - = f.hidden_field :directory_id - = f.file_field :file - = f.submit t('cmtool.directory.add_image.label', image: Cmtool::Image.model_name.human) +#add-image-container.modal.hide.fade + .modal-header= t('cmtool.directory.add_file') + = form_for [cmtool, Cmtool::Image.new(directory_id: @directory.id)], :html => { :multipart => true, :id => 'add_image_form' } do |f| + .modal-body + = 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'] .directory.caption= "/#{@directory.tree_path.map{|d| link_to(d.name, cmtool.directory_path(d))}.join('/')}".html_safe -%table#directory-view +%table#directory-view.table.table-striped.table-hover %thead %tbody %tr @@ -27,9 +31,6 @@ %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) - - %li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path - - %li= link_to_function t('cmtool.directoy.add_file'), %|$('.add-image-container').dialog('open')| + %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} diff --git a/app/views/cmtool/faqs/edit.html.haml b/app/views/cmtool/faqs/edit.html.haml index a311b02..194d418 100644 --- a/app/views/cmtool/faqs/edit.html.haml +++ b/app/views/cmtool/faqs/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@faq), cmtool.faq_path(@faq) - - %li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path + %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] diff --git a/app/views/cmtool/faqs/index.html.haml b/app/views/cmtool/faqs/index.html.haml index 7ed26ee..1f8ff1c 100644 --- a/app/views/cmtool/faqs/index.html.haml +++ b/app/views/cmtool/faqs/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::Faq - if @faqs.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::Faq.human_attribute_name(:question) @@ -19,4 +19,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path + %li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/faqs/new.html.haml b/app/views/cmtool/faqs/new.html.haml index 807384b..6fea2af 100644 --- a/app/views/cmtool/faqs/new.html.haml +++ b/app/views/cmtool/faqs/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path + %li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn] diff --git a/app/views/cmtool/faqs/show.html.haml b/app/views/cmtool/faqs/show.html.haml index 72f346f..ab71a14 100644 --- a/app/views/cmtool/faqs/show.html.haml +++ b/app/views/cmtool/faqs/show.html.haml @@ -8,6 +8,6 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@faq), cmtool.edit_faq_path(@faq) + %li= link_to link_to_edit_content(@faq), cmtool.edit_faq_path(@faq), class: ['btn', 'btn-warning'] - %li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path + %li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn] diff --git a/app/views/cmtool/images/edit.html.haml b/app/views/cmtool/images/edit.html.haml index 86aa09c..ddf6e59 100644 --- a/app/views/cmtool/images/edit.html.haml +++ b/app/views/cmtool/images/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@image), cmtool.image_path(@image) - - %li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path + %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] diff --git a/app/views/cmtool/images/index.html.haml b/app/views/cmtool/images/index.html.haml index 8313595..0b5668e 100644 --- a/app/views/cmtool/images/index.html.haml +++ b/app/views/cmtool/images/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::Image - if @images.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::Image.model_name.human @@ -19,7 +19,7 @@ %td= link_to image.file_file_name, cmtool.image_path(image) %td= image.file_content_type %td= human_size image.file_file_size - %td= l image.file_updated_at #, :format => :short + %td= l image.file_updated_at, :format => :short = edit_td image = destroy_td image - else @@ -27,4 +27,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path + %li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/images/index.js.erb b/app/views/cmtool/images/index.js.erb index 5482e72..2223f4f 100644 --- a/app/views/cmtool/images/index.js.erb +++ b/app/views/cmtool/images/index.js.erb @@ -1,3 +1,3 @@ var tinyMCEImageList = new Array( - <%= Cmtool::Image.active.map{|i| %{['#{i.clean_name} (Origineel)', '#{i.file.url(:original)}'], ['#{i.clean_name} (Pagina)', '#{i.file.url(:page)}'], ['#{i.clean_name} (Medium)', '#{i.file.url(:medium)}'], ['#{i.clean_name} (Thumb)', '#{i.file.url(:thumb)}']}}.join(",\n") %> + <%=raw Cmtool::Image.active.map{|i| %{['#{i.clean_name} (Origineel)', '#{i.file.url(:original)}'], ['#{i.clean_name} (Pagina)', '#{i.file.url(:page)}'], ['#{i.clean_name} (Medium)', '#{i.file.url(:medium)}'], ['#{i.clean_name} (Thumb)', '#{i.file.url(:thumb)}']}}.join(",\n") %> ); diff --git a/app/views/cmtool/images/new.html.haml b/app/views/cmtool/images/new.html.haml index 60c20d1..86ea208 100644 --- a/app/views/cmtool/images/new.html.haml +++ b/app/views/cmtool/images/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path + %li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn] diff --git a/app/views/cmtool/images/show.html.haml b/app/views/cmtool/images/show.html.haml index c60ac50..b49dd6b 100644 --- a/app/views/cmtool/images/show.html.haml +++ b/app/views/cmtool/images/show.html.haml @@ -17,8 +17,6 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@image), cmtool.edit_image_path(@image) - - %li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, :class => %w[new image] - - %li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path + %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] diff --git a/app/views/cmtool/keywords/edit.html.haml b/app/views/cmtool/keywords/edit.html.haml index 586a75a..61041b2 100644 --- a/app/views/cmtool/keywords/edit.html.haml +++ b/app/views/cmtool/keywords/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@keyword), cmtool.keyword_path(@keyword) - - %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path + %li= link_to link_to_show_content(@keyword), cmtool.keyword_path(@keyword), class: ['btn', 'btn-info'] + %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: [:btn] diff --git a/app/views/cmtool/keywords/index.html.haml b/app/views/cmtool/keywords/index.html.haml index 7033e2c..83a9614 100644 --- a/app/views/cmtool/keywords/index.html.haml +++ b/app/views/cmtool/keywords/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::Keyword - if @keywords.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::Keyword.human_attribute_name(:name) @@ -17,4 +17,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path + %li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/keywords/new.html.haml b/app/views/cmtool/keywords/new.html.haml index 1bdb933..bc0941a 100644 --- a/app/views/cmtool/keywords/new.html.haml +++ b/app/views/cmtool/keywords/new.html.haml @@ -4,4 +4,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path + %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: ['btn', 'btn-warning'] diff --git a/app/views/cmtool/keywords/show.html.haml b/app/views/cmtool/keywords/show.html.haml index 991c4c8..e9a7c34 100644 --- a/app/views/cmtool/keywords/show.html.haml +++ b/app/views/cmtool/keywords/show.html.haml @@ -5,6 +5,5 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@keyword), cmtool.edit_keyword_path(@keyword) - - %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path + %li= link_to link_to_edit_content(@keyword), cmtool.edit_keyword_path(@keyword), class: ['btn', 'btn-warning'] + %li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: [:btn] diff --git a/app/views/cmtool/news/edit.html.haml b/app/views/cmtool/news/edit.html.haml index cf1d080..4ddd938 100644 --- a/app/views/cmtool/news/edit.html.haml +++ b/app/views/cmtool/news/edit.html.haml @@ -5,6 +5,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@news), cmtool.news_path(@news) - - %li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path + %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] diff --git a/app/views/cmtool/news/index.html.haml b/app/views/cmtool/news/index.html.haml index 9f1e6fc..889e378 100644 --- a/app/views/cmtool/news/index.html.haml +++ b/app/views/cmtool/news/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::News - if @news.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::News.human_attribute_name(:title) @@ -21,4 +21,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path + %li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/news/new.html.haml b/app/views/cmtool/news/new.html.haml index a6052ea..508588b 100644 --- a/app/views/cmtool/news/new.html.haml +++ b/app/views/cmtool/news/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path + %li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn] diff --git a/app/views/cmtool/news/show.html.haml b/app/views/cmtool/news/show.html.haml index a80743d..842d2e3 100644 --- a/app/views/cmtool/news/show.html.haml +++ b/app/views/cmtool/news/show.html.haml @@ -24,6 +24,5 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@news), cmtool.edit_news_path(@news) - - %li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path + %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] diff --git a/app/views/cmtool/newsletter_subscriptions/edit.html.haml b/app/views/cmtool/newsletter_subscriptions/edit.html.haml index 8527baa..38cde4b 100644 --- a/app/views/cmtool/newsletter_subscriptions/edit.html.haml +++ b/app/views/cmtool/newsletter_subscriptions/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@newsletter_subscription), cmtool.newsletter_subscription_path(@newsletter_subscription) - - %li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path + %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] diff --git a/app/views/cmtool/newsletter_subscriptions/index.html.haml b/app/views/cmtool/newsletter_subscriptions/index.html.haml index 5fbeaf8..f9f55fe 100644 --- a/app/views/cmtool/newsletter_subscriptions/index.html.haml +++ b/app/views/cmtool/newsletter_subscriptions/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::NewsletterSubscription - if @newsletter_subscriptions.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::NewsletterSubscription.human_attribute_name(:email) @@ -21,4 +21,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path + %li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/newsletter_subscriptions/new.html.haml b/app/views/cmtool/newsletter_subscriptions/new.html.haml index 9eb06b6..446772c 100644 --- a/app/views/cmtool/newsletter_subscriptions/new.html.haml +++ b/app/views/cmtool/newsletter_subscriptions/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path + %li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn] diff --git a/app/views/cmtool/newsletter_subscriptions/show.html.haml b/app/views/cmtool/newsletter_subscriptions/show.html.haml index 60eb685..f7f523e 100644 --- a/app/views/cmtool/newsletter_subscriptions/show.html.haml +++ b/app/views/cmtool/newsletter_subscriptions/show.html.haml @@ -11,6 +11,5 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@newsletter_subscription), cmtool.edit_newsletter_subscription_path(@newsletter_subscription) - - %li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path + %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] diff --git a/app/views/cmtool/pages/edit.html.haml b/app/views/cmtool/pages/edit.html.haml index 298ab84..5ec33da 100644 --- a/app/views/cmtool/pages/edit.html.haml +++ b/app/views/cmtool/pages/edit.html.haml @@ -3,7 +3,7 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Page), cmtool.pages_path - %li= link_to link_to_show_content(@page), cmtool.page_path(@page) - %li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page) - %li= link_to link_to_destroy_content(@page), cmtool.page_path(@page), :confirm => are_you_sure?(@page), :method => :delete + %li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn] + %li= link_to link_to_show_content(@page), cmtool.page_path(@page), class: ['btn', 'btn-info'] + %li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: ['btn', 'btn-warning'] + %li= link_to link_to_destroy_content(@page), cmtool.page_path(@page), :confirm => are_you_sure?(@page), :method => :delete, class: ['btn', 'btn-danger'] diff --git a/app/views/cmtool/pages/index.html.haml b/app/views/cmtool/pages/index.html.haml index c422414..2519538 100644 --- a/app/views/cmtool/pages/index.html.haml +++ b/app/views/cmtool/pages/index.html.haml @@ -1,5 +1,5 @@ - title :index, Page -%table.index-table.table.table-striped +%table.index-table.table.table-striped.table-hover %thead %tr %th= Page.human_attribute_name(:name) @@ -18,4 +18,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Page), cmtool.new_page_path + %li= link_to link_to_new_content(Page), cmtool.new_page_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/pages/new.html.haml b/app/views/cmtool/pages/new.html.haml index 0b05ba1..36a7c28 100644 --- a/app/views/cmtool/pages/new.html.haml +++ b/app/views/cmtool/pages/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Page), cmtool.pages_path + %li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn] diff --git a/app/views/cmtool/pages/show.html.haml b/app/views/cmtool/pages/show.html.haml index f82d02e..7de7077 100644 --- a/app/views/cmtool/pages/show.html.haml +++ b/app/views/cmtool/pages/show.html.haml @@ -26,9 +26,6 @@ .show_field %strong= Page.human_attribute_name(:layout) = @page.layout -.show_field - %strong= Page.human_attribute_name(:default) - = boolean_text @page.default .show_field %strong= Page.human_attribute_name(:has_view) =# boolean_text template_exist?("pages/#{@page.name}") @@ -38,5 +35,5 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Page), cmtool.pages_path - %li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page) + %li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn] + %li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: ['btn', 'btn-warning'] diff --git a/app/views/cmtool/passwords/edit.html.haml b/app/views/cmtool/passwords/edit.html.haml deleted file mode 100644 index 184a333..0000000 --- a/app/views/cmtool/passwords/edit.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -%h2 Verander wachtwoord -= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| - = devise_error_messages! - = f.hidden_field :reset_password_token - .field - = f.label :password, "Nieuw wachtwoord" - = f.password_field :password - .field - = f.label :password_confirmation, "Bevestig nieuw wachtwoord" - = f.password_field :password_confirmation - .actions - = f.submit "Verander mijn wachtwoord" -= render :partial => "devise/shared/links" diff --git a/app/views/cmtool/passwords/edit.html.slim b/app/views/cmtool/passwords/edit.html.slim new file mode 100644 index 0000000..7e2fd3e --- /dev/null +++ b/app/views/cmtool/passwords/edit.html.slim @@ -0,0 +1,14 @@ +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/cmtool/passwords/new.html.haml b/app/views/cmtool/passwords/new.html.haml deleted file mode 100644 index c8aaa27..0000000 --- a/app/views/cmtool/passwords/new.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -%h2 Wachtwoord vergeten? -= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| - = devise_error_messages! - .field - = f.label :email - = f.email_field :email - .field - = f.submit "Stuur mij instructies om mijn wachtwoord te vernieuwen" -= render :partial => "devise/shared/links" diff --git a/app/views/cmtool/passwords/new.html.slim b/app/views/cmtool/passwords/new.html.slim new file mode 100644 index 0000000..b3c0ca3 --- /dev/null +++ b/app/views/cmtool/passwords/new.html.slim @@ -0,0 +1,10 @@ +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/cmtool/quotes/edit.html.haml b/app/views/cmtool/quotes/edit.html.haml index 528a9a4..3ed3448 100644 --- a/app/views/cmtool/quotes/edit.html.haml +++ b/app/views/cmtool/quotes/edit.html.haml @@ -3,6 +3,5 @@ - content_for :page_links do %ul - %li= link_to link_to_show_content(@quote), cmtool.quote_path(@quote) - - %li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path + %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] diff --git a/app/views/cmtool/quotes/index.html.haml b/app/views/cmtool/quotes/index.html.haml index 12e8259..9ce3e8a 100644 --- a/app/views/cmtool/quotes/index.html.haml +++ b/app/views/cmtool/quotes/index.html.haml @@ -1,6 +1,6 @@ - title :index, Cmtool::Quote - if @quotes.any? - %table.index-table + %table.index-table.table.table-striped.table-hover %thead %tr %th= Cmtool::Quote.human_attribute_name(:owner) @@ -23,4 +23,4 @@ - content_for :page_links do %ul - %li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path + %li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path, class: ['btn', 'btn-primary'] diff --git a/app/views/cmtool/quotes/new.html.haml b/app/views/cmtool/quotes/new.html.haml index 1ddfe61..e980b93 100644 --- a/app/views/cmtool/quotes/new.html.haml +++ b/app/views/cmtool/quotes/new.html.haml @@ -3,4 +3,4 @@ - content_for :page_links do %ul - %li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path + %li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn] diff --git a/app/views/cmtool/quotes/show.html.haml b/app/views/cmtool/quotes/show.html.haml index a251434..526fbee 100644 --- a/app/views/cmtool/quotes/show.html.haml +++ b/app/views/cmtool/quotes/show.html.haml @@ -21,6 +21,5 @@ - content_for :page_links do %ul - %li= link_to link_to_edit_content(@quote), cmtool.edit_quote_path(@quote) - - %li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path + %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] diff --git a/app/views/cmtool/sessions/new.html.haml b/app/views/cmtool/sessions/new.html.haml deleted file mode 100644 index 6558004..0000000 --- a/app/views/cmtool/sessions/new.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -%h2= t('cmtool.sessions.new.title') -= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| - .field - = f.label :email - = f.email_field :email - .field - = f.label :password - = f.password_field :password - - - if devise_mapping.rememberable? - .field - = f.check_box :remember_me - = f.label :remember_me - .actions - = f.submit t('cmtool.sessions.new.label'), class: :button, id: 'new-session-button' -= render :partial => "devise/shared/links" diff --git a/app/views/cmtool/sessions/new.html.slim b/app/views/cmtool/sessions/new.html.slim new file mode 100644 index 0000000..05f5bfc --- /dev/null +++ b/app/views/cmtool/sessions/new.html.slim @@ -0,0 +1,19 @@ +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/cmtool/sessions/sessions/new.html.haml b/app/views/cmtool/sessions/sessions/new.html.haml deleted file mode 100644 index 5bd4393..0000000 --- a/app/views/cmtool/sessions/sessions/new.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -%h2 Inloggen voor toegang tot extra diensten -= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| - .field - = f.label :email - = f.email_field :email, value: params[:email] - .field - = f.label :password - = f.password_field :password, value: params[:password] - - - if devise_mapping.rememberable? - .field - = f.check_box :remember_me - = f.label :remember_me, t('devise.sessions.remember_me') - = button_tag t('devise.sessions.sign_in'), id: 'new-session-button', class: :button - - else - .field - = button_tag t('devise.sessions.sign_in'), id: 'new-session-button', class: :button -= render :partial => "devise/shared/links" diff --git a/app/views/devise/_devise_links.html.slim b/app/views/devise/_devise_links.html.slim new file mode 100644 index 0000000..689d28c --- /dev/null +++ b/app/views/devise/_devise_links.html.slim @@ -0,0 +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] + + - if devise_mapping.registerable? && controller_name != 'registrations' + li= link_to t('devise.registrations.button'), new_registration_path(resource_name), class: [:devise, :btn] + + - if devise_mapping.recoverable? && controller_name != 'passwords' + li= link_to t('devise.sessions.forgot_your_password'), new_password_path(resource_name), class: [:devise, :btn] + + - 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] + + - 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] + + - 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] diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index b7ae403..1dc5ca6 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -9,4 +9,4 @@
Welcome <%= @resource.email %>!
-You can confirm your account through the link below:
+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 new file mode 100644 index 0000000..ae9e888 --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -0,0 +1,8 @@ +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/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml deleted file mode 100644 index 88fdb8d..0000000 --- a/app/views/devise/mailer/reset_password_instructions.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%p= "Hello #{@resource.email}!" - -%p Someone has requested a link to change your password, and you can do this through the link below. - -%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) - -%p If you didn't request this, please ignore this email. -%p Your password won't change until you access the link above and create a new one. -%p With kind regards, -%p The ATool team diff --git a/app/views/devise/mailer/reset_password_instructions.nl.html.haml b/app/views/devise/mailer/reset_password_instructions.nl.html.haml deleted file mode 100644 index 075ce62..0000000 --- a/app/views/devise/mailer/reset_password_instructions.nl.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -%p= "Hallo #{@resource.email}!" -%p Er is een nieuw wachtwoord voor je aangevraagt. Dit kan je bevestigen door naar de onderstaande link te gaan. -%p= link_to 'Wijzig wachtwoord', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) -%p Als deze aanvraag niet van jou is kan je deze email negeren. Het wachtwoord wordt niet gewijzigd zonder dat de bovenstaande link gebruikt wordt. -%p Met vriendelijke groet, -%p Het ATool team diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb deleted file mode 100644 index ff76588..0000000 --- a/app/views/devise/passwords/edit.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -