1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

More view refactoring.

This commit is contained in:
Dan Barber 2014-12-13 18:11:34 +00:00
parent a68671ce45
commit 2cff6908b9
20 changed files with 36 additions and 36 deletions

View File

@ -2,6 +2,6 @@
%td= admin_user.email %td= admin_user.email
%td= admin_user.last_sign_in_at %td= admin_user.last_sign_in_at
%td= admin_user.last_sign_in_ip %td= admin_user.last_sign_in_ip
%td{ :class => :actions } %td{ class: :actions }
- unless admin_user == current_admin_user - unless admin_user == current_admin_user
= link_to "Delete", admin_admin_user_path(admin_user), method: :delete, confirm: "Are you sure you wish to delete this Admin User?" = link_to 'Delete', admin_admin_user_path(admin_user), method: :delete, confirm: 'Are you sure you wish to delete this Admin User?'

View File

@ -1,2 +1,2 @@
%h2 Edit Admin User %h2 Edit Admin User
= render partial: "form", locals: { admin_user: @admin_user } = render 'form', admin_user: @admin_user

View File

@ -1,11 +1,11 @@
%h3 Change your password %h3 Change your password
= simple_form_for(@admin_user, :url => update_password_admin_admin_user_path, html: { method: :put }) do |f| = simple_form_for(@admin_user, url: update_password_admin_admin_user_path, html: { method: :put }) do |f|
= inputs_field_set do = inputs_field_set do
= f.input :current_password = f.input :current_password
= inputs_field_set do = inputs_field_set do
= f.input :password, label: "New Password" = f.input :password, label: 'New Password'
= f.input :password_confirmation, label: "Confirm Password" = f.input :password_confirmation, label: 'Confirm Password'
= actions_field_set do = actions_field_set do
= f.submit "Change my password" = f.submit 'Change my password'

View File

@ -8,7 +8,7 @@
%th IP Address %th IP Address
%th %th
%tbody %tbody
= render partial: "admin_user", collection: @admin_users = render partial: 'admin_user', collection: @admin_users
%tfoot %tfoot
%tr %tr
%td{ colspan: 4 } %td{ colspan: 4 }

View File

@ -1,2 +1,2 @@
%h2 New Admin User %h2 New Admin User
= render partial: "form", locals: { admin_user: @admin_user } = render 'form', admin_user: @admin_user

View File

@ -1,2 +1,2 @@
%h2 Edit Category %h2 Edit Category
= render partial: "form", locals: { category: @category } = render 'form', category: @category

View File

@ -1,2 +1,2 @@
%h2 New Category %h2 New Category
= render partial: "form", locals: { category: @category } = render 'form', category: @category

View File

@ -6,6 +6,6 @@
= f.input :email = f.input :email
= actions_field_set do = actions_field_set do
= f.submit "Resend confirmation instructions" = f.submit 'Resend confirmation instructions'
= render partial: "devise/shared/links" = render 'devise/shared/links'

View File

@ -9,4 +9,4 @@
= f.input :password_confirmation, :label 'Confirm Password' = f.input :password_confirmation, :label 'Confirm Password'
= hidden_field_tag :confirmation_token, @confirmation_token = hidden_field_tag :confirmation_token, @confirmation_token
= f.actions do = f.actions do
= f.submit "Activate" = f.submit 'Activate'

View File

@ -2,13 +2,13 @@
%html %html
%head %head
%title= "#{APP_CONFIG['name']} Admin" %title= "#{APP_CONFIG['name']} Admin"
= stylesheet_link_tag "admin" = stylesheet_link_tag 'admin'
= javascript_include_tag "admin" = javascript_include_tag 'admin'
= csrf_meta_tag = csrf_meta_tag
%body %body
#page #page
%header{ role: "banner" }= render partial: "admin/shared/header" %header{ role: 'banner' }= render 'admin/shared/header'
= render partial: "shared/flash_messages" = render 'shared/flash_messages'
= yield = yield
%footer{ role: "footer" }= render partial: "admin/shared/footer" %footer{ role: 'footer' }= render 'admin/shared/footer'

