Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4013070e4f | |||
| da5db36b4c | |||
| f3369b8fa9 | |||
| 74cbca706b |
@@ -21,12 +21,11 @@ group :assets do
|
|||||||
gem 'momentjs-rails'
|
gem 'momentjs-rails'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'simply_stored' , github: 'bterkuile/simply_stored', branch: 'master'
|
gem 'simply_couch' , github: 'bterkuile/simply_couch', branch: 'master'
|
||||||
#gem 'orm_adapter', github: 'bterkuile/orm_adapter'
|
#gem 'orm_adapter', github: 'bterkuile/orm_adapter'
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored', branch: 'master'
|
gem 'devise_simply_couch', github: 'bterkuile/devise_simply_couch', branch: 'master'
|
||||||
gem 'slim-rails'
|
gem 'slim-rails'
|
||||||
gem 'paperclip', ['>= 3.4', '!= 4.3.0']
|
|
||||||
gem 'email_validator'
|
gem 'email_validator'
|
||||||
# Declare any dependencies that are still in development here instead of in
|
# Declare any dependencies that are still in development here instead of in
|
||||||
# your gemspec. These might include edge Rails or gems from your path or
|
# your gemspec. These might include edge Rails or gems from your path or
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ To start using Cmtool as website CMS add it to your Gemfile. Since it depends
|
|||||||
on github gems and gem dependencies do not support those you have to
|
on github gems and gem dependencies do not support those you have to
|
||||||
explicitly add two dependencies to your Gemfile:
|
explicitly add two dependencies to your Gemfile:
|
||||||
gem 'couch_potato' , github: 'bterkuile/couch_potato'
|
gem 'couch_potato' , github: 'bterkuile/couch_potato'
|
||||||
gem 'simply_stored' , github: 'bterkuile/simply_stored'
|
gem 'simply_couch' , github: 'bterkuile/simply_couch'
|
||||||
gem 'cmtool'
|
gem 'cmtool'
|
||||||
|
|
||||||
Make sure that the locales you want to work with are specified in
|
Make sure that the locales you want to work with are specified in
|
||||||
@@ -94,7 +94,7 @@ end
|
|||||||
```
|
```
|
||||||
|
|
||||||
This is enough to start using Cmtool. But probably you want to add some
|
This is enough to start using Cmtool. But probably you want to add some
|
||||||
goodies of your own. Remember that this is a SimplyStored model with almost
|
goodies of your own. Remember that this is a SimplyCouch model with almost
|
||||||
all the ActiveModel features.
|
all the ActiveModel features.
|
||||||
|
|
||||||
### Page model
|
### Page model
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#= require jquery
|
#= require jquery
|
||||||
#= require jquery_ujs
|
#= require jquery_ujs
|
||||||
#= require foundation
|
#= require semantic-ui
|
||||||
#= require ace/ace
|
#= require ace/ace
|
||||||
#= require moment
|
#= require moment
|
||||||
#= require ace/theme-monokai
|
#= require ace/theme-monokai
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
#= require_self
|
#= require_self
|
||||||
|
|
||||||
$ ->
|
$ ->
|
||||||
$(document).foundation()
|
$('.ui.dropdown').dropdown()
|
||||||
|
$('.ui.checkbox').checkbox()
|
||||||
|
$('.message .close.icon').on 'click', -> $(@).closest('.message').transition('fade')
|
||||||
collapsible.setup()
|
collapsible.setup()
|
||||||
html_edit.setup()
|
html_edit.setup()
|
||||||
yml_edit.setup()
|
yml_edit.setup()
|
||||||
@@ -38,7 +40,7 @@ $ ->
|
|||||||
layout: $('#page_layout').val()
|
layout: $('#page_layout').val()
|
||||||
$.post url, page: params, (response)->
|
$.post url, page: params, (response)->
|
||||||
iframe.attr 'src', url
|
iframe.attr 'src', url
|
||||||
$('#preview-modal').foundation('reveal', 'open')
|
$('#preview-modal').modal('show')
|
||||||
false
|
false
|
||||||
|
|
||||||
$("[data-time]").each ->
|
$("[data-time]").each ->
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
//= require pickadate/default
|
//= require pickadate/default
|
||||||
//= require pickadate/default.date
|
//= require pickadate/default.date
|
||||||
//= require pickadate/default.time
|
//= require pickadate/default.time
|
||||||
@import font-awesome
|
@import semantic-ui
|
||||||
@import ./foundation_and_overrides
|
|
||||||
@import ./structure
|
@import ./structure
|
||||||
@import ./components/*
|
@import ./components/*
|
||||||
@import ./locale
|
@import ./locale
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
|
// Legacy button hooks kept for cmtool scaffold views not yet converted to
|
||||||
|
// Fomantic `ui button` classes. Colors match Fomantic's default palette.
|
||||||
|
=legacy-button($bg: #1b1c1d)
|
||||||
|
display: inline-block
|
||||||
|
padding: 0.78571429em 1.5em
|
||||||
|
background: $bg
|
||||||
|
color: white
|
||||||
|
border: none
|
||||||
|
border-radius: 0.28571429rem
|
||||||
|
cursor: pointer
|
||||||
|
&:hover
|
||||||
|
opacity: 0.85
|
||||||
|
|
||||||
.to-index-button
|
.to-index-button
|
||||||
+button($bg: $secondary-color)
|
+legacy-button($bg: #767676)
|
||||||
.record-show-button
|
.record-show-button
|
||||||
+button($bg: $info-color)
|
+legacy-button($bg: #31ccec)
|
||||||
.record-new-button
|
.record-new-button
|
||||||
+button
|
+legacy-button
|
||||||
.record-edit-button
|
.record-edit-button
|
||||||
+button($bg: $warning-color)
|
+legacy-button($bg: #fbbd08)
|
||||||
.record-destroy-button
|
.record-destroy-button
|
||||||
+button($bg: $alert-color)
|
+legacy-button($bg: #db2828)
|
||||||
.form-submit-button
|
.form-submit-button
|
||||||
+button
|
+legacy-button
|
||||||
|
|||||||
@@ -4,10 +4,13 @@
|
|||||||
font-weight: bold
|
font-weight: bold
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
span
|
span
|
||||||
@extend .fa, .fa-arrow-down
|
&:before
|
||||||
|
content: "\25BC"
|
||||||
|
margin-right: 0.5em
|
||||||
&.collapsed
|
&.collapsed
|
||||||
.collapsible-title
|
.collapsible-title
|
||||||
span
|
span
|
||||||
@extend .fa, .fa-arrow-right
|
&:before
|
||||||
|
content: "\25B6"
|
||||||
.collapsible-content
|
.collapsible-content
|
||||||
display: none
|
display: none
|
||||||
|
|||||||
@@ -1,30 +1,20 @@
|
|||||||
.form-row
|
.form-row
|
||||||
+grid-row
|
display: flex
|
||||||
|
flex-wrap: wrap
|
||||||
|
align-items: flex-start
|
||||||
|
gap: 1em
|
||||||
|
margin-bottom: 0.5em
|
||||||
.form-label
|
.form-label
|
||||||
@media #{$small-only}
|
flex: 0 0 200px
|
||||||
+grid-column($columns:10, $center:true)
|
max-width: 100%
|
||||||
@media #{$medium-only}
|
padding-top: 0.5em
|
||||||
+grid-column($columns:4, $offset:1)
|
|
||||||
@media #{$large-up}
|
|
||||||
+grid-column(3)
|
|
||||||
&.half
|
|
||||||
+grid-column(6)
|
|
||||||
.form-field
|
.form-field
|
||||||
@media #{$small-only}
|
flex: 1 1 300px
|
||||||
+grid-column($columns:10, $center:true, $last-column:true)
|
max-width: 100%
|
||||||
@media #{$medium-only}
|
|
||||||
+grid-column($columns:4, $last-column:true)
|
|
||||||
@media #{$large-up}
|
|
||||||
+grid-column($columns: 3, $last-column:true)
|
|
||||||
&.full
|
&.full
|
||||||
@media #{$small-only}
|
flex-basis: 100%
|
||||||
+grid-column($columns:10, $center:true, $last-column:true)
|
|
||||||
@media #{$medium-only}
|
|
||||||
+grid-column($columns:6, $last-column:true)
|
|
||||||
@media #{$large-up}
|
|
||||||
+grid-column($columns: 9, $last-column:true)
|
|
||||||
&.half
|
&.half
|
||||||
+grid-column(6)
|
flex-basis: 45%
|
||||||
&.form-actions
|
&.form-actions
|
||||||
padding-top: 12px
|
padding-top: 12px
|
||||||
body
|
body
|
||||||
@@ -37,9 +27,17 @@ body
|
|||||||
width: 60px
|
width: 60px
|
||||||
display: inline-block
|
display: inline-block
|
||||||
.apply-filter
|
.apply-filter
|
||||||
+button($bg: $primary-color, $padding: $button-tny)
|
display: inline-block
|
||||||
|
padding: 0.5em 1em
|
||||||
|
background: #2185d0
|
||||||
|
color: white
|
||||||
|
border: none
|
||||||
|
border-radius: 0.28571429rem
|
||||||
|
cursor: pointer
|
||||||
|
&:hover
|
||||||
|
opacity: 0.85
|
||||||
.error
|
.error
|
||||||
input, textarea
|
input, textarea
|
||||||
border-color: $alert-color
|
border-color: #db2828
|
||||||
input[type="number"]
|
input[type="number"]
|
||||||
text-align: right
|
text-align: right
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,25 @@
|
|||||||
.clear
|
.clear
|
||||||
clear: both
|
clear: both
|
||||||
|
|
||||||
|
// Generic scaffold show pages: `.show_field > strong + value`
|
||||||
|
.show_field
|
||||||
|
padding: 0.5em 0
|
||||||
|
border-bottom: 1px solid rgba(34, 36, 38, 0.1)
|
||||||
|
strong
|
||||||
|
display: inline-block
|
||||||
|
min-width: 160px
|
||||||
|
margin-right: 1em
|
||||||
|
|
||||||
#sub-navigation-container
|
#sub-navigation-container
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
+panel()
|
padding: 1em
|
||||||
+clearfix()
|
background: #f8f8f8
|
||||||
|
border: 1px solid rgba(34, 36, 38, 0.15)
|
||||||
|
border-radius: 0.28571429rem
|
||||||
|
&:after
|
||||||
|
content: ""
|
||||||
|
display: table
|
||||||
|
clear: both
|
||||||
ul
|
ul
|
||||||
list-style: none
|
list-style: none
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ module Cmtool
|
|||||||
end
|
end
|
||||||
|
|
||||||
def boolean_text(yes)
|
def boolean_text(yes)
|
||||||
yes.present? ? t('cmtool.general.yes') : t('cmtool.general.no')
|
ActiveModel::Type::Boolean.new.cast(yes) ? t('cmtool.general.yes') : t('cmtool.general.no')
|
||||||
end
|
end
|
||||||
def empty_result(model)
|
def empty_result(model)
|
||||||
t('cmtool.general.empty_result', models: model.model_name.human_plural.downcase )
|
t('cmtool.general.empty_result', models: model.model_name.human_plural.downcase )
|
||||||
@@ -132,15 +132,39 @@ module Cmtool
|
|||||||
controller.respond_to?(:cmtool_user) ? controller.send(:cmtool_user) :nil
|
controller.respond_to?(:cmtool_user) ? controller.send(:cmtool_user) :nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Path prefixes matching how the consuming app's translations.js.coffee.erb
|
||||||
|
# builds $translations: each top-level JS key is sourced from a different
|
||||||
|
# Rails i18n scope. Keep in sync with that file.
|
||||||
|
TSPAN_NAMESPACE_PREFIXES = {
|
||||||
|
'models' => 'activemodel.models',
|
||||||
|
'attributes' => 'activemodel.attributes',
|
||||||
|
'helpers' => 'helpers',
|
||||||
|
'pagination' => 'views.pagination',
|
||||||
|
'errors' => 'errors',
|
||||||
|
}.freeze
|
||||||
|
|
||||||
|
# Client-resolved translation span, mirroring the JS `tspan` helper in
|
||||||
|
# translations.js.coffee.erb. Renders the raw (possibly ${...}-templated)
|
||||||
|
# server-side translation as initial content, tagged with data-t so the
|
||||||
|
# page's on-load JS can resolve nested ${...} references client-side.
|
||||||
|
# tspan 'attributes.supplier.name' # => <span data-t="attributes.supplier.name" class="translation">${models.supplier} name</span>
|
||||||
|
def tspan(path, vars = {})
|
||||||
|
namespace, rest = path.split('.', 2)
|
||||||
|
prefix = TSPAN_NAMESPACE_PREFIXES.fetch(namespace, namespace)
|
||||||
|
full_key = rest ? "#{prefix}.#{rest}" : prefix
|
||||||
|
text = I18n.t(full_key, **vars)
|
||||||
|
content_tag(:span, text, class: 'translation', data: { t: path, t_attributes: vars.to_json })
|
||||||
|
end
|
||||||
|
|
||||||
def edit_td(obj, options = {})
|
def edit_td(obj, options = {})
|
||||||
path = options[:path] || case obj
|
path = options[:path] || case obj
|
||||||
when Array then edit_polymorphic_path(obj)
|
when Array then edit_polymorphic_path(obj)
|
||||||
when SimplyStored::Couch then edit_polymorphic_path([options[:scope] || cmtool, obj])
|
when SimplyCouch::Model then edit_polymorphic_path([options[:scope] || cmtool, obj])
|
||||||
else obj
|
else obj
|
||||||
end
|
end
|
||||||
content_tag(
|
content_tag(
|
||||||
:td,
|
:td,
|
||||||
link_to((content_tag(:span, '', class: [:edit, 'fa fa-lg fa-pencil'])), path, class: 'tiny warning button'),
|
link_to(content_tag(:i, nil, class: 'write icon'), path, class: 'edit ui mini basic yellow icon button'),
|
||||||
class: [:action, :edit]
|
class: [:action, :edit]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -148,13 +172,13 @@ module Cmtool
|
|||||||
def destroy_td(obj, options = {})
|
def destroy_td(obj, options = {})
|
||||||
path = options[:path] || case obj
|
path = options[:path] || case obj
|
||||||
when Array then polymorphic_path(obj)
|
when Array then polymorphic_path(obj)
|
||||||
when SimplyStored::Couch then polymorphic_path([options[:scope] || cmtool, obj])
|
when SimplyCouch::Model then polymorphic_path([options[:scope] || cmtool, obj])
|
||||||
else obj
|
else obj
|
||||||
end
|
end
|
||||||
|
|
||||||
content_tag(
|
content_tag(
|
||||||
:td,
|
:td,
|
||||||
link_to(content_tag(:span, '', class: [:destroy, 'fa fa-lg fa-trash']), path, method: :delete, class: 'tiny alert button', data: {confirm: are_you_sure(obj) }),
|
link_to(content_tag(:i, nil, class: 'trash icon'), path, method: :delete, class: 'destroy ui mini negative icon button', data: {confirm: are_you_sure(obj) }),
|
||||||
class: [:action, :destroy]
|
class: [:action, :destroy]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class ContactForm
|
class ContactForm
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
property :gender
|
property :gender
|
||||||
property :name
|
property :name
|
||||||
property :email
|
property :email
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class Directory
|
class Directory
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
|
|
||||||
property :name
|
property :name
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class Faq
|
class Faq
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
|
|
||||||
property :question
|
property :question
|
||||||
property :answer
|
property :answer
|
||||||
|
|||||||
@@ -1,20 +1,11 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class Image
|
class Image
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
include Paperclip::Glue
|
# Paperclip → has_local_attached migration
|
||||||
# TODO: Replace Paperclip with SimplyStored::HasAttachment
|
has_local_attached :file,
|
||||||
# 1. Change `include Paperclip::Glue` to `include SimplyStored::HasAttachment`
|
styles: { page: '728x10000>', medium: '354x1000>', thumb: '160x1250>' },
|
||||||
# 2. Replace `has_attached_file :file, styles: {...}` with `has_attachment :file, styles: {...}`
|
content_type: %w[image/jpeg image/gif image/png]
|
||||||
# 3. Replace `validates_attachment` with standard Rails validations
|
validates :file_file_name, presence: true
|
||||||
|
|
||||||
property :file_file_name
|
|
||||||
property :file_content_type
|
|
||||||
property :file_file_size, type: Integer
|
|
||||||
property :file_updated_at, type: Time
|
|
||||||
has_attached_file :file, styles: { page: '728x10000>', medium: "354x1000>", thumb: "160x1250>" },
|
|
||||||
path: ":rails_root/public/system/:attachment/:id/:style.:extension",
|
|
||||||
url: "/system/:attachment/:id/:style.:extension"
|
|
||||||
validates_attachment :file, presence: true, content_type: { content_type: ["image/jpeg", "image/gif", "image/png"] }
|
|
||||||
|
|
||||||
belongs_to :directory
|
belongs_to :directory
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class Keyword
|
class Keyword
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
|
|
||||||
property :name
|
property :name
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,14 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class News
|
class News
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
include Paperclip::Glue
|
|
||||||
# TODO: Replace Paperclip with SimplyStored::HasAttachment
|
|
||||||
# 1. Change `include Paperclip::Glue` to `include SimplyStored::HasAttachment`
|
|
||||||
# 2. Replace `has_attached_file :image, styles: {...}` with `has_attachment :image, styles: {...}`
|
|
||||||
|
|
||||||
property :title
|
property :title
|
||||||
property :active, type: :boolean, default: true
|
property :active, type: :boolean, default: true
|
||||||
property :date, type: Date
|
property :date, type: Date
|
||||||
property :body
|
property :body
|
||||||
|
|
||||||
property :image_file_name
|
# Paperclip → has_local_attached migration
|
||||||
property :image_content_type
|
has_local_attached :image,
|
||||||
property :image_file_size, type: Integer
|
styles: { medium: '500x500>', thumb: '250x250>' }
|
||||||
property :image_updated_at, type: Time
|
|
||||||
|
|
||||||
has_attached_file :image, styles: { :medium => "500x500>", :thumb => "250x250>" }
|
|
||||||
has_and_belongs_to_many :keywords, storing_keys: true
|
has_and_belongs_to_many :keywords, storing_keys: true
|
||||||
validates :title, presence: true
|
validates :title, presence: true
|
||||||
validates :date, presence: true
|
validates :date, presence: true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class NewsletterSubscription
|
class NewsletterSubscription
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
|
|
||||||
# PROPERTIES
|
# PROPERTIES
|
||||||
property :email
|
property :email
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class Quote
|
class Quote
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
include Paperclip::Glue
|
|
||||||
# TODO: Replace Paperclip with SimplyStored::HasAttachment
|
|
||||||
# 1. Change `include Paperclip::Glue` to `include SimplyStored::HasAttachment`
|
|
||||||
# 2. Replace `has_attached_file :image, styles: {...}` with `has_attachment :image, styles: {...}`
|
|
||||||
|
|
||||||
property :owner
|
property :owner
|
||||||
property :function
|
property :function
|
||||||
property :state
|
property :state
|
||||||
@@ -13,12 +8,9 @@ module Cmtool
|
|||||||
property :active, type: :boolean, default: true
|
property :active, type: :boolean, default: true
|
||||||
property :locale
|
property :locale
|
||||||
|
|
||||||
property :image_file_name
|
# Paperclip → has_local_attached migration
|
||||||
property :image_content_type
|
has_local_attached :image,
|
||||||
property :image_file_size, type: Integer
|
styles: { medium: '300x1000>', thumb: '137x1250>' }
|
||||||
property :image_updated_at, type: Time
|
|
||||||
|
|
||||||
has_attached_file :image, styles: {medium: "300x1000>", thumb: "137x1250>" }
|
|
||||||
|
|
||||||
view :for_sidebar_view, key: [:state, :created_at], conditions: %{doc['active']}
|
view :for_sidebar_view, key: [:state, :created_at], conditions: %{doc['active']}
|
||||||
STATES = %w[page sidebar]
|
STATES = %w[page sidebar]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
class YmlFile
|
class YmlFile
|
||||||
include SimplyStored::Couch
|
include SimplyCouch::Model
|
||||||
|
|
||||||
property :name
|
property :name
|
||||||
property :body
|
property :body
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
- if flash[:alert].present?
|
- if flash[:alert].present?
|
||||||
.row: .small-12.columns.alert-box.alert data-alert=true
|
.ui.negative.message
|
||||||
|
i.close.icon
|
||||||
= flash[:alert]
|
= flash[:alert]
|
||||||
a.close href="" ×
|
|
||||||
- if flash[:notice].present?
|
- if flash[:notice].present?
|
||||||
.row: .small-12.columns.alert-box.info data-alert=true
|
.ui.positive.message
|
||||||
|
i.close.icon
|
||||||
= flash[:notice]
|
= flash[:notice]
|
||||||
a.close href="" ×
|
|
||||||
- if warnings.any?
|
- if warnings.any?
|
||||||
.row: .small-12.columns.alert-box.warning data-alert=true
|
.ui.warning.message
|
||||||
ul
|
i.close.icon
|
||||||
|
ul.list
|
||||||
- for warning in warnings
|
- for warning in warnings
|
||||||
- if warning.is_a?(Hash)
|
- if warning.is_a?(Hash)
|
||||||
li.warning= t("cmtool.warnings.#{warning.delete(:message)}", warning)
|
li= t("cmtool.warnings.#{warning.delete(:message)}", warning)
|
||||||
- else
|
- else
|
||||||
li.warning= t("cmtool.warnings.#{warning}")
|
li= t("cmtool.warnings.#{warning}")
|
||||||
|
|||||||
@@ -1,32 +1,25 @@
|
|||||||
- user = defined?(cmtool_user) ? cmtool_user : (defined?(current_user) ? current_user : nil)
|
- user = defined?(cmtool_user) ? cmtool_user : (defined?(current_user) ? current_user : nil)
|
||||||
.fixed
|
.ui.inverted.menu
|
||||||
nav.top-bar data-topbar="" role="navigation"
|
= link_to application_title, cmtool.root_path, class: 'header item'
|
||||||
ul.title-area
|
- Cmtool::Menu.items.each do |menu_item|
|
||||||
li.name
|
- if menu_item.group?
|
||||||
h1
|
.ui.dropdown.item class=(menu_item.controller_names.include?(controller_name) ? 'active' : nil)
|
||||||
a href=cmtool.root_path = application_title
|
= menu_item.title
|
||||||
li.toggle-topbar.menu-icon
|
i.dropdown.icon
|
||||||
a href="#"
|
.menu
|
||||||
span Menu
|
- menu_item.items.compact.each do |child_item|
|
||||||
section.top-bar-section
|
- if child_item.divider?
|
||||||
- if user.present?
|
.divider
|
||||||
ul.right
|
- else
|
||||||
li.has-dropdown
|
= link_to child_item.title, child_item.path, class: ['item', (controller_name == child_item.controller_name ? 'active' : nil)]
|
||||||
a href="#" = user.email
|
- elsif menu_item.resource_link?
|
||||||
ul.dropdown
|
= link_to menu_item.title, menu_item.path, class: ['item', (menu_item.controller_name == controller_name ? 'active' : nil)]
|
||||||
li.log-out= link_to t('helpers.links.logout'), main_app.root_path
|
- elsif menu_item.engine_link?
|
||||||
ul.left
|
= link_to menu_item.title, menu_item.path, class: 'item'
|
||||||
- Cmtool::Menu.items.each do |menu_item|
|
.right.menu
|
||||||
- if menu_item.group?
|
- if user.present?
|
||||||
li.has-dropdown class=(menu_item.controller_names.include?(controller_name) ? 'active' : '')
|
.ui.dropdown.item
|
||||||
a href="#" = menu_item.title
|
span= user.email
|
||||||
ul.dropdown
|
i.dropdown.icon
|
||||||
- menu_item.items.compact.each do |child_item|
|
.menu
|
||||||
- if child_item.divider?
|
= link_to t('helpers.links.logout'), main_app.root_path, class: 'item'
|
||||||
li.divider
|
|
||||||
- else
|
|
||||||
li class=(controller_name == child_item.controller_name ? 'active' : '') = link_to child_item.title, child_item.path
|
|
||||||
- elsif menu_item.resource_link?
|
|
||||||
li class=(menu_item.controller_name == controller_name ? 'active' : '') = link_to menu_item.title, menu_item.path
|
|
||||||
- elsif menu_item.engine_link?
|
|
||||||
li= link_to menu_item.title, menu_item.path
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @contact_form] do |f|
|
= form_for [cmtool, @contact_form], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @contact_form
|
= render 'error_messages', :target => @contact_form
|
||||||
|
|
||||||
.field
|
.field
|
||||||
@@ -17,4 +17,4 @@
|
|||||||
= f.label :body
|
= f.label :body
|
||||||
= f.text_area :body, class: :editor_full
|
= f.text_area :body, class: :editor_full
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@contact_form)
|
= f.submit @submit || update_button_text(@contact_form), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::ContactForm
|
- title :index, Cmtool::ContactForm
|
||||||
- if @contact_forms.any?
|
- if @contact_forms.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::ContactForm.human_attribute_name(:gender)
|
th= Cmtool::ContactForm.human_attribute_name(:gender)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @directory], :html => {:multipart => true} do |f|
|
= form_for [cmtool, @directory], :html => {:multipart => true, :class => 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @directory
|
= render 'error_messages', :target => @directory
|
||||||
.field
|
.field
|
||||||
= f.label :name
|
= f.label :name
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
= f.label :parent_id, Cmtool::Directory.model_name.human
|
= f.label :parent_id, Cmtool::Directory.model_name.human
|
||||||
= f.select :parent_id, tree_options_for_select(Cmtool::Directory.full_tree, exclude: @directory.id, selected: @directory.parent_id), include_blank: ''
|
= f.select :parent_id, tree_options_for_select(Cmtool::Directory.full_tree, exclude: @directory.id, selected: @directory.parent_id), include_blank: ''
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@directory)
|
= f.submit @submit || update_button_text(@directory), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::Directory
|
- title :index, Cmtool::Directory
|
||||||
- if @directories.any?
|
- if @directories.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::Directory.human_attribute_name(:name)
|
th= Cmtool::Directory.human_attribute_name(:name)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @faq] do |f|
|
= form_for [cmtool, @faq], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @faq
|
= render 'error_messages', :target => @faq
|
||||||
|
|
||||||
.field
|
.field
|
||||||
@@ -8,4 +8,4 @@
|
|||||||
= f.label :answer
|
= f.label :answer
|
||||||
= f.text_area :answer, :rows => 6, :class => 'editor_basic'
|
= f.text_area :answer, :rows => 6, :class => 'editor_basic'
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@faq)
|
= f.submit @submit || update_button_text(@faq), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::Faq
|
- title :index, Cmtool::Faq
|
||||||
- if @faqs.any?
|
- if @faqs.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::Faq.human_attribute_name(:question)
|
th= Cmtool::Faq.human_attribute_name(:question)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @image], html: {multipart: true} do |f|
|
= form_for [cmtool, @image], html: {multipart: true, class: 'ui form'} do |f|
|
||||||
= render 'error_messages', target: @image
|
= render 'error_messages', target: @image
|
||||||
|
|
||||||
.field
|
.field
|
||||||
@@ -9,4 +9,4 @@
|
|||||||
= f.select :directory_id, Cmtool::Directory.all.map{|d| ["-"*d.tree_depth + ' ' + d.name.to_s, d.id]}
|
= f.select :directory_id, Cmtool::Directory.all.map{|d| ["-"*d.tree_depth + ' ' + d.name.to_s, d.id]}
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@image)
|
= f.submit @submit || update_button_text(@image), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::Image
|
- title :index, Cmtool::Image
|
||||||
- if @images.any?
|
- if @images.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::Image.model_name.human
|
th= Cmtool::Image.model_name.human
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
= form_for [cmtool, @keyword] do |f|
|
= form_for [cmtool, @keyword], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @keyword
|
= render 'error_messages', :target => @keyword
|
||||||
.form-row
|
.form-row
|
||||||
.form-label= f.label :name
|
.form-label= f.label :name
|
||||||
.form-field= f.text_field :name
|
.form-field= f.text_field :name
|
||||||
.form-row: .form-actions
|
.form-row: .form-actions
|
||||||
= f.submit @submit || update_button_text(@keyword), class: 'form-submit-button'
|
= f.submit @submit || update_button_text(@keyword), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::Keyword
|
- title :index, Cmtool::Keyword
|
||||||
- if @keywords.any?
|
- if @keywords.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::Keyword.human_attribute_name(:name)
|
th= Cmtool::Keyword.human_attribute_name(:name)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @news], html: {multipart: true} do |f|
|
= form_for [cmtool, @news], html: {multipart: true, class: 'ui form'} do |f|
|
||||||
= render 'error_messages', target: @news
|
= render 'error_messages', target: @news
|
||||||
.field
|
.field
|
||||||
= f.label :title
|
= f.label :title
|
||||||
@@ -19,4 +19,4 @@
|
|||||||
.field
|
.field
|
||||||
= render "cmtool/keywords/habtm", subject: @news
|
= render "cmtool/keywords/habtm", subject: @news
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@news)
|
= f.submit @submit || update_button_text(@news), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::News
|
- title :index, Cmtool::News
|
||||||
- if @news.any?
|
- if @news.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::News.human_attribute_name(:title)
|
th= Cmtool::News.human_attribute_name(:title)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @newsletter_subscription] do |f|
|
= form_for [cmtool, @newsletter_subscription], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @newsletter_subscription
|
= render 'error_messages', :target => @newsletter_subscription
|
||||||
|
|
||||||
.field
|
.field
|
||||||
@@ -8,4 +8,4 @@
|
|||||||
= f.label :active
|
= f.label :active
|
||||||
= f.check_box :active
|
= f.check_box :active
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@newsletter_subscription)
|
= f.submit @submit || update_button_text(@newsletter_subscription), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::NewsletterSubscription
|
- title :index, Cmtool::NewsletterSubscription
|
||||||
- if @newsletter_subscriptions.any?
|
- if @newsletter_subscriptions.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::NewsletterSubscription.human_attribute_name(:email)
|
th= Cmtool::NewsletterSubscription.human_attribute_name(:email)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
javascript:
|
javascript:
|
||||||
page_vars = #{Cmtool::YmlFile.all_as_object.to_json.html_safe};
|
page_vars = #{Cmtool::YmlFile.all_as_object.to_json.html_safe};
|
||||||
#preview-modal.reveal-modal.large data-reveal=""
|
#preview-modal.ui.large.modal
|
||||||
iframe allowfullscreen="" frameborder="0" height="100%" src="about:blank" width="100%"
|
i.close.icon
|
||||||
a.close-reveal-modal ×
|
.content
|
||||||
= form_for [cmtool, @page] do |f|
|
iframe allowfullscreen="" frameborder="0" height="100%" src="about:blank" width="100%"
|
||||||
|
= form_for [cmtool, @page], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', target: @page
|
= render 'error_messages', target: @page
|
||||||
.form-row
|
.form-row
|
||||||
.form-label= f.label :name
|
.form-label= f.label :name
|
||||||
@@ -58,5 +59,5 @@ javascript:
|
|||||||
.field
|
.field
|
||||||
= render "cmtool/keywords/habtm", subject: @page
|
= render "cmtool/keywords/habtm", subject: @page
|
||||||
.form-row: .form-actions
|
.form-row: .form-actions
|
||||||
= f.submit @submit || update_button_text(f.object), class: 'button'
|
= f.submit @submit || update_button_text(f.object), class: 'ui primary button'
|
||||||
-#= button_tag 'Preview (unsupported)', onclick: %{$('form').attr('action', '/' + $('#page_name').val()).submit();}
|
-#= button_tag 'Preview (unsupported)', onclick: %{$('form').attr('action', '/' + $('#page_name').val()).submit();}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
- title :index, Page
|
- title :index, Page
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Page.human_attribute_name(:name)
|
th= Page.human_attribute_name(:name)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @quote], html: {multipart: true} do |f|
|
= form_for [cmtool, @quote], html: {multipart: true, class: 'ui form'} do |f|
|
||||||
= render 'error_messages', target: @quote
|
= render 'error_messages', target: @quote
|
||||||
.field
|
.field
|
||||||
= f.label :owner
|
= f.label :owner
|
||||||
@@ -19,4 +19,4 @@
|
|||||||
= f.label :active
|
= f.label :active
|
||||||
= f.check_box :active
|
= f.check_box :active
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@quote)
|
= f.submit @submit || update_button_text(@quote), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::Quote
|
- title :index, Cmtool::Quote
|
||||||
- if @quotes.any?
|
- if @quotes.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::Quote.human_attribute_name(:owner)
|
th= Cmtool::Quote.human_attribute_name(:owner)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @user] do |f|
|
= form_for [cmtool, @user], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @user
|
= render 'error_messages', :target => @user
|
||||||
|
|
||||||
.field
|
.field
|
||||||
@@ -24,4 +24,4 @@
|
|||||||
= f.label :admin
|
= f.label :admin
|
||||||
= f.check_box :admin
|
= f.check_box :admin
|
||||||
.actions
|
.actions
|
||||||
= f.submit @submit || update_button_text(@user)
|
= f.submit @submit || update_button_text(@user), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, User
|
- title :index, User
|
||||||
- if @users.any?
|
- if @users.any?
|
||||||
table.index-table
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= User.human_attribute_name(:email)
|
th= User.human_attribute_name(:email)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= form_for [cmtool, @yml_file] do |f|
|
= form_for [cmtool, @yml_file], html: {class: 'ui form'} do |f|
|
||||||
= render 'error_messages', :target => @yml_file
|
= render 'error_messages', :target => @yml_file
|
||||||
.form-row
|
.form-row
|
||||||
.form-label= f.label :name
|
.form-label= f.label :name
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
.form-row
|
.form-row
|
||||||
= f.text_area :body, class: 'yml-content'
|
= f.text_area :body, class: 'yml-content'
|
||||||
.form-row: .form-actions
|
.form-row: .form-actions
|
||||||
= f.submit @submit || update_button_text(@yml_file), class: 'form-submit-button'
|
= f.submit @submit || update_button_text(@yml_file), class: 'ui primary button'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- title :index, Cmtool::YmlFile
|
- title :index, Cmtool::YmlFile
|
||||||
- if @yml_files.any?
|
- if @yml_files.any?
|
||||||
table.index-table.table.table-striped.table-hover
|
table.ui.celled.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th= Cmtool::YmlFile.human_attribute_name(:name)
|
th= Cmtool::YmlFile.human_attribute_name(:name)
|
||||||
|
|||||||
@@ -24,23 +24,24 @@ html lang="en"
|
|||||||
|
|
||||||
body
|
body
|
||||||
= render 'cmtool/application/menu'
|
= render 'cmtool/application/menu'
|
||||||
= render 'cmtool/application/alerts'
|
.ui.container
|
||||||
.row
|
= render 'cmtool/application/alerts'
|
||||||
.small-12.large-9.columns
|
.ui.grid
|
||||||
h3= content_for?(:page_title) ? yield(:page_title) : application_title
|
.twelve.wide.column
|
||||||
= content_for?(:content) ? yield(:content) : yield
|
h3.ui.header= content_for?(:page_title) ? yield(:page_title) : application_title
|
||||||
- if content_for?(:page_links)
|
= content_for?(:content) ? yield(:content) : yield
|
||||||
#sub-navigation-container= yield(:page_links)
|
- if content_for?(:page_links)
|
||||||
.show-for-large-up.large-3.columns
|
#sub-navigation-container= yield(:page_links)
|
||||||
.panel
|
.four.wide.column
|
||||||
h4 Links
|
.ui.segment
|
||||||
ul.side-nav
|
h4.ui.header Links
|
||||||
li= link_to "Home", cmtool.root_path
|
.ui.link.list
|
||||||
li= link_to 'Wiki', 'https://github.com/bterkuile/cmtool/wiki', target: :_blank
|
a.item href=cmtool.root_path Home
|
||||||
= yield :sidebar
|
a.item href="https://github.com/bterkuile/cmtool/wiki" target="_blank" Wiki
|
||||||
footer
|
= yield :sidebar
|
||||||
p
|
footer.ui.footer
|
||||||
span © Cmtool
|
p
|
||||||
span= Date.today.year
|
span © Cmtool
|
||||||
= yield :footer
|
span= Date.today.year
|
||||||
|
= yield :footer
|
||||||
#hidden-html.hide= yield :hidden_html
|
#hidden-html.hide= yield :hidden_html
|
||||||
|
|||||||
+1
-2
@@ -23,8 +23,7 @@ Gem::Specification.new do |s|
|
|||||||
s.add_runtime_dependency "slim-rails", ">= 0"
|
s.add_runtime_dependency "slim-rails", ">= 0"
|
||||||
# s.add_runtime_dependency "tinymce-rails", ">= 0"
|
# s.add_runtime_dependency "tinymce-rails", ">= 0"
|
||||||
s.add_runtime_dependency "jquery-rails", ">= 0"
|
s.add_runtime_dependency "jquery-rails", ">= 0"
|
||||||
s.add_runtime_dependency "paperclip", ">= 0"
|
s.add_runtime_dependency "fomantic-ui-sass", ">= 0"
|
||||||
s.add_runtime_dependency "foundation-rails", ">= 0"
|
|
||||||
s.add_runtime_dependency "ace-rails-ap", ">= 0"
|
s.add_runtime_dependency "ace-rails-ap", ">= 0"
|
||||||
s.add_runtime_dependency "font-awesome-rails", ">= 0"
|
s.add_runtime_dependency "font-awesome-rails", ">= 0"
|
||||||
s.add_runtime_dependency "pickadate-rails", ">= 0"
|
s.add_runtime_dependency "pickadate-rails", ">= 0"
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ require 'email_validator'
|
|||||||
# Paperclip replacement — stores file metadata as CouchDB properties,
|
# Paperclip replacement — stores file metadata as CouchDB properties,
|
||||||
# handles thumbnail generation via MiniMagick.
|
# handles thumbnail generation via MiniMagick.
|
||||||
# Replace `include Paperclip::Glue` + `has_attached_file` with
|
# Replace `include Paperclip::Glue` + `has_attached_file` with
|
||||||
# `include SimplyStored::HasAttachment` + `has_attachment`
|
# `include SimplyCouch::HasAttachment` + `has_attachment`
|
||||||
# has_attachment now in simply_stored gem
|
# has_attachment now in simply_couch gem
|
||||||
|
|
||||||
module Cmtool
|
module Cmtool
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
=begin
|
=begin
|
||||||
require 'couch_potato'
|
require 'simply_couch'
|
||||||
require 'simply_stored'
|
|
||||||
require 'email_validator'
|
require 'email_validator'
|
||||||
require 'devise'
|
require 'devise'
|
||||||
require 'devise_simply_stored'
|
require 'devise_simply_couch'
|
||||||
require 'sass-rails'
|
require 'sass-rails'
|
||||||
require 'paperclip'
|
require 'paperclip'
|
||||||
require 'jquery-rails'
|
require 'jquery-rails'
|
||||||
@@ -19,7 +18,7 @@ module Cmtool
|
|||||||
# require 'slim-rails'
|
# require 'slim-rails'
|
||||||
# require 'paperclip'
|
# require 'paperclip'
|
||||||
# require 'devise'
|
# require 'devise'
|
||||||
# require 'devise_simply_stored'
|
# require 'devise_simply_couch'
|
||||||
# require 'jquery-rails'
|
# require 'jquery-rails'
|
||||||
# # require 'tinymce-rails'
|
# # require 'tinymce-rails'
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module Cmtool
|
|||||||
module Includes
|
module Includes
|
||||||
module Page
|
module Page
|
||||||
def self.included(klass)
|
def self.included(klass)
|
||||||
klass.send :include, SimplyStored::Couch
|
klass.send :include, SimplyCouch::Model
|
||||||
klass.send :include, InstanceMethods
|
klass.send :include, InstanceMethods
|
||||||
klass.send :extend, ClassMethods
|
klass.send :extend, ClassMethods
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ module Cmtool
|
|||||||
module Includes
|
module Includes
|
||||||
module User
|
module User
|
||||||
def self.included(klass)
|
def self.included(klass)
|
||||||
klass.send :include, SimplyStored::Couch
|
klass.send :include, SimplyCouch::Model
|
||||||
#klass.send :include, Devise::Orm::SimplyStored
|
#klass.send :include, Devise::Orm::SimplyCouch
|
||||||
klass.send :include, InstanceMethods
|
klass.send :include, InstanceMethods
|
||||||
klass.send :extend, ClassMethods
|
klass.send :extend, ClassMethods
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Cmtool
|
module Cmtool
|
||||||
VERSION = "3.0.0"
|
VERSION = "4.0.0"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ Devise.setup do |config|
|
|||||||
# Load and configure the ORM. Supports :active_record (default) and
|
# Load and configure the ORM. Supports :active_record (default) and
|
||||||
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
||||||
# available as additional gems.
|
# available as additional gems.
|
||||||
#require 'devise/orm/simply_stored'
|
#require 'devise/orm/simply_couch'
|
||||||
require 'orm_adapter/adapters/simply_stored'
|
require 'orm_adapter/adapters/simply_couch'
|
||||||
|
|
||||||
# ==> Configuration for any authentication mechanism
|
# ==> Configuration for any authentication mechanism
|
||||||
# Configure which keys are used when authenticating a user. The default is
|
# Configure which keys are used when authenticating a user. The default is
|
||||||
|
|||||||
Reference in New Issue
Block a user