Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa36065
commit 1d88f05
Showing
20 changed files
with
127 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Admin::ReferencesController < ApplicationController | ||
def show | ||
render :action => params[:id] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Admin::ReferencesHelper | ||
def tag_reference | ||
class_name = params[:class_name] || 'Page' | ||
returning String.new do |output| | ||
class_name.constantize.tag_descriptions.sort.each do |tag_name, description| | ||
output << render(:partial => "tag_reference", | ||
:locals => {:tag_name => tag_name, :description => description}) | ||
end | ||
end | ||
end | ||
|
||
def filter_reference | ||
filter_name = params[:filter_name] | ||
unless filter_name.blank? | ||
filter_class = (filter_name.gsub(" ", "") + "Filter").constantize | ||
filter_class.description.blank? ? "There is no documentation on this filter." : filter_class.description | ||
else | ||
"There is no filter on the current page part." | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
- main.edit_form do | ||
- form_for([:admin, @page], :html => {:multipart => true}) do |f| | ||
= f.hidden_field :lock_version | ||
= render_region :form_top | ||
.form-area | ||
- render_region :form do |form| | ||
- form.edit_title do | ||
%p.title | ||
%label{:for=>"page_title"} | ||
Page Title | ||
= f.text_field :title, :class => 'textbox', :maxlength => 255 | ||
- form.edit_extended_metadata do | ||
#extended-metadata.row{meta_visible(:meta)} | ||
%table.fieldset | ||
= render :partial => "meta_row", :collection => @meta, :locals => {:f => f} | ||
= render_region :extended_metadata, :locals => {:f => f} | ||
%p.more-or-less | ||
%small | ||
%a#more-extended-metadata{meta_visible(:meta_more), :href => "#", :onclick=>toggle_javascript_for('extended-metadata')} More | ||
%a#less-extended-metadata{meta_visible(:meta_less), :href => "#", :onclick=>toggle_javascript_for('extended-metadata')} Less | ||
- form.edit_page_parts do | ||
#tab-control | ||
#tabs.tabs | ||
#tab-toolbar | ||
= link_to_function image('plus', :alt => 'plus'), 'toggle_add_part_popup()', :title => 'Add Tab' | ||
= link_to_function image('minus', :alt => 'minus'), 'if(confirm(\'Delete the current tab?\')) { tabControl.removeTab(tabControl.selected) }', :title => 'Remove Tab' | ||
#pages.pages | ||
- @page.parts.each_with_index |part, index| | ||
= render :partial => 'admin/page_parts/page_part', :object => part, :locals => { :index => index } | ||
- render_region :parts_bottom do |parts_bottom| | ||
- parts_bottom.edit_layout_and_type do | ||
.row | ||
%p | ||
%label{:for=>"page_layout_id"} | ||
Layout | ||
= f.select :layout_id, [['<inherit>', '']] + Layout.find(:all).map { |s| [s.name, s.id] } | ||
%p | ||
%label{:for=>"page_class_name"} | ||
Page Type | ||
= f.select :class_name, [['<normal>', 'Page']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } | ||
%p | ||
%label{:for=>"page_status_id"} | ||
Status | ||
= f.select :status_id, Status.find_all.map { |s| [s.name, s.id] }, {} | ||
- if @config['page.edit.published_date?'] | ||
%p#publication-date{:style => "display: none"} | ||
%label{:for=>"page_published_at"} | ||
Published At | ||
= f.datetime_select :published_at, :disabled => true | ||
= render_region :layout_row, :locals => {:f => f} | ||
%span.clear | ||
- parts_bottom.edit_timestamp do | ||
= updated_stamp @page | ||
- render_region :form_bottom do |form_bottom| | ||
- form_bottom.edit_buttons do | ||
- @buttons_partials.each do |partial| | ||
= render :partial => partial, :locals => {:f => f} | ||
%p.buttons | ||
= save_model_button(@page) | ||
= save_model_and_continue_editing_button(@page) | ||
or | ||
= link_to 'Cancel', admin_pages_url | ||
- form_for([:admin, @page], :html => {:multipart => true}) do |f| | ||
= f.hidden_field :lock_version | ||
= f.hidden_field :parent_id | ||
= render_region :form_top | ||
.form-area | ||
- render_region :form do |form| | ||
- form.edit_title do | ||
%p.title | ||
%label{:for=>"page_title"} | ||
Page Title | ||
= f.text_field :title, :class => 'textbox', :maxlength => 255 | ||
- form.edit_extended_metadata do | ||
#extended-metadata.row{meta_visible(:meta)} | ||
%table.fieldset | ||
= render :partial => "meta_row", :collection => @meta, :locals => {:f => f} | ||
= render_region :extended_metadata, :locals => {:f => f} | ||
%p.more-or-less | ||
%small | ||
%a#more-extended-metadata{meta_visible(:meta_more), :href => "#", :onclick=>toggle_javascript_for('extended-metadata')} More | ||
%a#less-extended-metadata{meta_visible(:meta_less), :href => "#", :onclick=>toggle_javascript_for('extended-metadata')} Less | ||
- form.edit_page_parts do | ||
#tab-control | ||
#tabs.tabs | ||
#tab-toolbar | ||
= link_to_function image('plus', :alt => 'plus'), 'toggle_add_part_popup()', :title => 'Add Tab' | ||
= link_to_function image('minus', :alt => 'minus'), 'if(confirm(\'Delete the current tab?\')) { tabControl.removeTab(tabControl.selected) }', :title => 'Remove Tab' | ||
#pages.pages | ||
- @page.parts.each_with_index do |part, index| | ||
= render :partial => 'admin/page_parts/page_part', :object => part, :locals => { :index => index } | ||
- render_region :parts_bottom do |parts_bottom| | ||
- parts_bottom.edit_layout_and_type do | ||
.row | ||
%p | ||
%label{:for=>"page_layout_id"} | ||
Layout | ||
= f.select :layout_id, [['<inherit>', '']] + Layout.find(:all).map { |s| [s.name, s.id] } | ||
%p | ||
%label{:for=>"page_class_name"} | ||
Page Type | ||
= f.select :class_name, [['<normal>', 'Page']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } | ||
%p | ||
%label{:for=>"page_status_id"} | ||
Status | ||
= f.select :status_id, Status.find_all.map { |s| [s.name, s.id] }, {} | ||
- if @config['page.edit.published_date?'] | ||
%p#publication-date{:style => "display: none"} | ||
%label{:for=>"page_published_at"} | ||
Published At | ||
= f.datetime_select :published_at, :disabled => true | ||
= render_region :layout_row, :locals => {:f => f} | ||
%span.clear | ||
- parts_bottom.edit_timestamp do | ||
= updated_stamp @page | ||
- render_region :form_bottom do |form_bottom| | ||
- form_bottom.edit_buttons do | ||
- @buttons_partials.each do |partial| | ||
= render :partial => partial, :locals => {:f => f} | ||
%p.buttons | ||
= save_model_button(@page) | ||
= save_model_and_continue_editing_button(@page) | ||
or | ||
= link_to 'Cancel', admin_pages_url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$('filter-reference').update(<%= filter_reference.to_json %>); | ||
$('filter-type').update(<%= @display_name.to_json %>); | ||
center($('filter-reference-popup')); | ||
window.last_filter = <%= @filter_name.to_json %>; | ||
$('filter-reference-popup').show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$('tag-reference').update(<%= tag_reference.to_json %>); | ||
$('page-type').update(<%= @display_name.to_json %>); | ||
center($('tag-reference-popup')); | ||
window.last_type = <%= @class_name.to_json %>; | ||
$('tag-reference-popup').show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.