merge
2
.gitignore
vendored
@ -27,6 +27,6 @@ tmp/*
|
|||||||
.rvmrc
|
.rvmrc
|
||||||
Capfile
|
Capfile
|
||||||
config/deploy.rb
|
config/deploy.rb
|
||||||
perf/test.rb
|
perf/*.rb
|
||||||
gem_graph.png
|
gem_graph.png
|
||||||
sites/
|
sites/
|
||||||
|
8
Gemfile
@ -2,7 +2,7 @@ source :rubygems
|
|||||||
|
|
||||||
# add in all the runtime dependencies
|
# add in all the runtime dependencies
|
||||||
|
|
||||||
gem 'rails', '>= 3.0.4'
|
gem 'rails', '>= 3.0.5'
|
||||||
|
|
||||||
gem 'warden'
|
gem 'warden'
|
||||||
gem 'devise', '= 1.1.3'
|
gem 'devise', '= 1.1.3'
|
||||||
@ -18,10 +18,10 @@ gem 'formtastic', '~> 1.2.3'
|
|||||||
gem 'inherited_resources', '~> 1.1.2'
|
gem 'inherited_resources', '~> 1.1.2'
|
||||||
|
|
||||||
gem 'rmagick', '2.12.2'
|
gem 'rmagick', '2.12.2'
|
||||||
gem 'locomotive_carrierwave', '0.5.0.1.beta2', :require => 'carrierwave'
|
gem 'locomotive_carrierwave', '0.5.0.1.beta3', :require => 'carrierwave'
|
||||||
# gem 'carrierwave', :path => '/Users/didier/Desktop/carrierwave'
|
|
||||||
|
|
||||||
gem 'custom_fields', '1.0.0.beta.4'
|
gem 'custom_fields', '1.0.0.beta.5'
|
||||||
|
# gem 'custom_fields', :path => '../gems/custom_fields'
|
||||||
gem 'fog', '0.3.7'
|
gem 'fog', '0.3.7'
|
||||||
gem 'mimetype-fu'
|
gem 'mimetype-fu'
|
||||||
gem 'actionmailer-with-request'
|
gem 'actionmailer-with-request'
|
||||||
|
14
Gemfile.lock
@ -77,10 +77,10 @@ GEM
|
|||||||
cucumber-rails (0.3.2)
|
cucumber-rails (0.3.2)
|
||||||
cucumber (>= 0.8.0)
|
cucumber (>= 0.8.0)
|
||||||
culerity (0.2.15)
|
culerity (0.2.15)
|
||||||
custom_fields (1.0.0.beta.4)
|
custom_fields (1.0.0.beta.5)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.4)
|
||||||
locomotive_carrierwave
|
locomotive_carrierwave
|
||||||
mongoid (~> 2.0.0.rc.6)
|
mongoid (~> 2.0.0.rc.7)
|
||||||
daemons (1.1.0)
|
daemons (1.1.0)
|
||||||
database_cleaner (0.6.4)
|
database_cleaner (0.6.4)
|
||||||
delayed_job (2.1.2)
|
delayed_job (2.1.2)
|
||||||
@ -143,7 +143,7 @@ GEM
|
|||||||
linecache (0.43)
|
linecache (0.43)
|
||||||
linecache19 (0.5.11)
|
linecache19 (0.5.11)
|
||||||
ruby_core_source (>= 0.1.4)
|
ruby_core_source (>= 0.1.4)
|
||||||
locomotive_carrierwave (0.5.0.1.beta2)
|
locomotive_carrierwave (0.5.0.1.beta3)
|
||||||
activesupport (~> 3.0)
|
activesupport (~> 3.0)
|
||||||
locomotive_jammit-s3 (0.5.4.4)
|
locomotive_jammit-s3 (0.5.4.4)
|
||||||
jammit (>= 0.5.4)
|
jammit (>= 0.5.4)
|
||||||
@ -264,7 +264,7 @@ DEPENDENCIES
|
|||||||
capybara
|
capybara
|
||||||
cucumber (= 0.8.5)
|
cucumber (= 0.8.5)
|
||||||
cucumber-rails
|
cucumber-rails
|
||||||
custom_fields (= 1.0.0.beta.4)
|
custom_fields (= 1.0.0.beta.5)
|
||||||
database_cleaner
|
database_cleaner
|
||||||
delayed_job (= 2.1.2)
|
delayed_job (= 2.1.2)
|
||||||
delayed_job_mongoid (= 1.0.2)
|
delayed_job_mongoid (= 1.0.2)
|
||||||
@ -278,7 +278,7 @@ DEPENDENCIES
|
|||||||
httparty (>= 0.6.1)
|
httparty (>= 0.6.1)
|
||||||
inherited_resources (~> 1.1.2)
|
inherited_resources (~> 1.1.2)
|
||||||
launchy
|
launchy
|
||||||
locomotive_carrierwave (= 0.5.0.1.beta2)
|
locomotive_carrierwave (= 0.5.0.1.beta3)
|
||||||
locomotive_jammit-s3
|
locomotive_jammit-s3
|
||||||
locomotive_liquid (= 2.2.2)
|
locomotive_liquid (= 2.2.2)
|
||||||
locomotive_mongoid_acts_as_tree (= 0.1.5.5)
|
locomotive_mongoid_acts_as_tree (= 0.1.5.5)
|
||||||
@ -286,7 +286,7 @@ DEPENDENCIES
|
|||||||
mocha!
|
mocha!
|
||||||
mongoid (~> 2.0.0.rc.7)
|
mongoid (~> 2.0.0.rc.7)
|
||||||
pickle
|
pickle
|
||||||
rails (>= 3.0.4)
|
rails (>= 3.0.5)
|
||||||
rmagick (= 2.12.2)
|
rmagick (= 2.12.2)
|
||||||
rspec-rails (= 2.3.1)
|
rspec-rails (= 2.3.1)
|
||||||
ruby-debug
|
ruby-debug
|
||||||
|
@ -12,13 +12,11 @@ module Admin
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@content = @content_type.contents.create(params[:content])
|
create! { edit_admin_content_url(@content_type.slug, @content.id) }
|
||||||
|
|
||||||
respond_with(@content, :location => edit_admin_content_url(@content_type.slug, @content))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
update! { edit_admin_content_url(@content_type.slug, @content) }
|
update! { edit_admin_content_url(@content_type.slug, @content.id) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def sort
|
def sort
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
module Admin::AssetsHelper
|
module Admin::AssetsHelper
|
||||||
|
|
||||||
def vignette_tag(asset)
|
def vignette_tag(asset)
|
||||||
image_tag(asset.vignette_url)
|
if asset.image?
|
||||||
|
html, css = image_tag(asset.vignette_url), 'image'
|
||||||
|
else
|
||||||
|
css = "icon #{asset.content_type}"
|
||||||
|
html = asset.content_type.to_s == 'other' ? truncate(asset.extname, :length => 3) : asset.content_type
|
||||||
|
html = '?' if html.blank?
|
||||||
|
end
|
||||||
|
|
||||||
|
content_tag(:div, content_tag(:div, html, :class => 'inside'), :class => css)
|
||||||
end
|
end
|
||||||
|
|
||||||
def image_dimensions_and_size(asset)
|
def image_dimensions_and_size(asset)
|
||||||
|
@ -10,8 +10,10 @@ module Admin::BaseHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def admin_menu_item(name, url)
|
def admin_menu_item(name, url)
|
||||||
label = content_tag(:em) + escape_once(' ') + t("admin.shared.menu.#{name}")
|
index = controller.instance_variable_get(:@menu_index) || 1
|
||||||
content_tag(:li, link_to(label, url), :class => name.dasherize)
|
controller.instance_variable_set(:@menu_index, index + 1)
|
||||||
|
label = content_tag(:em, escape_once(' ')) + content_tag(:span, t("admin.shared.menu.#{name}"))
|
||||||
|
content_tag(:li, content_tag(:span) + link_to(label, url), :class => "item #{'first' if index == 1} item-#{index} #{name.dasherize}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_button_tag(text, url, options = {})
|
def admin_button_tag(text, url, options = {})
|
||||||
@ -25,18 +27,26 @@ module Admin::BaseHelper
|
|||||||
default_options = { :i18n => true, :css => name.dasherize.downcase }
|
default_options = { :i18n => true, :css => name.dasherize.downcase }
|
||||||
default_options.merge!(options)
|
default_options.merge!(options)
|
||||||
|
|
||||||
css = "#{'on' if name == sections(:sub)} #{'links' if block_given?} #{options[:css]}"
|
css = "#{'on' if name == sections(:sub)} #{options[:css]}"
|
||||||
|
|
||||||
label_link = default_options[:i18n] ? t("admin.shared.menu.#{name}") : name
|
label_link = default_options[:i18n] ? t("admin.shared.menu.#{name}") : name
|
||||||
if block_given?
|
if block_given?
|
||||||
popup = content_tag(:div, capture(&block), :class => 'popup', :style => 'display: none')
|
popup = content_tag(:div, capture(&block), :class => 'popup', :style => 'display: none')
|
||||||
link = link_to(content_tag(:span, preserve(label_link + content_tag(:em))), url)
|
link = link_to(content_tag(:span, preserve(label_link) + content_tag(:em)) + content_tag(:em), url, :class => css)
|
||||||
content_tag(:li, link + popup, :class => css)
|
content_tag(:li, link + popup, :class => 'hoverable')
|
||||||
else
|
else
|
||||||
content_tag(:li, link_to(content_tag(:span, label_link), url), :class => css)
|
content_tag(:li, link_to(content_tag(:span, label_link), url, :class => css))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def collection_to_js(collection, options = {})
|
||||||
|
js = collection.collect { |object| object.to_json }
|
||||||
|
|
||||||
|
options_to_js = options.to_json.gsub(/^\{/, '').gsub(/\}$/, '')
|
||||||
|
|
||||||
|
"new Object({ \"collection\": [#{js.join(', ')}], #{options_to_js} })"
|
||||||
|
end
|
||||||
|
|
||||||
def growl_message
|
def growl_message
|
||||||
if not flash.empty?
|
if not flash.empty?
|
||||||
%{
|
%{
|
||||||
|
@ -2,7 +2,7 @@ module Admin::CustomFieldsHelper
|
|||||||
|
|
||||||
def options_for_field_kind
|
def options_for_field_kind
|
||||||
options = %w{string text category boolean date file}.map do |kind|
|
options = %w{string text category boolean date file}.map do |kind|
|
||||||
[t("admin.custom_fields.kind.#{kind}"), kind]
|
[t("custom_fields.kind.#{kind}"), kind]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -32,6 +32,11 @@ class Asset
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def extname
|
||||||
|
return nil unless self.source?
|
||||||
|
File.extname(self.source_filename).gsub(/^\./, '')
|
||||||
|
end
|
||||||
|
|
||||||
def site_id # needed by the uploader of custom fields
|
def site_id # needed by the uploader of custom fields
|
||||||
self.collection.site_id
|
self.collection.site_id
|
||||||
end
|
end
|
||||||
|
@ -9,7 +9,7 @@ class AssetCollection
|
|||||||
|
|
||||||
## associations ##
|
## associations ##
|
||||||
referenced_in :site
|
referenced_in :site
|
||||||
embeds_many :assets
|
embeds_many :assets, :validate => false
|
||||||
|
|
||||||
## behaviours ##
|
## behaviours ##
|
||||||
custom_fields_for :assets
|
custom_fields_for :assets
|
||||||
|
@ -43,20 +43,6 @@ class ContentInstance
|
|||||||
self._visible || self._visible.nil?
|
self._visible || self._visible.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def aliased_attributes # TODO: move it to the custom_fields gem
|
|
||||||
hash = { :created_at => self.created_at, :updated_at => self.updated_at }
|
|
||||||
|
|
||||||
self.custom_fields.each do |field|
|
|
||||||
case field.kind
|
|
||||||
when 'file' then hash[field._alias] = self.send(field._name.to_sym).url
|
|
||||||
else
|
|
||||||
hash[field._alias] = self.send(field._name.to_sym)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
hash
|
|
||||||
end
|
|
||||||
|
|
||||||
def errors_to_hash
|
def errors_to_hash
|
||||||
Hash.new.replace(self.errors)
|
Hash.new.replace(self.errors)
|
||||||
end
|
end
|
||||||
|
@ -14,12 +14,15 @@ class ContentType
|
|||||||
|
|
||||||
## associations ##
|
## associations ##
|
||||||
referenced_in :site
|
referenced_in :site
|
||||||
embeds_many :contents, :class_name => 'ContentInstance' do
|
embeds_many :contents, :class_name => 'ContentInstance', :validate => false do
|
||||||
def visible
|
def visible
|
||||||
@target.find_all { |c| c.visible? }
|
@target.find_all { |c| c.visible? }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
## named scopes ##
|
||||||
|
scope :first_by_slug, lambda { |slug| where(:slug => slug) }
|
||||||
|
|
||||||
## indexes ##
|
## indexes ##
|
||||||
index [[:site_id, Mongo::ASCENDING], [:slug, Mongo::ASCENDING]]
|
index [[:site_id, Mongo::ASCENDING], [:slug, Mongo::ASCENDING]]
|
||||||
|
|
||||||
|
@ -10,32 +10,9 @@ module Models
|
|||||||
else
|
else
|
||||||
self.source.url(:medium)
|
self.source.url(:medium)
|
||||||
end
|
end
|
||||||
# elsif asset.pdf?
|
|
||||||
# image_tag(asset.source.url(:medium))
|
|
||||||
else
|
|
||||||
mime_type_to_url(:medium)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def mime_type_to_url(size)
|
|
||||||
mime_type = File.mime_type?(self.source_filename)
|
|
||||||
filename = "unknown"
|
|
||||||
|
|
||||||
if !(mime_type =~ /pdf/).nil?
|
|
||||||
filename = "PDF"
|
|
||||||
elsif !(mime_type =~ /css/).nil?
|
|
||||||
filename = "CSS"
|
|
||||||
elsif !(mime_type =~ /javascript/).nil?
|
|
||||||
filename = "JAVA"
|
|
||||||
elsif !(mime_type =~ /font/).nil?
|
|
||||||
filename = "FON"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.join("admin", "icons", "filetype", size.to_s, filename + ".png")
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -28,6 +28,7 @@ class Page
|
|||||||
index [[:fullpath, Mongo::ASCENDING], [:site_id, Mongo::ASCENDING]]
|
index [[:fullpath, Mongo::ASCENDING], [:site_id, Mongo::ASCENDING]]
|
||||||
|
|
||||||
## callbacks ##
|
## callbacks ##
|
||||||
|
after_initialize :set_default_raw_template
|
||||||
before_validation :normalize_slug
|
before_validation :normalize_slug
|
||||||
before_save { |p| p.fullpath = p.fullpath(true) }
|
before_save { |p| p.fullpath = p.fullpath(true) }
|
||||||
before_destroy :do_not_remove_index_and_404_pages
|
before_destroy :do_not_remove_index_and_404_pages
|
||||||
@ -102,4 +103,8 @@ class Page
|
|||||||
self.slug.slugify!(:without_extension => true) if self.slug.present?
|
self.slug.slugify!(:without_extension => true) if self.slug.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_default_raw_template
|
||||||
|
self.raw_template ||= I18n.t('attributes.defaults.pages.other.body')
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -12,17 +12,17 @@ class AssetUploader < CarrierWave::Uploader::Base
|
|||||||
"#{Rails.root}/tmp/uploads"
|
"#{Rails.root}/tmp/uploads"
|
||||||
end
|
end
|
||||||
|
|
||||||
version :thumb do
|
version :thumb, :if => :image? do
|
||||||
process :resize_to_fill => [50, 50]
|
process :resize_to_fill => [50, 50]
|
||||||
process :convert => 'png'
|
process :convert => 'png'
|
||||||
end
|
end
|
||||||
|
|
||||||
version :medium do
|
version :medium, :if => :image? do
|
||||||
process :resize_to_fill => [80, 80]
|
process :resize_to_fill => [80, 80]
|
||||||
process :convert => 'png'
|
process :convert => 'png'
|
||||||
end
|
end
|
||||||
|
|
||||||
version :preview do
|
version :preview, :if => :image? do
|
||||||
process :resize_to_fit => [880, 1100]
|
process :resize_to_fit => [880, 1100]
|
||||||
process :convert => 'png'
|
process :convert => 'png'
|
||||||
end
|
end
|
||||||
@ -58,6 +58,10 @@ class AssetUploader < CarrierWave::Uploader::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def image?
|
||||||
|
model.image?
|
||||||
|
end
|
||||||
|
|
||||||
def self.content_types
|
def self.content_types
|
||||||
{
|
{
|
||||||
:image => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg', 'image/x-icon'],
|
:image => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg', 'image/x-icon'],
|
||||||
|
@ -8,15 +8,11 @@
|
|||||||
= semantic_form_for @account, :url => admin_accounts_url do |f|
|
= semantic_form_for @account, :url => admin_accounts_url do |f|
|
||||||
|
|
||||||
= f.foldable_inputs :name => :information do
|
= f.foldable_inputs :name => :information do
|
||||||
= f.input :name, :required => false
|
= f.input :name
|
||||||
|
|
||||||
= f.foldable_inputs :name => :credentials do
|
= f.foldable_inputs :name => :credentials do
|
||||||
= f.input :email, :required => false
|
= f.input :email
|
||||||
|
= f.input :password, :input_html => { :autocomplete => "off" }
|
||||||
= f.custom_input :password, :label => :new_password do
|
= f.input :password_confirmation, :input_html => { :autocomplete => "off" }
|
||||||
= f.password_field :password
|
|
||||||
|
|
||||||
= f.custom_input :password_confirmation, :label => :new_password_confirmation do
|
|
||||||
= f.password_field :password_confirmation
|
|
||||||
|
|
||||||
= render 'admin/shared/form_actions', :back_url => edit_admin_current_site_url, :button_label => :create
|
= render 'admin/shared/form_actions', :back_url => edit_admin_current_site_url, :button_label => :create
|
@ -1,7 +1,5 @@
|
|||||||
%li{ :id => "asset-#{asset.id}", :class => "asset #{'last' if (asset_counter + 1) % 6 == 0}"}
|
%li{ :id => "asset-#{asset.id}", :class => "asset #{'last' if (asset_counter + 1) % 6 == 0}"}
|
||||||
%h4= link_to truncate(asset.name, :length => 22), edit_admin_asset_path(@asset_collection, asset)
|
%h4= link_to truncate(asset.name, :length => 17), edit_admin_asset_path(@asset_collection, asset)
|
||||||
.image
|
= vignette_tag(asset)
|
||||||
.inside
|
|
||||||
= vignette_tag(asset)
|
|
||||||
.actions
|
.actions
|
||||||
= link_to image_tag('admin/list/icons/cross.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
= link_to image_tag('admin/list/icons/cross.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
@ -30,4 +30,4 @@
|
|||||||
|
|
||||||
= render 'admin/shared/form_actions', :delete_button => link_to(content_tag(:em, escape_once(' ')) + t('.destroy'), admin_asset_collection_url(@asset_collection), :confirm => t('admin.messages.confirm'), :method => :delete, :class => 'button small remove'), :button_label => :update
|
= render 'admin/shared/form_actions', :delete_button => link_to(content_tag(:em, escape_once(' ')) + t('.destroy'), admin_asset_collection_url(@asset_collection), :confirm => t('admin.messages.confirm'), :method => :delete, :class => 'button small remove'), :button_label => :update
|
||||||
|
|
||||||
= render 'admin/custom_fields/edit_field'
|
= render 'admin/custom_fields/edit_field'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
= f.inputs :name => :information do
|
= f.inputs :name => :information do
|
||||||
= f.input :name
|
= f.input :name
|
||||||
= f.input :source
|
= f.input :source, :hint => preserve(t("formtastic.hints.asset.#{action_name}.source", :url => link_to(@asset.source_filename, @asset.source.url)))
|
||||||
|
|
||||||
- unless @asset.custom_fields.blank?
|
- unless @asset.custom_fields.blank?
|
||||||
= render 'admin/custom_fields/custom_form', :form => f, :title => :other_fields, :parent => @asset_collection
|
= render 'admin/custom_fields/custom_form', :form => f, :title => :other_fields, :parent => @asset_collection
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
= form.inputs :name => title || :attributes do
|
= form.inputs :name => title || :attributes do
|
||||||
- form.object.custom_fields.each do |field|
|
- form.object.custom_fields.each do |field|
|
||||||
- required = highlighted_field_name == field._name
|
- required = highlighted_field_name == field._name || field.required
|
||||||
|
|
||||||
- if field.string?
|
- if field.string?
|
||||||
= form.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
|
= form.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
|
||||||
|
@ -7,4 +7,9 @@
|
|||||||
= g.inputs :name => :attributes do
|
= g.inputs :name => :attributes do
|
||||||
= g.input :_alias
|
= g.input :_alias
|
||||||
= g.input :hint
|
= g.input :hint
|
||||||
= g.input :text_formatting, :as => 'select', :collection => options_for_text_formatting, :include_blank => false
|
= g.input :text_formatting, :as => 'select', :collection => options_for_text_formatting, :include_blank => false, :wrapper_html => { :style => 'display: none' }
|
||||||
|
|
||||||
|
.popup-actions
|
||||||
|
%p
|
||||||
|
%button.button.light{ :type => 'submit' }
|
||||||
|
%span= t('admin.shared.form_actions.update')
|
@ -1,61 +1,48 @@
|
|||||||
- collection_name = "#{collection_name.singularize}_custom_fields"
|
- collection_name = "#{collection_name.singularize}_custom_fields"
|
||||||
- custom_fields = form.object.send(collection_name.to_sym)
|
- custom_fields = form.object.send(collection_name.to_sym)
|
||||||
- ordered_custom_fields = form.object.send(:"ordered_#{collection_name}")
|
- ordered_custom_fields = form.object.send(:"ordered_#{collection_name}")
|
||||||
|
- field_klass = "#{form.object.class.name}#{collection_name.classify}".gsub(/CustomField$/, 'Field').constantize
|
||||||
|
|
||||||
= form.foldable_inputs :name => :custom_fields, :class => 'editable-list fields' do
|
= form.foldable_inputs :name => :custom_fields, :class => 'editable-list fields' do
|
||||||
- ordered_custom_fields.each do |field|
|
|
||||||
= form.fields_for collection_name.to_sym, field, :child_index => field._index do |g|
|
|
||||||
%li{ :class => "item added #{'new' if form.object.new_record?} #{'error' unless field.errors.empty?}"}
|
|
||||||
%span.handle
|
|
||||||
= image_tag 'admin/form/icons/drag.png'
|
|
||||||
|
|
||||||
= g.hidden_field :position, :class => 'position'
|
%script{ :type => 'text/x-mustache-template', :name => 'template', :'data-base-input-name' => "#{form.object.class.name.underscore}[#{collection_name}_attributes]" }
|
||||||
|
%li{ :class => "item {{behaviour_flag}} {{new_record_flag}} {{errors_flag}} {{required_flag}}" }
|
||||||
= g.hidden_field :_alias, :class => 'alias'
|
|
||||||
|
|
||||||
= g.hidden_field :hint, :class => 'hint'
|
|
||||||
|
|
||||||
= g.hidden_field :text_formatting, :class => 'text-formatting'
|
|
||||||
|
|
||||||
= g.text_field :label, :class => 'label'
|
|
||||||
|
|
||||||
—
|
|
||||||
|
|
||||||
%em= t("admin.custom_fields.kind.#{field.kind.downcase}")
|
|
||||||
|
|
||||||
= g.select :kind, options_for_field_kind
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%span.actions
|
|
||||||
= link_to image_tag('admin/form/pen.png'), '#edit-custom-field', :class => 'edit first'
|
|
||||||
= link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
|
||||||
|
|
||||||
= form.fields_for collection_name.to_sym, custom_fields.build(:label => 'field name', :_alias => ''), :child_index => '-1' do |g|
|
|
||||||
%li{ :class => 'item template' }
|
|
||||||
%span.handle
|
%span.handle
|
||||||
= image_tag 'admin/form/icons/drag.png'
|
= image_tag 'admin/form/icons/drag.png'
|
||||||
|
|
||||||
= g.hidden_field :position, :class => 'position'
|
{{#if_existing_record}}
|
||||||
|
%input{ :name => '{{base_name}}[id]', :value => '{{{id}}}', :type => 'hidden', :'data-field' => 'id' }
|
||||||
|
%input{ :name => '{{base_name}}[_destroy]', :value => '0', :type => 'hidden', :'data-field' => '_destroy' }
|
||||||
|
{{/if_existing_record}}
|
||||||
|
|
||||||
= g.hidden_field :_alias, :class => 'alias'
|
%input{ :name => '{{base_name}}[position]', :value => '{{{position}}}', :type => 'hidden', :'data-field' => 'position' }
|
||||||
|
|
||||||
= g.hidden_field :hint, :class => 'hint'
|
%input{ :name => '{{base_name}}[_alias]', :value => '{{{_alias}}}', :type => 'hidden', :'data-field' => '_alias' }
|
||||||
|
|
||||||
= g.hidden_field :text_formatting, :class => 'text-formatting'
|
%input{ :name => '{{base_name}}[hint]', :value => '{{{hint}}}', :type => 'hidden', :'data-field' => 'hint' }
|
||||||
|
|
||||||
= g.text_field :label, :class => 'string label void'
|
%input{ :name => '{{base_name}}[text_formatting]', :value => '{{{text_formatting}}}', :type => 'hidden', :'data-field' => 'text_formatting' }
|
||||||
|
|
||||||
|
%input{ :name => '{{base_name}}[label]', :value => '{{{label}}}', :type => 'text', :'data-field' => 'label' }
|
||||||
|
|
||||||
—
|
—
|
||||||
|
|
||||||
%em
|
%em {{kind_name}}
|
||||||
|
|
||||||
= g.select :kind, options_for_field_kind
|
= select_tag '{{base_name}}[kind]', options_for_select(options_for_field_kind), :'data-field' => 'kind'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%input{ :name => '{{base_name}}[required]', :value => '0', :type => 'hidden', :'data-field' => 'hidden_required' }
|
||||||
|
%input{ :name => '{{base_name}}[required]', :'{{required_checked}}' => '{{required_checked}}', :value => '1', :type => 'checkbox', :'data-field' => 'required', :id => '{{base_dom_id}}_required' }
|
||||||
|
|
||||||
|
%label{ :for => "{{{base_dom_id}}}_required" }= t('.is_required')
|
||||||
|
|
||||||
%span.actions
|
%span.actions
|
||||||
= link_to image_tag('admin/form/pen.png'), '#edit-custom-field', :class => 'edit first'
|
= link_to image_tag('admin/form/pen.png'), '#edit-custom-field', :class => 'edit first'
|
||||||
= link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
= link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove', :confirm => t('admin.messages.confirm')
|
||||||
%button{ :class => 'button light add', :type => 'button' }
|
%button{ :class => 'button light add', :type => 'button' }
|
||||||
%span!= t('admin.buttons.new_item')
|
%span!= t('admin.buttons.new_item')
|
||||||
|
|
||||||
|
%script{ :type => 'text/javascript', :name => 'data' }
|
||||||
|
!= collection_to_js(ordered_custom_fields, :template => field_klass.new(:label => t('.default_label'), :_alias => '', :kind => 'string').to_hash)
|
||||||
|
@ -18,10 +18,8 @@
|
|||||||
|
|
||||||
= f.foldable_inputs :name => :credentials do
|
= f.foldable_inputs :name => :credentials do
|
||||||
= f.input :email
|
= f.input :email
|
||||||
= f.custom_input :password, :label => :new_password do
|
= f.input :password, :input_html => { :autocomplete => "off" }
|
||||||
= f.password_field :password, :autocomplete => "off"
|
= f.input :password_confirmation, :input_html => { :autocomplete => "off" }
|
||||||
= f.custom_input :password_confirmation, :label => :new_password_confirmation do
|
|
||||||
= f.password_field :password_confirmation, :autocomplete => "off"
|
|
||||||
|
|
||||||
= f.foldable_inputs :name => :sites, :class => 'sites off' do
|
= f.foldable_inputs :name => :sites, :class => 'sites off' do
|
||||||
- @account.sites.each do |site|
|
- @account.sites.each do |site|
|
||||||
|
@ -10,9 +10,12 @@
|
|||||||
= f.input :parent_id, :as => :select, :collection => parent_pages_options, :include_blank => false
|
= f.input :parent_id, :as => :select, :collection => parent_pages_options, :include_blank => false
|
||||||
|
|
||||||
= f.input :slug, :required => false, :hint => @page.slug.blank? ? ' ' : @page.url, :input_html => { :data_url => get_path_admin_pages_url, :disabled => @page.index? || @page.not_found? }, :wrapper_html => { :style => "#{'display: none' if @page.templatized?}; height: 50px" }
|
= f.input :slug, :required => false, :hint => @page.slug.blank? ? ' ' : @page.url, :input_html => { :data_url => get_path_admin_pages_url, :disabled => @page.index? || @page.not_found? }, :wrapper_html => { :style => "#{'display: none' if @page.templatized?}; height: 50px" }
|
||||||
|
|
||||||
|
|
||||||
|
= f.foldable_inputs :name => :advanced_options do
|
||||||
|
|
||||||
= f.input :content_type_id, :as => :select, :collection => current_site.content_types.all.to_a, :include_blank => false, :wrapper_html => { :style => "#{'display: none' unless @page.templatized?}; height: 50px" }
|
= f.input :content_type_id, :as => :select, :collection => current_site.content_types.all.to_a, :include_blank => false, :wrapper_html => { :style => "#{'display: none' unless @page.templatized?}; height: 50px" }
|
||||||
|
|
||||||
= f.custom_input :templatized, :css => 'toggle', :style => "#{'display: none' if @page.redirect?}" do
|
= f.custom_input :templatized, :css => 'toggle', :style => "#{'display: none' if @page.redirect?}" do
|
||||||
= f.check_box :templatized
|
= f.check_box :templatized
|
||||||
|
|
||||||
@ -21,7 +24,7 @@
|
|||||||
|
|
||||||
= f.custom_input :listed, :css => 'toggle' do
|
= f.custom_input :listed, :css => 'toggle' do
|
||||||
= f.check_box :listed
|
= f.check_box :listed
|
||||||
|
|
||||||
= f.custom_input :redirect, :css => 'toggle', :style => "#{'display: none' if @page.templatized?}" do
|
= f.custom_input :redirect, :css => 'toggle', :style => "#{'display: none' if @page.templatized?}" do
|
||||||
= f.check_box :redirect
|
= f.check_box :redirect
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
- else
|
- else
|
||||||
= link_to current_site.name, admin_pages_url, :class => 'single'
|
= link_to current_site.name, admin_pages_url, :class => 'single'
|
||||||
|
|
||||||
|
|
||||||
#global-actions-bar
|
#global-actions-bar
|
||||||
!= t('.welcome', :name => link_to(current_admin.name, edit_admin_my_account_url))
|
!= t('.welcome', :name => link_to(current_admin.name, edit_admin_my_account_url))
|
||||||
%span= '|'
|
%span= '|'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%ul
|
%ul
|
||||||
- @asset_collections.each do |c|
|
- @asset_collections.each do |c|
|
||||||
%li{ :class => "#{'on' if @asset_collection.id == c.id}" }
|
%li
|
||||||
= link_to content_tag(:span, truncate(c.name, :length => 20)), edit_admin_asset_collection_url(c)
|
= link_to content_tag(:span, truncate(c.name, :length => 20)), edit_admin_asset_collection_url(c), :class => "#{'on' if @asset_collection.id == c.id}"
|
||||||
|
|
||||||
.action
|
.action
|
||||||
= link_to content_tag(:span, t('admin.asset_collections.index.new')), new_admin_asset_collection_url
|
= link_to content_tag(:span, t('admin.asset_collections.index.new')), new_admin_asset_collection_url
|
@ -10,7 +10,7 @@
|
|||||||
= link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
|
= link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
|
||||||
%span= time_ago_in_words(page.updated_at)
|
%span= time_ago_in_words(page.updated_at)
|
||||||
|
|
||||||
- current_site.content_types.each do |content_type|
|
- current_site.content_types.to_a.each do |content_type|
|
||||||
- next if content_type.new_record?
|
- next if content_type.new_record?
|
||||||
- item_on = (content_type.slug == @content_type.slug) rescue nil
|
- item_on = (content_type.slug == @content_type.slug) rescue nil
|
||||||
= admin_submenu_item content_type.name, admin_contents_url(content_type.slug), :i18n => false, :css => (item_on ? 'on' : '') do
|
= admin_submenu_item content_type.name, admin_contents_url(content_type.slug), :i18n => false, :css => (item_on ? 'on' : '') do
|
||||||
@ -25,4 +25,4 @@
|
|||||||
%span= time_ago_in_words(content.updated_at)
|
%span= time_ago_in_words(content.updated_at)
|
||||||
|
|
||||||
.action
|
.action
|
||||||
= link_to content_tag(:span, t('admin.content_types.index.new')), new_admin_content_type_url
|
= link_to content_tag(:em) + content_tag(:span, t('admin.content_types.index.new')), new_admin_content_type_url
|
@ -19,12 +19,13 @@ javascripts:
|
|||||||
- public/javascripts/admin/plugins/growl.js
|
- public/javascripts/admin/plugins/growl.js
|
||||||
- public/javascripts/admin/plugins/cookie.js
|
- public/javascripts/admin/plugins/cookie.js
|
||||||
- public/javascripts/admin/plugins/selectmenu.js
|
- public/javascripts/admin/plugins/selectmenu.js
|
||||||
- public/javascripts/admin/locales/datepicker_de.js
|
- public/javascripts/admin/locales/datepicker_de.js
|
||||||
- public/javascripts/admin/locales/datepicker_fr.js
|
- public/javascripts/admin/locales/datepicker_fr.js
|
||||||
- public/javascripts/admin/locales/datepicker_pt-BR.js
|
- public/javascripts/admin/locales/datepicker_pt-BR.js
|
||||||
- public/javascripts/admin/application.js
|
- public/javascripts/admin/application.js
|
||||||
custom_fields:
|
custom_fields:
|
||||||
- public/javascripts/admin/plugins/fancybox.js
|
- public/javascripts/admin/plugins/fancybox.js
|
||||||
|
- public/javascripts/admin/plugins/mustache.js
|
||||||
- public/javascripts/admin/custom_fields.js
|
- public/javascripts/admin/custom_fields.js
|
||||||
edit_custom_fields:
|
edit_custom_fields:
|
||||||
- public/javascripts/admin/plugins/tiny_mce/tinymce.js
|
- public/javascripts/admin/plugins/tiny_mce/tinymce.js
|
||||||
@ -33,6 +34,7 @@ javascripts:
|
|||||||
- public/javascripts/admin/custom_fields/category.js
|
- public/javascripts/admin/custom_fields/category.js
|
||||||
asset_collections:
|
asset_collections:
|
||||||
- public/javascripts/admin/plugins/fancybox.js
|
- public/javascripts/admin/plugins/fancybox.js
|
||||||
|
- public/javascripts/admin/plugins/mustache.js
|
||||||
- public/javascripts/admin/custom_fields.js
|
- public/javascripts/admin/custom_fields.js
|
||||||
- public/javascripts/admin/asset_collections.js
|
- public/javascripts/admin/asset_collections.js
|
||||||
assets:
|
assets:
|
||||||
|
@ -51,13 +51,6 @@ de:
|
|||||||
custom_fields:
|
custom_fields:
|
||||||
edit:
|
edit:
|
||||||
title: Benutzerdefinierte Felder bearbeiten
|
title: Benutzerdefinierte Felder bearbeiten
|
||||||
kind:
|
|
||||||
string: Einfache Texteingabe
|
|
||||||
text: Text
|
|
||||||
category: Auswahlbox
|
|
||||||
boolean: Checkbox
|
|
||||||
date: Datum
|
|
||||||
file: Datei
|
|
||||||
text_formatting:
|
text_formatting:
|
||||||
none: Keine
|
none: Keine
|
||||||
html: HTML
|
html: HTML
|
||||||
|
@ -51,13 +51,6 @@ en:
|
|||||||
custom_fields:
|
custom_fields:
|
||||||
edit:
|
edit:
|
||||||
title: Editing custom field
|
title: Editing custom field
|
||||||
kind:
|
|
||||||
string: Simple Input
|
|
||||||
text: Text
|
|
||||||
category: Select
|
|
||||||
boolean: Checkbox
|
|
||||||
date: Date
|
|
||||||
file: File
|
|
||||||
text_formatting:
|
text_formatting:
|
||||||
none: None
|
none: None
|
||||||
html: HTML
|
html: HTML
|
||||||
@ -70,6 +63,9 @@ en:
|
|||||||
custom_form:
|
custom_form:
|
||||||
edit_categories: Edit options
|
edit_categories: Edit options
|
||||||
delete_file: Delete file
|
delete_file: Delete file
|
||||||
|
index:
|
||||||
|
is_required: is required
|
||||||
|
default_label: Field name
|
||||||
|
|
||||||
sessions:
|
sessions:
|
||||||
new:
|
new:
|
||||||
|
@ -51,13 +51,6 @@ fr:
|
|||||||
custom_fields:
|
custom_fields:
|
||||||
edit:
|
edit:
|
||||||
title: Editer champ personnalisé
|
title: Editer champ personnalisé
|
||||||
kind:
|
|
||||||
string: Texte
|
|
||||||
text: Zone de texte
|
|
||||||
category: Liste déroulante
|
|
||||||
boolean: Case à cocher
|
|
||||||
date: Date
|
|
||||||
file: Fichier
|
|
||||||
text_formatting:
|
text_formatting:
|
||||||
none: Aucun
|
none: Aucun
|
||||||
html: HTML
|
html: HTML
|
||||||
@ -70,6 +63,9 @@ fr:
|
|||||||
custom_form:
|
custom_form:
|
||||||
edit_categories: Editer options
|
edit_categories: Editer options
|
||||||
delete_file: Supprimer fichier
|
delete_file: Supprimer fichier
|
||||||
|
index:
|
||||||
|
is_required: est obligatoire
|
||||||
|
default_label: Nom du champ
|
||||||
|
|
||||||
sessions:
|
sessions:
|
||||||
new:
|
new:
|
||||||
|
@ -51,13 +51,6 @@ pt-BR:
|
|||||||
custom_fields:
|
custom_fields:
|
||||||
edit:
|
edit:
|
||||||
title: Editando campo customizado
|
title: Editando campo customizado
|
||||||
kind:
|
|
||||||
string: Texto Simples
|
|
||||||
text: Texto
|
|
||||||
category: Caixa de Seleção
|
|
||||||
boolean: Checkbox
|
|
||||||
date: Data
|
|
||||||
file: Arquivo
|
|
||||||
text_formatting:
|
text_formatting:
|
||||||
none: Nenhum
|
none: Nenhum
|
||||||
html: HTML
|
html: HTML
|
||||||
|
@ -46,9 +46,9 @@ de:
|
|||||||
title: "Seite nicht gefunden"
|
title: "Seite nicht gefunden"
|
||||||
body: "Inhalt der 404 Seite"
|
body: "Inhalt der 404 Seite"
|
||||||
other:
|
other:
|
||||||
body: "Inhalte kommen hier rein"
|
body: "{% extends 'parent' %}"
|
||||||
|
|
||||||
activemodel:
|
mongoid:
|
||||||
attributes:
|
attributes:
|
||||||
page:
|
page:
|
||||||
title: Titel
|
title: Titel
|
||||||
@ -75,8 +75,8 @@ de:
|
|||||||
email: Email
|
email: Email
|
||||||
name: Name
|
name: Name
|
||||||
language: Sprache
|
language: Sprache
|
||||||
new_password: "Neues Passwort"
|
password: Passwort
|
||||||
new_password_confirmation: "Bestätigung des neuen Passworts"
|
password_confirmation: Bestätigung des Passworts
|
||||||
snippet:
|
snippet:
|
||||||
body: Code
|
body: Code
|
||||||
slug: Slug
|
slug: Slug
|
||||||
@ -166,7 +166,7 @@ de:
|
|||||||
day: "Tag"
|
day: "Tag"
|
||||||
month: "Monat"
|
month: "Monat"
|
||||||
year: "Jahr"
|
year: "Jahr"
|
||||||
|
|
||||||
number:
|
number:
|
||||||
format:
|
format:
|
||||||
precision: 2
|
precision: 2
|
||||||
|
@ -25,7 +25,7 @@ en:
|
|||||||
title: "Page not found"
|
title: "Page not found"
|
||||||
body: "Content of the 404 page"
|
body: "Content of the 404 page"
|
||||||
other:
|
other:
|
||||||
body: "Content goes here"
|
body: "{% extends 'parent' %}"
|
||||||
|
|
||||||
pagination:
|
pagination:
|
||||||
previous: "« Previous"
|
previous: "« Previous"
|
||||||
|
@ -46,16 +46,20 @@ fr:
|
|||||||
title: "Page non trouvée"
|
title: "Page non trouvée"
|
||||||
body: "Contenu de la page d'erreur 404"
|
body: "Contenu de la page d'erreur 404"
|
||||||
other:
|
other:
|
||||||
body: "Le contenu va ici"
|
body: "{% extends 'parent' %}"
|
||||||
|
|
||||||
activemodel:
|
mongoid:
|
||||||
attributes:
|
attributes:
|
||||||
page:
|
page:
|
||||||
title: Titre
|
title: Titre
|
||||||
parent: Parent
|
parent: Dossier parent
|
||||||
|
parent_id: Dossier parent
|
||||||
slug: Raccourci
|
slug: Raccourci
|
||||||
|
listed: Menu
|
||||||
templatized: Templatisée
|
templatized: Templatisée
|
||||||
published: Publiée
|
published: Publiée
|
||||||
|
redirect: Redirection
|
||||||
|
redirect_url: Url de redirection
|
||||||
cache_strategy: Cache
|
cache_strategy: Cache
|
||||||
content_type:
|
content_type:
|
||||||
name: Nom
|
name: Nom
|
||||||
@ -72,11 +76,11 @@ fr:
|
|||||||
name: Nom
|
name: Nom
|
||||||
source: Fichier
|
source: Fichier
|
||||||
account:
|
account:
|
||||||
email: Email
|
email: E-mail
|
||||||
name: Nom
|
name: Nom
|
||||||
language: Langue
|
language: Langue
|
||||||
new_password: "Nouveau mot de passe"
|
password: Mot de passe
|
||||||
new_password_confirmation: "Confirmation nouveau mot de passe"
|
password_confirmation: Confirmation mot de passe
|
||||||
snippet:
|
snippet:
|
||||||
body: Code
|
body: Code
|
||||||
slug: Raccourci
|
slug: Raccourci
|
||||||
@ -90,6 +94,12 @@ fr:
|
|||||||
restricted_access: Activer ?
|
restricted_access: Activer ?
|
||||||
access_login: Identifiant
|
access_login: Identifiant
|
||||||
access_password: "Mot de passe"
|
access_password: "Mot de passe"
|
||||||
|
custom_fields:
|
||||||
|
field:
|
||||||
|
_alias: Alias
|
||||||
|
hint: Aide
|
||||||
|
required: Requis ?
|
||||||
|
text_formatting: Formattage
|
||||||
|
|
||||||
pagination:
|
pagination:
|
||||||
previous: "« Précédent"
|
previous: "« Précédent"
|
||||||
|
@ -2,7 +2,7 @@ pt-BR:
|
|||||||
errors:
|
errors:
|
||||||
# The default format use in full error messages.
|
# The default format use in full error messages.
|
||||||
format: "%{attribute} %{message}"
|
format: "%{attribute} %{message}"
|
||||||
|
|
||||||
messages:
|
messages:
|
||||||
inclusion: "não está incluído na lista"
|
inclusion: "não está incluído na lista"
|
||||||
exclusion: "não está disponível"
|
exclusion: "não está disponível"
|
||||||
@ -23,7 +23,7 @@ pt-BR:
|
|||||||
less_than_or_equal_to: "deve ser menor ou igual a %{count}"
|
less_than_or_equal_to: "deve ser menor ou igual a %{count}"
|
||||||
odd: "deve ser ímpar"
|
odd: "deve ser ímpar"
|
||||||
even: "deve ser par"
|
even: "deve ser par"
|
||||||
|
|
||||||
domain_taken: "%{value} já está em uso."
|
domain_taken: "%{value} já está em uso."
|
||||||
invalid_domain: "%{value} é inválido."
|
invalid_domain: "%{value} é inválido."
|
||||||
needs_admin_account: "Uma conta de administrador é necessário pelo menos."
|
needs_admin_account: "Uma conta de administrador é necessário pelo menos."
|
||||||
@ -33,8 +33,8 @@ pt-BR:
|
|||||||
liquid_syntax: "Erro de sintaxe do Liquid, por favor verifique a sintaxe"
|
liquid_syntax: "Erro de sintaxe do Liquid, por favor verifique a sintaxe"
|
||||||
liquid_extend: "A página extende um template que não existe."
|
liquid_extend: "A página extende um template que não existe."
|
||||||
invalid_theme_file: "não pode ser vazio ou não é um arquivo zip"
|
invalid_theme_file: "não pode ser vazio ou não é um arquivo zip"
|
||||||
|
|
||||||
|
|
||||||
date:
|
date:
|
||||||
formats:
|
formats:
|
||||||
default: "%d/%m/%Y"
|
default: "%d/%m/%Y"
|
||||||
@ -50,9 +50,9 @@ pt-BR:
|
|||||||
title: "Página não encontrada"
|
title: "Página não encontrada"
|
||||||
body: "Conteúdo da página de erro 404"
|
body: "Conteúdo da página de erro 404"
|
||||||
other:
|
other:
|
||||||
body: "Conteúdo vai aqui"
|
body: "{% extends 'parent' %}"
|
||||||
|
|
||||||
activemodel:
|
mongoid:
|
||||||
attributes:
|
attributes:
|
||||||
page:
|
page:
|
||||||
title: Título
|
title: Título
|
||||||
@ -79,8 +79,8 @@ pt-BR:
|
|||||||
email: Email
|
email: Email
|
||||||
name: Nome
|
name: Nome
|
||||||
language: Lingugaem
|
language: Lingugaem
|
||||||
new_password: "Nova senha"
|
password: Senha
|
||||||
new_password_confirmation: "Confirmação da nova senha"
|
password_confirmation: Confirmação da senha
|
||||||
snippet:
|
snippet:
|
||||||
body: Código
|
body: Código
|
||||||
slug: slug
|
slug: slug
|
||||||
@ -94,7 +94,7 @@ pt-BR:
|
|||||||
restricted_access: Restrito ?
|
restricted_access: Restrito ?
|
||||||
access_login: Login
|
access_login: Login
|
||||||
access_password: "senha"
|
access_password: "senha"
|
||||||
|
|
||||||
pagination:
|
pagination:
|
||||||
previous: "« Anterior"
|
previous: "« Anterior"
|
||||||
next: "Próximo »"
|
next: "Próximo »"
|
||||||
@ -106,15 +106,15 @@ pt-BR:
|
|||||||
long: "%e %B %Y"
|
long: "%e %B %Y"
|
||||||
long_ordinal: "%e %B %Y"
|
long_ordinal: "%e %B %Y"
|
||||||
only_day: "%e"
|
only_day: "%e"
|
||||||
|
|
||||||
day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
|
day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
|
||||||
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
|
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
|
||||||
|
|
||||||
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
||||||
abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
||||||
order: [ :day, :month, :year ]
|
order: [ :day, :month, :year ]
|
||||||
|
|
||||||
|
|
||||||
time:
|
time:
|
||||||
formats:
|
formats:
|
||||||
default: "%d %B %Y %H:%M"
|
default: "%d %B %Y %H:%M"
|
||||||
@ -125,54 +125,54 @@ pt-BR:
|
|||||||
only_second: "%S"
|
only_second: "%S"
|
||||||
am: 'am'
|
am: 'am'
|
||||||
pm: 'pm'
|
pm: 'pm'
|
||||||
|
|
||||||
datetime:
|
datetime:
|
||||||
distance_in_words:
|
distance_in_words:
|
||||||
half_a_minute: 'meio minuto'
|
half_a_minute: 'meio minuto'
|
||||||
less_than_x_seconds:
|
less_than_x_seconds:
|
||||||
one: 'menos de 1 segundo'
|
one: 'menos de 1 segundo'
|
||||||
other: 'menos de %{count} segundos'
|
other: 'menos de %{count} segundos'
|
||||||
|
|
||||||
x_seconds:
|
x_seconds:
|
||||||
one: '1 segundo'
|
one: '1 segundo'
|
||||||
other: '%{count} segundos'
|
other: '%{count} segundos'
|
||||||
|
|
||||||
less_than_x_minutes:
|
less_than_x_minutes:
|
||||||
one: 'menos de um minuto'
|
one: 'menos de um minuto'
|
||||||
other: 'menos de %{count} minutos'
|
other: 'menos de %{count} minutos'
|
||||||
|
|
||||||
x_minutes:
|
x_minutes:
|
||||||
one: '1 minuto'
|
one: '1 minuto'
|
||||||
other: '%{count} minutos'
|
other: '%{count} minutos'
|
||||||
|
|
||||||
about_x_hours:
|
about_x_hours:
|
||||||
one: 'aproximadamente 1 hora'
|
one: 'aproximadamente 1 hora'
|
||||||
other: 'aproximadamente %{count} horas'
|
other: 'aproximadamente %{count} horas'
|
||||||
|
|
||||||
x_days:
|
x_days:
|
||||||
one: '1 dia'
|
one: '1 dia'
|
||||||
other: '%{count} dias'
|
other: '%{count} dias'
|
||||||
|
|
||||||
about_x_months:
|
about_x_months:
|
||||||
one: 'aproximadamente 1 mês'
|
one: 'aproximadamente 1 mês'
|
||||||
other: 'aproximadamente %{count} meses'
|
other: 'aproximadamente %{count} meses'
|
||||||
|
|
||||||
x_months:
|
x_months:
|
||||||
one: '1 mês'
|
one: '1 mês'
|
||||||
other: '%{count} meses'
|
other: '%{count} meses'
|
||||||
|
|
||||||
about_x_years:
|
about_x_years:
|
||||||
one: 'aproximadamente 1 ano'
|
one: 'aproximadamente 1 ano'
|
||||||
other: 'aproximadamente %{count} anos'
|
other: 'aproximadamente %{count} anos'
|
||||||
|
|
||||||
over_x_years:
|
over_x_years:
|
||||||
one: 'mais de 1 ano'
|
one: 'mais de 1 ano'
|
||||||
other: 'mais de %{count} anos'
|
other: 'mais de %{count} anos'
|
||||||
|
|
||||||
almost_x_years:
|
almost_x_years:
|
||||||
one: 'quase 1 ano'
|
one: 'quase 1 ano'
|
||||||
other: 'quase %{count} anos'
|
other: 'quase %{count} anos'
|
||||||
|
|
||||||
prompts:
|
prompts:
|
||||||
year: "Ano"
|
year: "Ano"
|
||||||
month: "Mês"
|
month: "Mês"
|
||||||
@ -180,8 +180,8 @@ pt-BR:
|
|||||||
hour: "Hora"
|
hour: "Hora"
|
||||||
minute: "Minuto"
|
minute: "Minuto"
|
||||||
second: "Segundos"
|
second: "Segundos"
|
||||||
|
|
||||||
|
|
||||||
number:
|
number:
|
||||||
format:
|
format:
|
||||||
precision: 3
|
precision: 3
|
||||||
@ -203,7 +203,7 @@ pt-BR:
|
|||||||
mb: 'Mb'
|
mb: 'Mb'
|
||||||
gb: 'Gb'
|
gb: 'Gb'
|
||||||
tb: 'Tb'
|
tb: 'Tb'
|
||||||
|
|
||||||
support:
|
support:
|
||||||
array:
|
array:
|
||||||
sentence_connector: ' e '
|
sentence_connector: ' e '
|
||||||
@ -211,4 +211,3 @@ pt-BR:
|
|||||||
words_connector: ", "
|
words_connector: ", "
|
||||||
two_words_connector: " e "
|
two_words_connector: " e "
|
||||||
last_word_connector: " e "
|
last_word_connector: " e "
|
||||||
|
|
@ -37,6 +37,10 @@ de:
|
|||||||
reset: Webseite zurücksetzen
|
reset: Webseite zurücksetzen
|
||||||
content_type:
|
content_type:
|
||||||
api_accounts: Benachrichtigte Accounts
|
api_accounts: Benachrichtigte Accounts
|
||||||
|
account:
|
||||||
|
edit:
|
||||||
|
password: "Neues Passwort"
|
||||||
|
password_confirmation: "Bestätigung des neuen Passworts"
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
|
@ -2,6 +2,7 @@ en:
|
|||||||
formtastic:
|
formtastic:
|
||||||
titles:
|
titles:
|
||||||
information: General information
|
information: General information
|
||||||
|
advanced_options: Advanced options
|
||||||
meta: SEO Metadata
|
meta: SEO Metadata
|
||||||
code: Code
|
code: Code
|
||||||
raw_template: Template
|
raw_template: Template
|
||||||
@ -37,6 +38,10 @@ en:
|
|||||||
reset: Reset site
|
reset: Reset site
|
||||||
content_type:
|
content_type:
|
||||||
api_accounts: Notified Accounts
|
api_accounts: Notified Accounts
|
||||||
|
account:
|
||||||
|
edit:
|
||||||
|
password: New password
|
||||||
|
password_confirmation: New password confirmation
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
@ -55,6 +60,11 @@ en:
|
|||||||
slug: "You do not need to add the extension file (.css or .js)"
|
slug: "You do not need to add the extension file (.css or .js)"
|
||||||
edit:
|
edit:
|
||||||
source: "You can replace it by a file of the same extension"
|
source: "You can replace it by a file of the same extension"
|
||||||
|
asset:
|
||||||
|
new:
|
||||||
|
source: "All file types are accepted."
|
||||||
|
edit:
|
||||||
|
source: "The current file is available here %{url}"
|
||||||
custom_fields:
|
custom_fields:
|
||||||
field:
|
field:
|
||||||
_alias: "Property available in liquid templates"
|
_alias: "Property available in liquid templates"
|
||||||
|
@ -2,6 +2,7 @@ fr:
|
|||||||
formtastic:
|
formtastic:
|
||||||
titles:
|
titles:
|
||||||
information: Informations générales
|
information: Informations générales
|
||||||
|
advanced_options: Options avancées
|
||||||
meta: SEO Metadata
|
meta: SEO Metadata
|
||||||
code: Code
|
code: Code
|
||||||
raw_template: Gabarit
|
raw_template: Gabarit
|
||||||
@ -40,6 +41,10 @@ fr:
|
|||||||
reset: Remettre à zéro
|
reset: Remettre à zéro
|
||||||
content_type:
|
content_type:
|
||||||
api_accounts: Comptes à notifier
|
api_accounts: Comptes à notifier
|
||||||
|
account:
|
||||||
|
edit:
|
||||||
|
password: Nouveau mot de passe
|
||||||
|
password_confirmation: Confirmation nouveau mot de passe
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
@ -58,6 +63,11 @@ fr:
|
|||||||
plain_text_name: "Vous n'avez pas besoin de mettre l'extension du fichier (.css ou .js)"
|
plain_text_name: "Vous n'avez pas besoin de mettre l'extension du fichier (.css ou .js)"
|
||||||
edit:
|
edit:
|
||||||
source: "Vous pouvez le remplacer par un fichier avec la meme extension."
|
source: "Vous pouvez le remplacer par un fichier avec la meme extension."
|
||||||
|
asset:
|
||||||
|
new:
|
||||||
|
source: "Tous les types de fichier sont acceptés."
|
||||||
|
edit:
|
||||||
|
source: "Le fichier actuel est accessible ici %{url}"
|
||||||
custom_fields:
|
custom_fields:
|
||||||
field:
|
field:
|
||||||
_alias: "Champ utilisable dans les templates liquid"
|
_alias: "Champ utilisable dans les templates liquid"
|
||||||
@ -67,5 +77,6 @@ fr:
|
|||||||
samples: "Si activé, les contenus et les média seront aussi copiés lors de l'import"
|
samples: "Si activé, les contenus et les média seront aussi copiés lors de l'import"
|
||||||
reset: "Si activé, toutes les données de votre site seront détruites avant l'import du nouveau site"
|
reset: "Si activé, toutes les données de votre site seront détruites avant l'import du nouveau site"
|
||||||
content_type:
|
content_type:
|
||||||
|
slug: Nom utilisé dans les templates liquid afin d'accéder aux enregistrements de ce modèle
|
||||||
api_enabled: "Utilisé pour autoriser la création de nouvelles instances de l'extérieur (ex.: les messages dans un formulaire de contact)"
|
api_enabled: "Utilisé pour autoriser la création de nouvelles instances de l'extérieur (ex.: les messages dans un formulaire de contact)"
|
||||||
api_accounts: "Un email de notification sera envoyé à chaque compte listé ci-dessus lors de la création d'une nouvelle instance"
|
api_accounts: "Un email de notification sera envoyé à chaque compte listé ci-dessus lors de la création d'une nouvelle instance"
|
||||||
|
@ -37,6 +37,10 @@ pt-BR:
|
|||||||
reset: Reiniciar site
|
reset: Reiniciar site
|
||||||
content_type:
|
content_type:
|
||||||
api_accounts: Contas notificadas
|
api_accounts: Contas notificadas
|
||||||
|
account:
|
||||||
|
edit:
|
||||||
|
password: Nova senha
|
||||||
|
password_confirmation: Confirmação da nova senha
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
|
37
doc/TODO
@ -1,27 +1,21 @@
|
|||||||
BOARD:
|
BOARD:
|
||||||
|
|
||||||
x pull requests #31 et #32
|
- pull request #44
|
||||||
|
- integrate new home
|
||||||
|
- editable_elements: inheritable: false (Mattias) => seems to be fixed by Dirk's last pull request (#44)
|
||||||
- duostack version
|
- duostack version
|
||||||
- bugs
|
|
||||||
- editable_elements slug becomes nil
|
|
||||||
- uploading videos http://groups.google.com/group/carrierwave/browse_thread/thread/6e211d98f1ff4bc0/51717c2167695ca2?lnk=gst&q=version#51717c2167695ca2
|
|
||||||
- editable_elements not updated (doesn't use index anymore)
|
|
||||||
- custom_fields not deleted (doesn't use index anymore)
|
|
||||||
- editable_elements: inheritable: false (Mattias)
|
|
||||||
- 2 different sites on the same main domain (one in www, the other one in something else) (Raphael Costa)
|
- 2 different sites on the same main domain (one in www, the other one in something else) (Raphael Costa)
|
||||||
|
- seo section for the page form: seo title, seo keywords, seo description
|
||||||
|
|
||||||
BACKLOG:
|
BACKLOG:
|
||||||
|
|
||||||
|
- custom_fields:
|
||||||
- validation for custom fields
|
- validation: regexp (pre-defined regexps ?)
|
||||||
- new custom field types:
|
- new type: belongs_to => association
|
||||||
- belongs_to => association
|
|
||||||
|
|
||||||
- inline editing (http://www.aloha-editor.com/wiki/index.php/Aloha_PHP_Example)
|
- inline editing (http://www.aloha-editor.com/wiki/index.php/Aloha_PHP_Example)
|
||||||
- html view in the aloha popup
|
- html view in the aloha popup
|
||||||
- editable elements should wrap a tag: div, h1, ...etc (default span)
|
- editable elements should wrap a tag: div, h1, ...etc (default span)
|
||||||
- edit images (upload new ones, ...etc) => wait for aloha or send them an email ?
|
- edit images (upload new ones, ...etc) => wait for aloha or send them an email ?
|
||||||
|
|
||||||
- global regions: keyword in editable element (http://www.mongodb.org/display/DOCS/Updating)
|
- global regions: keyword in editable element (http://www.mongodb.org/display/DOCS/Updating)
|
||||||
- write my first tutorial about locomotive
|
- write my first tutorial about locomotive
|
||||||
- cucumber features for admin pages (in progress)
|
- cucumber features for admin pages (in progress)
|
||||||
@ -33,19 +27,18 @@ REFACTORING:
|
|||||||
|
|
||||||
BUGS:
|
BUGS:
|
||||||
|
|
||||||
- custom fields: accepts_nested_attributes weird behaviour when creating new content type + adding random fields
|
|
||||||
|
|
||||||
NICE TO HAVE:
|
NICE TO HAVE:
|
||||||
- export site
|
- export site
|
||||||
- asset collections: custom resizing if image
|
- asset collections: custom resizing if image
|
||||||
- super_finder
|
- super_finder
|
||||||
- better icons for mime type
|
|
||||||
- traffic statistics
|
- traffic statistics
|
||||||
- asset picker (content instance)
|
- asset picker (content instance)
|
||||||
- page with regexp url ?
|
- page with regexp url ?
|
||||||
- automatic update !
|
- automatic update !
|
||||||
- page not found (front) => if logged in, link to create the page
|
- page not found (front) => if logged in, link to create the page
|
||||||
- switch to list (theme assets / assets ?). delete all in once (with checkbox) or see details (updated_at, size, ...etc)
|
- switch to list (theme assets / assets ?). delete all in once (with checkbox) or see details (updated_at, size, ...etc)
|
||||||
|
- resizing images on the fly
|
||||||
|
- code completion ? http://blog.quplo.com/2010/06/common-sense-code-completion/
|
||||||
|
|
||||||
DONE:
|
DONE:
|
||||||
|
|
||||||
@ -200,4 +193,14 @@ x moving to mongoid 2.0.0 rc.6
|
|||||||
x accepts_nested_attributes (javascript part)
|
x accepts_nested_attributes (javascript part)
|
||||||
x check the theme uploader
|
x check the theme uploader
|
||||||
x release new version of CustomFields, ActsAsTree gems
|
x release new version of CustomFields, ActsAsTree gems
|
||||||
x add metadata to sites
|
x add metadata to sites
|
||||||
|
x pull requests #31 et #32
|
||||||
|
x password / new_password
|
||||||
|
x bugs
|
||||||
|
x custom_fields not deleted (doesn't use index anymore)
|
||||||
|
? editable_elements slug becomes nil
|
||||||
|
x editable_elements not updated (doesn't use index anymore)
|
||||||
|
x uploading videos http://groups.google.com/group/carrierwave/browse_thread/thread/6e211d98f1ff4bc0/51717c2167695ca2?lnk=gst&q=version#51717c2167695ca2
|
||||||
|
x custom fields: accepts_nested_attributes weird behaviour when creating new content type + adding random fields
|
||||||
|
x better icons for mime type (css3)
|
||||||
|
x validation for custom fields: required done
|
@ -56,6 +56,10 @@ module Locomotive
|
|||||||
|
|
||||||
# Devise
|
# Devise
|
||||||
Devise.mailer_sender = self.config.mailer_sender
|
Devise.mailer_sender = self.config.mailer_sender
|
||||||
|
|
||||||
|
# Load all the dynamic classes (custom fields)
|
||||||
|
ContentType.all.collect(&:fetch_content_klass)
|
||||||
|
AssetCollection.all.collect(&:fetch_asset_klass)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.logger(message)
|
def self.logger(message)
|
||||||
|
@ -25,6 +25,8 @@ $:.unshift File.dirname(__FILE__)
|
|||||||
module Locomotive
|
module Locomotive
|
||||||
class Engine < Rails::Engine
|
class Engine < Rails::Engine
|
||||||
|
|
||||||
|
config.autoload_once_paths += %W( #{config.root}/app/controllers #{config.root}/app/models #{config.root}/app/helpers #{config.root}/app/uploaders)
|
||||||
|
|
||||||
rake_tasks do
|
rake_tasks do
|
||||||
load "railties/tasks.rake"
|
load "railties/tasks.rake"
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Locomotive #:nodoc
|
module Locomotive #:nodoc
|
||||||
VERSION = "1.0.0.beta.2"
|
VERSION = "1.0.0.beta.3"
|
||||||
end
|
end
|
||||||
|
@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|||||||
s.required_rubygems_version = ">= 1.3.6"
|
s.required_rubygems_version = ">= 1.3.6"
|
||||||
s.rubyforge_project = "nowarning"
|
s.rubyforge_project = "nowarning"
|
||||||
|
|
||||||
s.add_dependency "rails", ">= 3.0.4"
|
s.add_dependency "rails", ">= 3.0.5"
|
||||||
s.add_dependency "warden"
|
s.add_dependency "warden"
|
||||||
s.add_dependency "devise", "1.1.3"
|
s.add_dependency "devise", "1.1.3"
|
||||||
s.add_dependency "mongoid", "~> 2.0.0.rc.7"
|
s.add_dependency "mongoid", "~> 2.0.0.rc.7"
|
||||||
@ -31,10 +31,10 @@ Gem::Specification.new do |s|
|
|||||||
s.add_dependency "inherited_resources", "~> 1.1.2"
|
s.add_dependency "inherited_resources", "~> 1.1.2"
|
||||||
|
|
||||||
s.add_dependency "rmagick", "2.12.2"
|
s.add_dependency "rmagick", "2.12.2"
|
||||||
s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta2"
|
s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta3"
|
||||||
|
|
||||||
s.add_dependency "custom_fields", "1.0.0.beta.4"
|
s.add_dependency "custom_fields", "1.0.0.beta.5"
|
||||||
s.add_dependency "fog", "0.5.3"
|
s.add_dependency "fog", "0.3.7"
|
||||||
s.add_dependency "mimetype-fu"
|
s.add_dependency "mimetype-fu"
|
||||||
s.add_dependency "actionmailer-with-request"
|
s.add_dependency "actionmailer-with-request"
|
||||||
s.add_dependency "heroku"
|
s.add_dependency "heroku"
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.5 KiB |