forked from refinery/refinerycms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into friendly_id_4
Conflicts: settings/app/models/refinery/setting.rb settings/db/migrate/20100913234710_create_refinerycms_settings_schema.rb
- Loading branch information
Showing
135 changed files
with
834 additions
and
2,624 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 was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
module ::Refinery | ||
module Refinery | ||
class FastController < ActionController::Base | ||
|
||
def wymiframe | ||
render :template => "/refinery/wymiframe", :layout => false | ||
end | ||
|
||
def message | ||
render :partial => '/refinery/message', :layout => false | ||
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,13 +1,17 @@ | ||
<!DOCTYPE html> | ||
<%= render '/refinery/html_tag' %> | ||
<%= render '/refinery/admin/head' %> | ||
<body id='dialog_container' class='dialog <%= I18n.locale %><%= ' wym_iframe_body' if params[:wymeditor].presence %>'> | ||
<div id='tooltip_container'></div> | ||
<div id="flash_container"> | ||
<%= render '/refinery/message' %> | ||
</div> | ||
<div id='content' class='clearfix'> | ||
<%= yield %> | ||
</div> | ||
</body> | ||
<% if @dialog_successful ||= params[:dialog_successful] %> | ||
<%= render '/refinery/admin/dialog_success' %> | ||
<% else %> | ||
<%= render '/refinery/admin/head' %> | ||
<body id='dialog_container' class='dialog <%= I18n.locale %><%= ' wym_iframe_body' if params[:wymeditor].presence %>'> | ||
<div id='tooltip_container'></div> | ||
<div id="flash_container"> | ||
<%= render '/refinery/message' %> | ||
</div> | ||
<div id='content' class='clearfix'> | ||
<%= yield %> | ||
</div> | ||
</body> | ||
<% end %> | ||
</html> |
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,2 @@ | ||
<%= render :partial => '/refinery/message' if request.xhr? %> | ||
<%= yield %> |
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,63 +1,2 @@ | ||
<% | ||
# provide a default array for collecting CSS for sections | ||
css = [] | ||
|
||
# if 'sections' is passed in as a local_assigns, all of this is ignored. | ||
if local_assigns[:sections].blank? | ||
# always have a title | ||
sections = [{:yield => :body_content_title, :fallback => page_title, :title => true}] | ||
|
||
# append sections from this page. | ||
@page.parts.inject(sections) do |s, part| | ||
# we have some default yields, body_content_left and body_content_right | ||
# these map to 'body' and 'side_body' fields in default Refinery. | ||
section = {:fallback => part.body} | ||
section[:yield] = case (title_symbol = part.title.to_s.gsub(/\ /, '').underscore.to_sym) | ||
when :body then :body_content_left | ||
when :side_body then :body_content_right | ||
else title_symbol | ||
end | ||
|
||
# add section to the list unless we were specifically requested not to. | ||
# otherwise, add css saying it's been removed. | ||
unless (local_assigns[:hide_sections]||=[]).include?(section[:yield]) | ||
s << section | ||
else | ||
css << "no_#{section[:yield]}" | ||
end | ||
end unless @page.nil? or @page.parts.blank? | ||
|
||
# Ensure that even without @page.parts we still have body_content_left and body_content_right | ||
all_yields = sections.map{|s| s[:yield]} | ||
sections << {:yield => :body_content_left} unless all_yields.include?(:body_content_left) | ||
sections << {:yield => :body_content_right} unless all_yields.include?(:body_content_right) | ||
end | ||
|
||
# you can add more sections to the list using something like this: | ||
# sections |= [{:yield => :something_else, :fallback => another_method, :id => 'something'}] | ||
|
||
sections.each do |section| | ||
section[:html] = yield(section[:yield]) if section[:yield].present? | ||
|
||
if section[:html].blank? and !local_assigns[:show_empty_sections] and | ||
!local_assigns[:remove_automatic_sections] and section.keys.include?(:fallback) and | ||
section[:fallback].present? | ||
section[:html] = raw(section[:fallback]) | ||
end | ||
|
||
dom_id = section[:id] || section[:yield] | ||
if section[:html].present? | ||
if section[:title] | ||
section[:html] = content_tag(:h1,section[:html], :id => dom_id) | ||
else | ||
section[:html] = content_tag(:section, content_tag(:div, section[:html], :class => 'inner'), :id => dom_id) | ||
end | ||
else | ||
css << "no_#{dom_id}" | ||
end | ||
end | ||
-%> | ||
<section id='body_content'<%= " class='#{css.join(' ')}'" if css.present? %>> | ||
<%= raw sections.map{|section| section[:html]}.join("\n") -%> | ||
</section> | ||
<%= render_content_page(@page, {:hide_sections => local_assigns[:hide_sections], :can_use_fallback => !local_assigns[:show_empty_sections] && !local_assigns[:remove_automatic_sections]}) %> | ||
<%= render :partial => '/refinery/draft_page_message' unless @page.nil? or @page.live? -%> |
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,10 +1,7 @@ | ||
<% flash.each do |key, value| %> | ||
<div id='flash' class="flash flash_<%= key %>" style='visibility: hidden;' > | ||
<%= value %> | ||
<% if key.to_s == "message" %> | ||
<%= link_to t('.close_this_message'), "", {:id => "flash_close"} %> | ||
<% else %> | ||
<%= link_to t('.close'), "", {:id => "flash_close"} %> | ||
<% end %> | ||
<%= link_to t(".close#{'_this_message' if key.to_s == "message"}"), "", | ||
:id => "flash_close" %> | ||
</div> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<head> | ||
<script>parent.refinery_dialog_success();</script> | ||
</head> | ||
<body> | ||
</body> |
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
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
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
2 changes: 1 addition & 1 deletion
2
...ery/engine/templates/app/views/refinery/namespace/admin/plural_name/_plural_name.html.erb
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,2 +1,2 @@ | ||
<%%= will_paginate @<%= plural_name %> %> | ||
<%%= will_paginate @<%= plural_name %> if Refinery::<%= namespacing %>::Admin::<%= class_name.pluralize %>.pageable? %> | ||
<%%= render 'sortable_list' %> |
Oops, something went wrong.