View File

@ -2,12 +2,12 @@
%html %html
%head %head
%title= "#{APP_CONFIG['name']} Admin" %title= "#{APP_CONFIG['name']} Admin"
= stylesheet_link_tag "admin" = stylesheet_link_tag 'admin'
= javascript_include_tag "admin" = javascript_include_tag 'admin'
= csrf_meta_tag = csrf_meta_tag
%body %body
#login #login
%header{ role: "banner" }= render partial: "admin/shared/login_header" %header{ role: 'banner' }= render 'admin/shared/login_header'
= render partial: "shared/flash_messages" = render 'shared/flash_messages'
= yield = yield

View File

@ -1,2 +1,2 @@
%h2 Edit Page %h2 Edit Page
= render :partial => "form", :locals => { :page => @page } = render 'form', page: @page

View File

@ -7,7 +7,7 @@
%th Title %th Title
%th %th
%tbody %tbody
= render partial: "page", collection: @pages = render partial: 'page', collection: @pages
%tfoot %tfoot
%tr %tr
%td{ colspan: 4 } %td{ colspan: 4 }

View File

@ -2,7 +2,7 @@
%ul.categories %ul.categories
- @categories.each do |photo_category| - @categories.each do |photo_category|
%li %li
= check_box_tag "photo[category_ids][]", photo_category.id, @photo.categories.include?(photo_category), id: "photo_category_ids_#{photo_category.id}" = check_box_tag 'photo[category_ids][]', photo_category.id, @photo.categories.include?(photo_category), id: "photo_category_ids_#{photo_category.id}"
= label_tag "photo_category_ids_#{photo_category.id}", photo_category.name = label_tag "photo_category_ids_#{photo_category.id}", photo_category.name
= inputs_field_set do = inputs_field_set do

View File

@ -9,6 +9,6 @@
= f.input :remember_me, as: :boolean = f.input :remember_me, as: :boolean
= actions_field_set do = actions_field_set do
= f.submit "Sign In" = f.submit 'Sign In'
= render partial: "devise/shared/links" = render 'devise/shared/links'

View File

@ -1,3 +1,3 @@
%h1= link_to APP_CONFIG['name'], admin_dashboard_path %h1= link_to APP_CONFIG['name'], admin_dashboard_path
= render "admin/shared/user" = render 'admin/shared/user'
= render "admin/shared/menu" = render 'admin/shared/menu'

View File

@ -1,4 +1,4 @@
%nav %nav
%ul %ul
- @admin_menu.each do |key, value| - @admin_menu.each do |key, value|
= render partial: "admin/shared/menu_item", locals: { menu_item: key } = render 'admin/shared/menu_item', menu_item: key

View File

@ -1 +1 @@
%li= link_to menu_item.to_s.gsub(/_/, ' ').titleize, { controller: menu_item }, class: (params[:controller] == "admin/" + menu_item.to_s ? "selected" : nil) %li= link_to menu_item.to_s.gsub(/_/, ' ').titleize, { controller: menu_item }, class: (params[:controller] == "admin/#{menu_item}" ? 'selected' : nil)

View File

@ -1,6 +1,6 @@
#user #user
%strong= current_admin_user.email %strong= current_admin_user.email
| |
= link_to "Change Password", edit_password_admin_admin_user_path = link_to 'Change Password', edit_password_admin_admin_user_path
| |
= link_to "Logout", destroy_admin_user_session_path, method: :delete = link_to 'Logout', destroy_admin_user_session_path, method: :delete

View File

@ -6,6 +6,6 @@
= f.input :email = f.input :email
= actions_field_set do = actions_field_set do
= f.submit "Resend unlock instructions" = f.submit 'Resend unlock instructions'
= render partial: "devise/shared/links" = render partial: 'devise/shared/links'