Depricate haml

This commit is contained in:
2014-12-11 13:41:09 +01:00
parent b5a24fd346
commit a4bef656cc
98 changed files with 661 additions and 681 deletions
+1 -2
View File
@@ -5,7 +5,7 @@ source "http://rubygems.org"
# development dependencies will be added by default to the :development group.
gemspec
gem "rails", "4.2.0.beta4"
gem "rails", "4.2.0.rc2"
group :assets do
gem 'sass-rails', '5.0.0.beta1'
gem 'bourbon'
@@ -21,7 +21,6 @@ gem 'orm_adapter', github: 'bterkuile/orm_adapter'
gem 'devise'
gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored'
gem 'tinymce-rails'
gem 'haml-rails'
gem 'slim-rails'
gem 'paperclip'
gem 'email_validator'
+58 -65
View File
@@ -22,7 +22,7 @@ GIT
GIT
remote: git://github.com/bterkuile/simply_stored.git
revision: 354fde89a88c1384ccc9d82989e3f05ac6977bd1
revision: 8f00644f7a8e82dba057c01f86dbb8bc3154d5d8
specs:
simply_stored (1.0.0)
activesupport
@@ -35,52 +35,52 @@ PATH
cmtool (1.0.0)
bourbon
email_validator
haml-rails
jquery-rails
paperclip
slim-rails
tinymce-rails
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.2.0.beta4)
actionpack (= 4.2.0.beta4)
actionview (= 4.2.0.beta4)
activejob (= 4.2.0.beta4)
actionmailer (4.2.0.rc2)
actionpack (= 4.2.0.rc2)
actionview (= 4.2.0.rc2)
activejob (= 4.2.0.rc2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.4)
actionpack (4.2.0.beta4)
actionview (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
rack (~> 1.6.0.beta)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0.rc2)
actionview (= 4.2.0.rc2)
activesupport (= 4.2.0.rc2)
rack (~> 1.6.0.beta2)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionpack-page_caching (1.0.2)
actionpack (>= 4.0.0, < 5)
actionview (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
actionview (4.2.0.rc2)
activesupport (= 4.2.0.rc2)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
activejob (4.2.0.rc2)
activesupport (= 4.2.0.rc2)
globalid (>= 0.3.0)
activemodel (4.2.0.beta4)
activesupport (= 4.2.0.beta4)
activemodel (4.2.0.rc2)
activesupport (= 4.2.0.rc2)
builder (~> 3.1)
activerecord (4.2.0.beta4)
activemodel (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
arel (>= 6.0.0.beta2, < 6.1)
activesupport (4.2.0.beta4)
activerecord (4.2.0.rc2)
activemodel (= 4.2.0.rc2)
activesupport (= 4.2.0.rc2)
arel (~> 6.0)
activesupport (4.2.0.rc2)
i18n (>= 0.7.0.beta1, < 0.8)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (6.0.0.beta2)
arel (6.0.0)
bcrypt (3.1.9)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
@@ -96,7 +96,7 @@ GEM
xpath (~> 2.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.4)
cocaine (0.5.5)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.0)
coffee-script (2.3.0)
@@ -116,7 +116,7 @@ GEM
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
email_validator (1.4.0)
email_validator (1.5.0)
activemodel
erubis (2.7.0)
eventmachine (1.0.3)
@@ -128,19 +128,13 @@ GEM
railties (>= 3.0.0)
globalid (0.3.0)
activesupport (>= 4.1.0)
haml (4.0.5)
tilt
haml-rails (0.5.3)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0)
railties (>= 4.0.1)
hike (1.2.3)
i18n (0.7.0.beta1)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
jquery-rails (4.0.0)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0.beta, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.2)
jquery-ui-rails (5.0.3)
railties (>= 3.2.16)
json (1.8.1)
loofah (2.0.1)
@@ -150,11 +144,11 @@ GEM
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.1)
minitest (5.4.2)
minitest (5.4.3)
multi_json (1.10.1)
nokogiri (1.6.4)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
paperclip (4.2.0)
paperclip (4.2.1)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
@@ -165,37 +159,37 @@ GEM
slop (~> 3.4)
pry-rails (0.3.2)
pry (>= 0.9.10)
rack (1.6.0.beta)
rack (1.6.0.beta2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.2.0.beta4)
actionmailer (= 4.2.0.beta4)
actionpack (= 4.2.0.beta4)
actionview (= 4.2.0.beta4)
activejob (= 4.2.0.beta4)
activemodel (= 4.2.0.beta4)
activerecord (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
rails (4.2.0.rc2)
actionmailer (= 4.2.0.rc2)
actionpack (= 4.2.0.rc2)
actionview (= 4.2.0.rc2)
activejob (= 4.2.0.rc2)
activemodel (= 4.2.0.rc2)
activerecord (= 4.2.0.rc2)
activesupport (= 4.2.0.rc2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0.beta4)
sprockets-rails (~> 3.0.0.beta1)
railties (= 4.2.0.rc2)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.4)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
railties (4.2.0.beta4)
actionpack (= 4.2.0.beta4)
activesupport (= 4.2.0.beta4)
railties (4.2.0.rc2)
actionpack (= 4.2.0.rc2)
activesupport (= 4.2.0.rc2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
rdoc (4.1.2)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
responders (2.0.1)
responders (2.0.2)
railties (>= 4.2.0.alpha, < 5)
rest-client (1.6.8)
mime-types (~> 1.16)
@@ -219,7 +213,7 @@ GEM
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
sass (3.4.7)
sass (3.4.9)
sass-rails (5.0.0.beta1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2)
@@ -239,10 +233,10 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (3.0.0.beta1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (~> 2.8)
sprockets-rails (2.2.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
steak (2.0.0)
capybara (>= 1.0.0)
rspec-rails (>= 2.5.0)
@@ -277,13 +271,12 @@ DEPENDENCIES
devise_simply_stored!
email_validator
factory_girl_rails
haml-rails
jquery-rails
jquery-ui-rails
orm_adapter!
paperclip
pry-rails
rails (= 4.2.0.beta4)
rails (= 4.2.0.rc2)
rspec-its
sass-rails (= 5.0.0.beta1)
simply_stored!
+9 -24
View File
@@ -31,7 +31,6 @@ This will add some gems you might like anyway, here a list:
* jquery-rails
* tinymce-rails
* sass-rails
* haml-rails
* paperclip
* email_validator (validates :email, email: true)
@@ -41,22 +40,11 @@ This will add some gems you might like anyway, here a list:
in `app/controllers/pages_controller.rb`:
```ruby
class PagesController
class PagesController < ApplicationController
include Cmtool::Includes::PagesController
end
```
in `app/models/page.rb`:
```ruby
class Page
include Cmtool::Includes::Page
def self.layouts
%w[home application contact]
end
end
```
### Securing
Cmtool is looking for an authorize_cmtool method present in the application
@@ -102,22 +90,18 @@ goodies of your own. Remember that this is a SimplyStored model with almost
all the ActiveModel features.
### Page model
The page model allows you to control some interesting things. To create it
(app/models/page.rb):
The page model allows you to control some interesting things.
in `app/models/page.rb`:
```ruby
class Page
include Cmtool::Page
# Define the locales you want to use in your website
def self.locales
[:en]
end
include Cmtool::Includes::Page
# Define the layouts you want to use in your website. Be sure to create them in
# app/views/layouts/...
# The first specified layout will become the default
def self.layouts
[:application, :home, :contact]
%w[application home contact]
end
end
```
@@ -148,8 +132,9 @@ and changing this file will change all displayed pages without their own
specific page. To create a specific page, create a page with the name of the
page you created in the Admin section. If for example you have created a page
with the name: about Then you can give this page a custom look using the view:
`app/views/about.html.haml` You can also use erb, slim or your choice of
templating engine
`app/views/about.html.slim`
### The menu and getting pages
### Customize your 404
You can customize what is shown when a page cannot be found. There is a
@@ -12,9 +12,9 @@
.message.warning.ui-state-highlight
.icon
.text
%ul
ul
- for warning in warnings
- if warning.is_a?(Hash)
%li.warning= t("cmtool.warnings.#{warning.delete(:message)}", warning)
li.warning= t("cmtool.warnings.# warning.delete(:message) ", warning)
- else
%li.warning= t("cmtool.warnings.#{warning}")
li.warning= t("cmtool.warnings.# warning ")
@@ -1,6 +0,0 @@
-if target.errors.any?
#errorExplanation
%h2= t('cmtool.errors.form.title', :count => target.errors.count)
%ul
- target.errors.full_messages.each do |msg|
%li= msg
@@ -0,0 +1,6 @@
-if target.errors.any?
#errorExplanation
h2= t('cmtool.errors.form.title', :count => target.errors.count)
ul
- target.errors.full_messages.each do |msg|
li= msg
@@ -1,6 +1,6 @@
#user-info
#user-info-email= link_to current_user.email, cmtool.user_path(current_user)
#user-info-sign-in-out{class: user_signed_in? ? 'signed-in' : 'signed-out'}
#user-info-sign-in-out class: user_signed_in? ? 'signed-in' : 'signed-out'
- if user_signed_in?
= link_to t('devise.sessions.sign_out'), cmtool.destroy_user_session_path
- else
@@ -1,7 +0,0 @@
- title :edit, Cmtool::ContactForm
= render 'form', :submit => update_button_text(@contact_form)
- 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]
@@ -0,0 +1,7 @@
- title :edit, Cmtool::ContactForm
= render 'form', :submit => update_button_text(@contact_form)
- 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]
@@ -1,26 +0,0 @@
- title :index, Cmtool::ContactForm
- if @contact_forms.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::ContactForm.human_attribute_name(:gender)
%th= Cmtool::ContactForm.human_attribute_name(:name)
%th= Cmtool::ContactForm.human_attribute_name(:email)
%th= Cmtool::ContactForm.human_attribute_name(:phone)
%th
%th
%tbody
- @contact_forms.each do |contact_form|
%tr
%td= contact_form.gender
%td= link_to contact_form.name, cmtool.contact_form_path(contact_form)
%td= contact_form.email
%td= contact_form.phone
= edit_td contact_form
= destroy_td contact_form
- else
= empty_result(Cmtool::ContactForm)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path, class: ['btn', 'btn-primary']
@@ -0,0 +1,26 @@
- title :index, Cmtool::ContactForm
- if @contact_forms.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::ContactForm.human_attribute_name(:gender)
th= Cmtool::ContactForm.human_attribute_name(:name)
th= Cmtool::ContactForm.human_attribute_name(:email)
th= Cmtool::ContactForm.human_attribute_name(:phone)
th
th
tbody
- @contact_forms.each do |contact_form|
tr
td= contact_form.gender
td= link_to contact_form.name, cmtool.contact_form_path(contact_form)
td= contact_form.email
td= contact_form.phone
= edit_td contact_form
= destroy_td contact_form
- else
= empty_result(Cmtool::ContactForm)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::ContactForm), cmtool.new_contact_form_path, class: ['btn', 'btn-primary']
@@ -1,5 +1,5 @@
- title :new, Cmtool::ContactForm
= 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]
ul
li= link_to link_to_index_content(Cmtool::ContactForm), cmtool.contact_forms_path, class: [:btn]
@@ -1,21 +0,0 @@
- title :show, Cmtool::ContactForm
.show_field
%strong= Cmtool::ContactForm.human_attribute_name(:gender)
= @contact_form.gender
.show_field
%strong= Cmtool::ContactForm.human_attribute_name(:name)
= @contact_form.name
.show_field
%strong= Cmtool::ContactForm.human_attribute_name(:email)
= @contact_form.email
.show_field
%strong= Cmtool::ContactForm.human_attribute_name(:phone)
= @contact_form.phone
.show_field
%strong= Cmtool::ContactForm.human_attribute_name(:body)
=raw @contact_form.body
- 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]
@@ -0,0 +1,21 @@
- title :show, Cmtool::ContactForm
.show_field
strong= Cmtool::ContactForm.human_attribute_name(:gender)
= @contact_form.gender
.show_field
strong= Cmtool::ContactForm.human_attribute_name(:name)
= @contact_form.name
.show_field
strong= Cmtool::ContactForm.human_attribute_name(:email)
= @contact_form.email
.show_field
strong= Cmtool::ContactForm.human_attribute_name(:phone)
= @contact_form.phone
.show_field
strong= Cmtool::ContactForm.human_attribute_name(:body)
=raw @contact_form.body
- 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]
@@ -1 +0,0 @@
Ik ben een klant
@@ -0,0 +1 @@
| Ik ben een klant
@@ -1,5 +0,0 @@
%tr
%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)
@@ -0,0 +1,5 @@
tr
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)
@@ -1,7 +0,0 @@
- title :edit, Cmtool::Directory
= render 'form', :submit => update_button_text(@directory)
- 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]
@@ -0,0 +1,7 @@
- title :edit, Cmtool::Directory
= render 'form', :submit => update_button_text(@directory)
- 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]
@@ -1,20 +0,0 @@
- title :index, Cmtool::Directory
- if @directories.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::Directory.human_attribute_name(:name)
%th
%th
%tbody
- @directories.each do |directory|
%tr
%td= link_to directory.name, cmtool.directory_path(directory)
= edit_td directory
= destroy_td directory
- else
= empty_result(Cmtool::Directory)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path, class: ['btn', 'btn-primary']
@@ -0,0 +1,20 @@
- title :index, Cmtool::Directory
- if @directories.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::Directory.human_attribute_name(:name)
th
th
tbody
- @directories.each do |directory|
tr
td= link_to directory.name, cmtool.directory_path(directory)
= edit_td directory
= destroy_td directory
- else
= empty_result(Cmtool::Directory)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Directory), cmtool.new_directory_path, class: ['btn', 'btn-primary']
@@ -3,5 +3,5 @@
= render 'form', :submit => create_button_text(@directory)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::Directory), cmtool.directories_path, class: [:btn]
@@ -1,36 +0,0 @@
- title :show, Cmtool::Directory
- content_for :onload_javascript do
$('.add-image-container').dialog({modal: true, autoOpen: false, width: 400})
#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.table-striped.table-hover
%thead
%tbody
%tr
%td.directory.parent= link_to '..', (@directory.parent ? cmtool.directory_path(@directory.parent) : cmtool.directories_path)
%td
%td
%td
- for child in @directory.children
%tr
%td.directory.child= link_to child.name, cmtool.directory_path(child)
%td
%td
%td.action.destroy.directory= link_to link_to_destroy_content(child), cmtool.directory_path(child), :method => :delete, :confirm => are_you_sure(child)
- for image in @directory.images
= render 'image', :image => image
- content_for :page_links do
%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}
@@ -0,0 +1,36 @@
- title :show, Cmtool::Directory
- content_for :onload_javascript do
| $('.add-image-container').dialog({modal: true, autoOpen: false, width: 400})
#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.table-striped.table-hover
thead
tbody
tr
td.directory.parent= link_to '..', (@directory.parent ? cmtool.directory_path(@directory.parent) : cmtool.directories_path)
td
td
td
- for child in @directory.children
tr
td.directory.child= link_to child.name, cmtool.directory_path(child)
td
td
td.action.destroy.directory= link_to link_to_destroy_content(child), cmtool.directory_path(child), :method => :delete, :confirm => are_you_sure(child)
- for image in @directory.images
= render 'image', :image => image
- content_for :page_links do
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
-7
View File
@@ -1,7 +0,0 @@
- title :edit, @faq
= render 'form', :submit => update_button_text(@faq)
- 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]
+7
View File
@@ -0,0 +1,7 @@
- title :edit, @faq
= render 'form', :submit => update_button_text(@faq)
- 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]
-22
View File
@@ -1,22 +0,0 @@
- title :index, Cmtool::Faq
- if @faqs.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::Faq.human_attribute_name(:question)
%th= Cmtool::Faq.human_attribute_name(:answer)
%th
%th
%tbody
- @faqs.each do |faq|
%tr
%td= link_to raw(truncate(faq.question, :length => 40)), cmtool.faq_path(faq)
%td= link_to raw(truncate(faq.answer, :length => 40)), cmtool.faq_path(faq)
= edit_td faq
= destroy_td faq
- else
= empty_result(Cmtool::Faq)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path, class: ['btn', 'btn-primary']
+22
View File
@@ -0,0 +1,22 @@
- title :index, Cmtool::Faq
- if @faqs.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::Faq.human_attribute_name(:question)
th= Cmtool::Faq.human_attribute_name(:answer)
th
th
tbody
- @faqs.each do |faq|
tr
td= link_to raw(truncate(faq.question, :length => 40)), cmtool.faq_path(faq)
td= link_to raw(truncate(faq.answer, :length => 40)), cmtool.faq_path(faq)
= edit_td faq
= destroy_td faq
- else
= empty_result(Cmtool::Faq)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Faq), cmtool.new_faq_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@faq)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn]
-13
View File
@@ -1,13 +0,0 @@
- title :show, Cmtool::Faq
.show_field
%strong= Cmtool::Faq.human_attribute_name(:question)
=raw @faq.question
.show_field
%strong= Cmtool::Faq.human_attribute_name(:answer)
=raw @faq.answer
- 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_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn]
+13
View File
@@ -0,0 +1,13 @@
- title :show, Cmtool::Faq
.show_field
strong= Cmtool::Faq.human_attribute_name(:question)
=raw @faq.question
.show_field
strong= Cmtool::Faq.human_attribute_name(:answer)
=raw @faq.answer
- 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_index_content(Cmtool::Faq), cmtool.faqs_path, class: [:btn]
-7
View File
@@ -1,7 +0,0 @@
- title :edit, Cmtool::Image
= render 'form', :submit => update_button_text(@image)
- 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]
+7
View File
@@ -0,0 +1,7 @@
- title :edit, Cmtool::Image
= render 'form', :submit => update_button_text(@image)
- 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]
-30
View File
@@ -1,30 +0,0 @@
- title :index, Cmtool::Image
- if @images.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::Image.model_name.human
%th= Cmtool::Image.human_attribute_name(:file_file_name)
%th= Cmtool::Image.human_attribute_name(:file_content_type)
%th= Cmtool::Image.human_attribute_name(:file_file_size)
%th= Cmtool::Image.human_attribute_name(:file_updated_at)
%th
%th
%tbody
- @images.each do |image|
%tr
%td
- if image.file?
= link_to(image_tag(image.file.url(:thumb)), cmtool.image_path(image))
%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
= edit_td image
= destroy_td image
- else
= empty_result(Cmtool::Image)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: ['btn', 'btn-primary']
+30
View File
@@ -0,0 +1,30 @@
- title :index, Cmtool::Image
- if @images.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::Image.model_name.human
th= Cmtool::Image.human_attribute_name(:file_file_name)
th= Cmtool::Image.human_attribute_name(:file_content_type)
th= Cmtool::Image.human_attribute_name(:file_file_size)
th= Cmtool::Image.human_attribute_name(:file_updated_at)
th
th
tbody
- @images.each do |image|
tr
td
- if image.file?
= link_to(image_tag(image.file.url(:thumb)), cmtool.image_path(image))
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
= edit_td image
= destroy_td image
- else
= empty_result(Cmtool::Image)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Image), cmtool.new_image_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@image)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::Image), cmtool.images_path, class: [:btn]
-22
View File
@@ -1,22 +0,0 @@
- title :show, Cmtool::Image
.show_field
- if @image.file?
= image_tag @image.file.url(:page)
.show_field
%strong= Cmtool::Image.human_attribute_name(:file_file_name)
= @image.file_file_name
.show_field
%strong= Cmtool::Image.human_attribute_name(:file_content_type)
= @image.file_content_type
.show_field
%strong= Cmtool::Image.human_attribute_name(:file_file_size)
= human_size @image.file_file_size
.show_field
%strong= Cmtool::Image.human_attribute_name(:file_updated_at)
= @image.file_updated_at
- 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]
+22
View File
@@ -0,0 +1,22 @@
- title :show, Cmtool::Image
.show_field
- if @image.file?
= image_tag @image.file.url(:page)
.show_field
strong= Cmtool::Image.human_attribute_name(:file_file_name)
= @image.file_file_name
.show_field
strong= Cmtool::Image.human_attribute_name(:file_content_type)
= @image.file_content_type
.show_field
strong= Cmtool::Image.human_attribute_name(:file_file_size)
= human_size @image.file_file_size
.show_field
strong= Cmtool::Image.human_attribute_name(:file_updated_at)
= @image.file_updated_at
- 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]
@@ -1,4 +1,4 @@
%h4= Cmtool::Keyword.model_name.human.pluralize
h4= Cmtool::Keyword.model_name.human.pluralize
= hidden_field_tag "#{subject.class.name.underscore.sub(/.*\//, '')}[keyword_ids][]", nil
- for keyword in Cmtool::Keyword.all
.keyword_container
-7
View File
@@ -1,7 +0,0 @@
- title :edit, Cmtool::Keyword
= render 'form', :submit => update_button_text(@keyword)
- content_for :page_links do
%ul
%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]
+7
View File
@@ -0,0 +1,7 @@
- title :edit, Cmtool::Keyword
= render 'form', :submit => update_button_text(@keyword)
- content_for :page_links do
ul
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]
-20
View File
@@ -1,20 +0,0 @@
- title :index, Cmtool::Keyword
- if @keywords.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::Keyword.human_attribute_name(:name)
%th
%th
%tbody
- @keywords.each do |keyword|
%tr
%td= link_to keyword.name, cmtool.keyword_path(keyword)
= edit_td keyword
= destroy_td keyword
- else
= empty_result(Cmtool::Keyword)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path, class: ['btn', 'btn-primary']
+20
View File
@@ -0,0 +1,20 @@
- title :index, Cmtool::Keyword
- if @keywords.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::Keyword.human_attribute_name(:name)
th
th
tbody
- @keywords.each do |keyword|
tr
td= link_to keyword.name, cmtool.keyword_path(keyword)
= edit_td keyword
= destroy_td keyword
- else
= empty_result(Cmtool::Keyword)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path, class: ['btn', 'btn-primary']
@@ -3,5 +3,5 @@
= render 'form', :submit => create_button_text(@keyword)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: ['btn', 'btn-warning']
ul
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: ['btn', 'btn-warning']
-9
View File
@@ -1,9 +0,0 @@
- title :show, Cmtool::Keyword
.show_field
%strong= Cmtool::Keyword.human_attribute_name(:name)
= @keyword.name
- content_for :page_links do
%ul
%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]
+9
View File
@@ -0,0 +1,9 @@
- title :show, Cmtool::Keyword
.show_field
strong= Cmtool::Keyword.human_attribute_name(:name)
= @keyword.name
- content_for :page_links do
ul
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]
@@ -9,7 +9,7 @@
.field
= f.label :date
= f.text_field :date
(yyyy-mm-dd)
| (yyyy-mm-dd)
.field
= f.label :body
= f.text_area :body, :class => 'editor_full'
-9
View File
@@ -1,9 +0,0 @@
- title :edit, Cmtool::News
- if @news.image?
= link_to image_tag(@news.image.url(:thumb)), @news.image.url
= render 'form', :submit => update_button_text(@news)
- 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]
+9
View File
@@ -0,0 +1,9 @@
- title :edit, Cmtool::News
- if @news.image?
= link_to image_tag(@news.image.url(:thumb)), @news.image.url
= render 'form', :submit => update_button_text(@news)
- 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]
-24
View File
@@ -1,24 +0,0 @@
- title :index, Cmtool::News
- if @news.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::News.human_attribute_name(:title)
%th= Cmtool::News.human_attribute_name(:active)
%th= Cmtool::News.human_attribute_name(:date)
%th
%th
%tbody
- @news.each do |news|
%tr
%td= link_to news.title, cmtool.news_path(news)
%td= boolean_text news.active?
%td=l news.date
= edit_td news
= destroy_td news
- else
= empty_result(Cmtool::News)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path, class: ['btn', 'btn-primary']
+24
View File
@@ -0,0 +1,24 @@
- title :index, Cmtool::News
- if @news.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::News.human_attribute_name(:title)
th= Cmtool::News.human_attribute_name(:active)
th= Cmtool::News.human_attribute_name(:date)
th
th
tbody
- @news.each do |news|
tr
td= link_to news.title, cmtool.news_path(news)
td= boolean_text news.active?
td=l news.date
= edit_td news
= destroy_td news
- else
= empty_result(Cmtool::News)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::News), cmtool.new_news_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@news)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::News), cmtool.news_index_path, class: [:btn]
-28
View File
@@ -1,28 +0,0 @@
- title :show, Cmtool::News
- if @news.image?
#news-image-container
= link_to image_tag(@news.image.url(:thumb)), @news.image.url
= link_to t('cmtool.news.remove_image'), cmtool.remove_image_news_path(@news), :method => :delete, :confirm => are_you_sure(), :remote => true
.show_field
%strong= Cmtool::News.human_attribute_name(:title)
= @news.title
.show_field
%strong= Cmtool::News.human_attribute_name(:active)
= boolean_text @news.active?
.show_field
%strong= Cmtool::News.human_attribute_name(:date)
=l @news.date
.show_field
%strong= Cmtool::Keyword.model_name.human.pluralize
%ul
- for keyword in @news.keywords
%li.keyword_show= keyword.name
.show_field
%strong= Cmtool::News.human_attribute_name(:body)
=raw @news.body
- 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]
+28
View File
@@ -0,0 +1,28 @@
- title :show, Cmtool::News
- if @news.image?
#news-image-container
= link_to image_tag(@news.image.url(:thumb)), @news.image.url
= link_to t('cmtool.news.remove_image'), cmtool.remove_image_news_path(@news), :method => :delete, :confirm => are_you_sure(), :remote => true
.show_field
strong= Cmtool::News.human_attribute_name(:title)
= @news.title
.show_field
strong= Cmtool::News.human_attribute_name(:active)
= boolean_text @news.active?
.show_field
strong= Cmtool::News.human_attribute_name(:date)
=l @news.date
.show_field
strong= Cmtool::Keyword.model_name.human.pluralize
ul
- for keyword in @news.keywords
li.keyword_show= keyword.name
.show_field
strong= Cmtool::News.human_attribute_name(:body)
=raw @news.body
- 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]
@@ -1,7 +0,0 @@
- title :edit, Cmtool::NewsletterSubscription
= render 'form', :submit => update_button_text(@newsletter_subscription)
- 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]
@@ -0,0 +1,7 @@
- title :edit, Cmtool::NewsletterSubscription
= render 'form', :submit => update_button_text(@newsletter_subscription)
- 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]
@@ -1,24 +0,0 @@
- title :index, Cmtool::NewsletterSubscription
- if @newsletter_subscriptions.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::NewsletterSubscription.human_attribute_name(:email)
%th= Cmtool::NewsletterSubscription.human_attribute_name(:deactivation_token)
%th= Cmtool::NewsletterSubscription.human_attribute_name(:active)
%th
%th
%tbody
- @newsletter_subscriptions.each do |newsletter_subscription|
%tr
%td= newsletter_subscription.email
%td= newsletter_subscription.deactivation_token
%td= boolean_text newsletter_subscription.active
= edit_td newsletter_subscription
= destroy_td newsletter_subscription
- else
= empty_result(Cmtool::NewsletterSubscription)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path, class: ['btn', 'btn-primary']
@@ -0,0 +1,24 @@
- title :index, Cmtool::NewsletterSubscription
- if @newsletter_subscriptions.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::NewsletterSubscription.human_attribute_name(:email)
th= Cmtool::NewsletterSubscription.human_attribute_name(:deactivation_token)
th= Cmtool::NewsletterSubscription.human_attribute_name(:active)
th
th
tbody
- @newsletter_subscriptions.each do |newsletter_subscription|
tr
td= newsletter_subscription.email
td= newsletter_subscription.deactivation_token
td= boolean_text newsletter_subscription.active
= edit_td newsletter_subscription
= destroy_td newsletter_subscription
- else
= empty_result(Cmtool::NewsletterSubscription)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::NewsletterSubscription), cmtool.new_newsletter_subscription_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@newsletter_subscription)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::NewsletterSubscription), cmtool.newsletter_subscriptions_path, class: [:btn]
@@ -1,15 +0,0 @@
- title :show, Cmtool::NewsletterSubscription
.show_field
%strong= Cmtool::NewsletterSubscription.human_attribute_name(:email)
= @newsletter_subscription.email
.show_field
%strong= Cmtool::NewsletterSubscription.human_attribute_name(:deactivation_token)
= @newsletter_subscription.deactivation_token
.show_field
%strong= Cmtool::NewsletterSubscription.human_attribute_name(:active)
= boolean_text @newsletter_subscription.active
- 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]
@@ -0,0 +1,15 @@
- title :show, Cmtool::NewsletterSubscription
.show_field
strong= Cmtool::NewsletterSubscription.human_attribute_name(:email)
= @newsletter_subscription.email
.show_field
strong= Cmtool::NewsletterSubscription.human_attribute_name(:deactivation_token)
= @newsletter_subscription.deactivation_token
.show_field
strong= Cmtool::NewsletterSubscription.human_attribute_name(:active)
= boolean_text @newsletter_subscription.active
- 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]
@@ -1,10 +0,0 @@
- pages.each do |page|
%tr
%td= link_to ' - '*page.tree_depth + page.name, cmtool.edit_page_path(page)
%td= page.title
%td.locale{class: "locale-#{page.locale}"}= page.locale
%td= boolean_text controller.template_exists?("pages/#{page.name}")
%td= boolean_text page.in_menu?
%th= page.tree_path.map(&:position).map(&:to_s).join('.')
- if children = page.children.presence
= render 'nested_pages', pages: children
@@ -0,0 +1,10 @@
- pages.each do |page|
tr
td= link_to ' - '*page.tree_depth + page.name, cmtool.edit_page_path(page)
td= page.title
td.locale class: "locale-#{page.locale}" = page.locale
td= boolean_text controller.template_exists?("pages/# page.name ")
td= boolean_text page.in_menu?
th= page.tree_path.map(&:position).map(&:to_s).join('.')
- if children = page.children.presence
= render 'nested_pages', pages: children
-9
View File
@@ -1,9 +0,0 @@
- title :edit, Page
= render 'form', :submit => update_button_text(@page)
- content_for :page_links do
%ul
%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']
+9
View File
@@ -0,0 +1,9 @@
- title :edit, Page
= render 'form', :submit => update_button_text(@page)
- content_for :page_links do
ul
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']
-21
View File
@@ -1,21 +0,0 @@
- title :index, Page
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Page.human_attribute_name(:name)
%th= Page.human_attribute_name(:title)
%th= Page.human_attribute_name(:locale)
%th= Page.human_attribute_name(:has_view)
%th= Page.human_attribute_name(:in_menu)
%th= Page.human_attribute_name(:position)
%th
%th
%tbody
= render 'nested_pages', pages: Page.full_tree(:nl)
= render 'nested_pages', pages: Page.full_tree(:en)
= render 'nested_pages', pages: Page.full_tree(:de)
= render 'nested_pages', pages: Page.full_tree(:es)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Page), cmtool.new_page_path, class: ['btn', 'btn-primary']
+21
View File
@@ -0,0 +1,21 @@
- title :index, Page
table.index-table.table.table-striped.table-hover
thead
tr
th= Page.human_attribute_name(:name)
th= Page.human_attribute_name(:title)
th= Page.human_attribute_name(:locale)
th= Page.human_attribute_name(:has_view)
th= Page.human_attribute_name(:in_menu)
th= Page.human_attribute_name(:position)
th
th
tbody
= render 'nested_pages', pages: Page.full_tree(:nl)
= render 'nested_pages', pages: Page.full_tree(:en)
= render 'nested_pages', pages: Page.full_tree(:de)
= render 'nested_pages', pages: Page.full_tree(:es)
- content_for :page_links do
ul
li= link_to link_to_new_content(Page), cmtool.new_page_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@page)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn]
ul
li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn]
-39
View File
@@ -1,39 +0,0 @@
- title :show, Page
.show_field
%strong= Page.human_attribute_name(:name)
= @page.name
.show_field
%strong= Page.human_attribute_name(:menu_text)
= @page.menu_text
.show_field
%strong= Page.human_attribute_name(:title)
= @page.title
.show_field
%strong= Page.human_attribute_name(:body)
=raw @page.body
.show_field
%strong= Page.human_attribute_name(:footer)
=raw @page.footer
.show_field
%strong= Page.human_attribute_name(:sidebar)
=raw @page.sidebar
.show_field
%strong= Page.human_attribute_name(:parent)
= @page.parent
.show_field
%strong= Page.human_attribute_name(:position)
= @page.position
.show_field
%strong= Page.human_attribute_name(:layout)
= @page.layout
.show_field
%strong= Page.human_attribute_name(:has_view)
=# boolean_text template_exist?("pages/#{@page.name}")
.show_field
%strong= Page.human_attribute_name(:in_menu)
= boolean_text @page.in_menu?
- content_for :page_links do
%ul
%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']
+39
View File
@@ -0,0 +1,39 @@
- title :show, Page
.show_field
strong= Page.human_attribute_name(:name)
= @page.name
.show_field
strong= Page.human_attribute_name(:menu_text)
= @page.menu_text
.show_field
strong= Page.human_attribute_name(:title)
= @page.title
.show_field
strong= Page.human_attribute_name(:body)
=raw @page.body
.show_field
strong= Page.human_attribute_name(:footer)
=raw @page.footer
.show_field
strong= Page.human_attribute_name(:sidebar)
=raw @page.sidebar
.show_field
strong= Page.human_attribute_name(:parent)
= @page.parent
.show_field
strong= Page.human_attribute_name(:position)
= @page.position
.show_field
strong= Page.human_attribute_name(:layout)
= @page.layout
.show_field
strong= Page.human_attribute_name(:has_view)
=# boolean_text template_exist?("pages/#{@page.name}")
.show_field
strong= Page.human_attribute_name(:in_menu)
= boolean_text @page.in_menu?
- content_for :page_links do
ul
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']
-7
View File
@@ -1,7 +0,0 @@
- title :edit, Cmtool::Quote
= render 'form', :submit => update_button_text(@quote)
- 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]
+7
View File
@@ -0,0 +1,7 @@
- title :edit, Cmtool::Quote
= render 'form', :submit => update_button_text(@quote)
- 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]
-26
View File
@@ -1,26 +0,0 @@
- title :index, Cmtool::Quote
- if @quotes.any?
%table.index-table.table.table-striped.table-hover
%thead
%tr
%th= Cmtool::Quote.human_attribute_name(:owner)
%th= Cmtool::Quote.human_attribute_name(:function)
%th= Cmtool::Quote.human_attribute_name(:active)
%th= Cmtool::Quote.human_attribute_name(:state)
%th
%th
%tbody
- @quotes.each do |quote|
%tr
%td= quote.owner
%td= quote.function
%td= boolean_text quote.active
%td= quote.state
= edit_td quote
= destroy_td quote
- else
= empty_result(Cmtool::Quote)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path, class: ['btn', 'btn-primary']
+26
View File
@@ -0,0 +1,26 @@
- title :index, Cmtool::Quote
- if @quotes.any?
table.index-table.table.table-striped.table-hover
thead
tr
th= Cmtool::Quote.human_attribute_name(:owner)
th= Cmtool::Quote.human_attribute_name(:function)
th= Cmtool::Quote.human_attribute_name(:active)
th= Cmtool::Quote.human_attribute_name(:state)
th
th
tbody
- @quotes.each do |quote|
tr
td= quote.owner
td= quote.function
td= boolean_text quote.active
td= quote.state
= edit_td quote
= destroy_td quote
- else
= empty_result(Cmtool::Quote)
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Quote), cmtool.new_quote_path, class: ['btn', 'btn-primary']
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@quote)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn]
ul
li= link_to link_to_index_content(Cmtool::Quote), cmtool.quotes_path, class: [:btn]
@@ -4,22 +4,22 @@
= link_to image_tag(@quote.image.url(:thumb)), @quote.image.url
= link_to t('cmtool.quote.remove_image'), cmtool.remove_image_quote_path(@quote), :method => :delete, :confirm => are_you_sure(), :remote => true
.show_field
%strong= Cmtool::Quote.human_attribute_name(:owner)
strong= Cmtool::Quote.human_attribute_name(:owner)
= @quote.owner
.show_field
%strong= Cmtool::Quote.human_attribute_name(:function)
strong= Cmtool::Quote.human_attribute_name(:function)
= @quote.function
.show_field
%strong= Cmtool::Quote.human_attribute_name(:state)
strong= Cmtool::Quote.human_attribute_name(:state)
= @quote.state
.show_field
%strong= Cmtool::Quote.human_attribute_name(:body)
strong= Cmtool::Quote.human_attribute_name(:body)
=raw @quote.body
.show_field
%strong= Cmtool::Quote.human_attribute_name(:active)
strong= Cmtool::Quote.human_attribute_name(:active)
= boolean_text @quote.active
- 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]
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]
Binary file not shown.
-8
View File
@@ -1,8 +0,0 @@
- title :edit, User
= render 'form', :submit => update_button_text(@user)
- content_for :page_links do
%ul
%li= link_to link_to_show_content(@user), cmtool.user_path(@user)
%li= link_to link_to_index_content(User), cmtool.users_path
+8
View File
@@ -0,0 +1,8 @@
- title :edit, User
= render 'form', :submit => update_button_text(@user)
- content_for :page_links do
ul
li= link_to link_to_show_content(@user), cmtool.user_path(@user)
li= link_to link_to_index_content(User), cmtool.users_path
-20
View File
@@ -1,20 +0,0 @@
- title :index, User
- if @users.any?
%table.index-table
%thead
%tr
%th= User.human_attribute_name(:email)
%th
%th
%tbody
- @users.each do |user|
%tr
%td= link_to user.email, cmtool.user_path(user)
= edit_td user
= destroy_td user
- else
= empty_result(User)
- content_for :page_links do
%ul
%li= link_to link_to_new_content(User), cmtool.new_user_path
+20
View File
@@ -0,0 +1,20 @@
- title :index, User
- if @users.any?
table.index-table
thead
tr
th= User.human_attribute_name(:email)
th
th
tbody
- @users.each do |user|
tr
td= link_to user.email, cmtool.user_path(user)
= edit_td user
= destroy_td user
- else
= empty_result(User)
- content_for :page_links do
ul
li= link_to link_to_new_content(User), cmtool.new_user_path
@@ -2,5 +2,5 @@
= render 'form', :submit => create_button_text(@user)
- content_for :page_links do
%ul
%li= link_to link_to_index_content(User), cmtool.users_path
ul
li= link_to link_to_index_content(User), cmtool.users_path
-38
View File
@@ -1,38 +0,0 @@
- title :show, User
.show_field
%span.show_label= User.human_attribute_name(:email)
%span.show_separator
%span.show_value= @user.email
.show_field
%span.show_label= User.human_attribute_name(:sign_in_count)
%span.show_separator
%span.show_value.link= @user.sign_in_count
.show_field
%span.show_label= User.human_attribute_name(:current_sign_in_at)
%span.show_separator
%span.show_value.link= @user.current_sign_in_at
.show_field
%span.show_label= User.human_attribute_name(:last_sign_in_at)
%span.show_separator
%span.show_value.link= @user.last_sign_in_at
.show_field
%span.show_label= User.human_attribute_name(:current_sign_in_ip)
%span.show_separator
%span.show_value.link= @user.current_sign_in_ip
.show_field
%span.show_label= User.human_attribute_name(:last_sign_in_ip)
%span.show_separator
%span.show_value.link= @user.last_sign_in_ip
.show_field
%span.show_label= User.human_attribute_name(:is_admin)
%span.show_separator
%span.show_value.boolean= boolean_text(@user.is_admin?)
.show_field
%span.show_label= User.human_attribute_name(:active)
%span.show_separator
%span.show_value.boolean= boolean_text(@user.active?)
- content_for :page_links do
%ul
%li= link_to link_to_edit_content(@user), cmtool.edit_user_path(@user)
%li= link_to link_to_index_content(User), cmtool.users_path
+38
View File
@@ -0,0 +1,38 @@
- title :show, User
.show_field
span.show_label= User.human_attribute_name(:email)
span.show_separator
span.show_value= @user.email
.show_field
span.show_label= User.human_attribute_name(:sign_in_count)
span.show_separator
span.show_value.link= @user.sign_in_count
.show_field
span.show_label= User.human_attribute_name(:current_sign_in_at)
span.show_separator
span.show_value.link= @user.current_sign_in_at
.show_field
span.show_label= User.human_attribute_name(:last_sign_in_at)
span.show_separator
span.show_value.link= @user.last_sign_in_at
.show_field
span.show_label= User.human_attribute_name(:current_sign_in_ip)
span.show_separator
span.show_value.link= @user.current_sign_in_ip
.show_field
span.show_label= User.human_attribute_name(:last_sign_in_ip)
span.show_separator
span.show_value.link= @user.last_sign_in_ip
.show_field
span.show_label= User.human_attribute_name(:is_admin)
span.show_separator
span.show_value.boolean= boolean_text(@user.is_admin?)
.show_field
span.show_label= User.human_attribute_name(:active)
span.show_separator
span.show_value.boolean= boolean_text(@user.active?)
- content_for :page_links do
ul
li= link_to link_to_edit_content(@user), cmtool.edit_user_path(@user)
li= link_to link_to_index_content(User), cmtool.users_path
+3 -3
View File
@@ -23,24 +23,24 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<email_validator>, [">= 0"])
s.add_runtime_dependency(%q<bourbon>, [">= 0"])
s.add_runtime_dependency(%q<haml-rails>, [">= 0"])
s.add_runtime_dependency(%q<slim-rails>, [">= 0"])
s.add_runtime_dependency(%q<tinymce-rails>, [">= 0"])
s.add_runtime_dependency(%q<jquery-rails>, [">= 0"])
s.add_runtime_dependency(%q<paperclip>, [">= 0"])
else
s.add_dependency(%q<email_validator>, [">= 0"])
s.add_dependency(%q<bourbon>, [">= 0"])
s.add_dependency(%q<haml-rails>, [">= 0"])
s.add_dependency(%q<slim-rails>, [">= 0"])
s.add_dependency(%q<tinymce-rails>, [">= 0"])
s.add_dependency(%q<jquery-rails>, [">= 0"])
s.add_dependency(%q<paperclip>, [">= 0"])
end
else
s.add_dependency(%q<email_validator>, [">= 0"])
s.add_dependency(%q<bourbon>, [">= 0"])
s.add_dependency(%q<haml-rails>, [">= 0"])
s.add_dependency(%q<slim-rails>, [">= 0"])
s.add_dependency(%q<tinymce-rails>, [">= 0"])
s.add_dependency(%q<jquery-rails>, [">= 0"])
s.add_dependency(%q<paperclip>, [">= 0"])
end
end
-2
View File
@@ -4,7 +4,6 @@ require 'simply_stored'
require 'email_validator'
require 'devise'
require 'devise_simply_stored'
require 'haml-rails'
require 'sass-rails'
require 'paperclip'
require 'jquery-rails'
@@ -18,7 +17,6 @@ module Cmtool
require 'email_validator'
require 'bourbon'
require 'slim-rails'
require 'haml-rails'
require 'paperclip'
require 'devise'
require 'devise_simply_stored'
+5
View File
@@ -68,6 +68,11 @@ module Cmtool
end
def top_menu
ActiveSupport::Deprecation.warn("Page.top_menu is a stupid name. Use Page.menu_roots instead")
menu_roots
end
def menu_roots
::Page.roots(I18n.locale.to_s).select(&:in_menu?)
end
end