diff options
Diffstat (limited to 'app/views/refinery/blog')
18 files changed, 48 insertions, 49 deletions
diff --git a/app/views/refinery/blog/admin/_submenu.html.erb b/app/views/refinery/blog/admin/_submenu.html.erb index d290ce8..e78510e 100644 --- a/app/views/refinery/blog/admin/_submenu.html.erb +++ b/app/views/refinery/blog/admin/_submenu.html.erb @@ -3,7 +3,7 @@ <li class='not_a_link'> <%= render :partial => "/refinery/admin/search", :locals => { - :url => main_app.refinery_blog_admin_posts_path + :url => refinery.blog_admin_posts_path } %> </li> </ul> @@ -14,15 +14,15 @@ :class => 'page_copy_icon' %> </li> <li> - <%= link_to t('.posts.manage'), main_app.refinery_blog_admin_posts_path, + <%= link_to t('.posts.manage'), refinery.blog_admin_posts_path, :class => 'page_icon' %> </li> <li> - <%= link_to t('.posts.uncategorized'), main_app.uncategorized_refinery_blog_admin_posts_path, + <%= link_to t('.posts.uncategorized'), refinery.uncategorized_blog_admin_posts_path, :class => 'page_icon' %> </li> <li> - <%= link_to t('.posts.new'), main_app.new_refinery_blog_admin_post_path, + <%= link_to t('.posts.new'), refinery.new_blog_admin_post_path, :class => 'page_add_icon' %> </li> </ul> @@ -38,15 +38,15 @@ :class => 'comments_icon' %> </li> <li> - <%= link_to t('.comments.new'), main_app.refinery_blog_admin_comments_path, + <%= link_to t('.comments.new'), refinery.blog_admin_comments_path, :class => 'comment_icon' %> </li> <li> - <%= link_to t('.comments.approved'), main_app.approved_refinery_blog_admin_comments_path, + <%= link_to t('.comments.approved'), refinery.approved_blog_admin_comments_path, :class => 'comment_tick_icon' %> </li> <li> - <%= link_to t('.comments.rejected'), main_app.rejected_refinery_blog_admin_comments_path, + <%= link_to t('.comments.rejected'), refinery.rejected_blog_admin_comments_path, :class => 'comment_cross_icon' %> </li> </ul> @@ -58,36 +58,36 @@ :class => 'folder_icon' %> </li> <li> - <%= link_to t('.categories.manage'), main_app.refinery_blog_admin_categories_path, + <%= link_to t('.categories.manage'), refinery.blog_admin_categories_path, :class => 'folder_edit_icon' %> </li> <li> - <%= link_to t('.categories.new'), main_app.new_refinery_blog_admin_category_path(:dialog => true, :height => 325), + <%= link_to t('.categories.new'), refinery.new_blog_admin_category_path(:dialog => true, :height => 325), :class => 'folder_add_icon' %> </li> </ul> <ul class='collapsible_menu'> <li class='not_a_link'> - <%= link_to t('.settings.title'), main_app.refinery_blog_admin_settings_path, + <%= link_to t('.settings.title'), refinery.blog_admin_settings_path, :class => 'settings_icon' %> </li> <li> - <%= link_to t('.settings.comments'), main_app.comments_refinery_blog_admin_settings_path, + <%= link_to t('.settings.comments'), refinery.comments_blog_admin_settings_path, :class => "#{Refinery::Blog::Post.comments_allowed? ? 'success' : 'failure'}_icon" %> </li> <li> - <%= link_to t('.settings.moderation'), main_app.moderation_refinery_blog_admin_settings_path, + <%= link_to t('.settings.moderation'), refinery.moderation_blog_admin_settings_path, :class => "#{Refinery::Blog::Comment::Moderation.enabled? ? 'success' : 'failure'}_icon" %> </li> <li> <%= link_to t('.settings.update_notified'), - main_app.notification_recipients_refinery_blog_admin_settings_path(:dialog => true, :height => 400), + refinery.notification_recipients_blog_admin_settings_path(:dialog => true, :height => 400), :class => 'user_comment_icon' %> </li> <li> <%= link_to t('.settings.teasers'), - main_app.teasers_refinery_blog_admin_settings_path, :class => "#{Refinery::Blog::Post.teasers_enabled? ? 'success' : 'failure'}_icon" %> + refinery.teasers_blog_admin_settings_path, :class => "#{Refinery::Blog::Post.teasers_enabled? ? 'success' : 'failure'}_icon" %> </li> </ul> diff --git a/app/views/refinery/blog/admin/categories/_category.html.erb b/app/views/refinery/blog/admin/categories/_category.html.erb index d476439..a8c4ab0 100644 --- a/app/views/refinery/blog/admin/categories/_category.html.erb +++ b/app/views/refinery/blog/admin/categories/_category.html.erb @@ -5,11 +5,11 @@ </span> <span class='actions'> <%= link_to refinery_icon_tag("application_edit.png"), - main_app.edit_refinery_blog_admin_category_path(category, + refinery.edit_blog_admin_category_path(category, :dialog => true, :height => 325), :title => t('.edit') %> - <%= link_to refinery_icon_tag("delete.png"), main_app.refinery_blog_admin_category_path(category), + <%= link_to refinery_icon_tag("delete.png"), refinery.blog_admin_category_path(category), :class => "cancel confirm-delete", :title => t('.delete'), :method => :delete, diff --git a/app/views/refinery/blog/admin/categories/_form.html.erb b/app/views/refinery/blog/admin/categories/_form.html.erb index 3ad489f..b1cf16c 100644 --- a/app/views/refinery/blog/admin/categories/_form.html.erb +++ b/app/views/refinery/blog/admin/categories/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for [main_app, :refinery_blog_admin, @category] do |f| -%> +<%= form_for [refinery, :blog_admin, @category] do |f| -%> <%= render :partial => "/refinery/admin/error_messages", :locals => { :object => f.object, diff --git a/app/views/refinery/blog/admin/comments/_comment.html.erb b/app/views/refinery/blog/admin/comments/_comment.html.erb index f4a7a16..c007294 100644 --- a/app/views/refinery/blog/admin/comments/_comment.html.erb +++ b/app/views/refinery/blog/admin/comments/_comment.html.erb @@ -5,16 +5,16 @@ </span> <span class='actions'> <%= link_to refinery_icon_tag("application_go.png"), - main_app.refinery_blog_post_path(comment.post, :anchor => "comment-#{comment.to_param}"), + refinery.blog_post_path(comment.post, :anchor => "comment-#{comment.to_param}"), :title => t('.view_live_html'), :target => "_blank" unless comment.unmoderated? %> - <%= link_to refinery_icon_tag('zoom.png'), main_app.refinery_blog_admin_comment_path(comment), + <%= link_to refinery_icon_tag('zoom.png'), refinery.blog_admin_comment_path(comment), :title => t('.read') %> <%= link_to refinery_icon_tag("cross.png"), - main_app.rejected_refinery_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), + refinery.rejected_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), :title => t('.reject') unless comment.rejected? %> <%= link_to refinery_icon_tag("tick.png"), - main_app.approved_refinery_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), + refinery.approved_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), :title => t('.approve') unless comment.approved? %> </span> </li> diff --git a/app/views/refinery/blog/admin/comments/index.html.erb b/app/views/refinery/blog/admin/comments/index.html.erb index 991980d..dd84e9d 100644 --- a/app/views/refinery/blog/admin/comments/index.html.erb +++ b/app/views/refinery/blog/admin/comments/index.html.erb @@ -23,8 +23,7 @@ <%= will_paginate @comments %> <% else %> <h3> - <%= t('.no_items_yet', - :type => action_name.gsub('index', 'new')).downcase %> + <%= t('.no_items_yet', :type => action_name.gsub('index', 'new').downcase) %> </h3> <% end %> <% end %> diff --git a/app/views/refinery/blog/admin/comments/show.html.erb b/app/views/refinery/blog/admin/comments/show.html.erb index df04b3e..2246c2f 100644 --- a/app/views/refinery/blog/admin/comments/show.html.erb +++ b/app/views/refinery/blog/admin/comments/show.html.erb @@ -6,14 +6,14 @@ <h2><%= t('.actions') %></h2> <ul> <li> - <%= link_to t('.back'), main_app.refinery_blog_admin_comments_path, :class => "back_icon" %> + <%= link_to t('.back'), refinery.blog_admin_comments_path, :class => "back_icon" %> </li> <li> - <%= link_to t('.reject'), main_app.rejected_refinery_blog_admin_comment_path(@comment, :return_to => 'rejected'), + <%= link_to t('.reject'), refinery.rejected_blog_admin_comment_path(@comment, :return_to => 'rejected'), :class => 'comment_cross_icon' unless @comment.rejected? %> </li> <li> - <%= link_to t('.approve'), main_app.approved_refinery_blog_admin_comment_path(@comment, :return_to => 'approved'), + <%= link_to t('.approve'), refinery.approved_blog_admin_comment_path(@comment, :return_to => 'approved'), :class => 'comment_tick_icon' unless @comment.approved? %> </li> </ul> @@ -27,7 +27,7 @@ </td> <td> <%= link_to @comment.post.title, - main_app.refinery_blog_post_path(@comment.post, :anchor => "comment-#{@comment.to_param}"), + refinery.blog_post_path(@comment.post, :anchor => "comment-#{@comment.to_param}"), :target => '_blank' %> </td> </tr> diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb index 68b1d31..9bfd42a 100644 --- a/app/views/refinery/blog/admin/posts/_form.html.erb +++ b/app/views/refinery/blog/admin/posts/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for [main_app, :refinery_blog_admin, @post] do |f| -%> +<%= form_for [refinery, :blog_admin, @post] do |f| -%> <%= render :partial => "/refinery/admin/error_messages", :locals => { :object => f.object, @@ -121,4 +121,4 @@ <% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> <% content_for :javascripts, javascript_include_tag('refinery/blog/backend') %> -<%= render 'refinery/shared/admin/autocomplete', :dom_id => '#blog_post_tag_list', :url => main_app.tags_refinery_blog_admin_posts_url %> +<%= render 'refinery/shared/admin/autocomplete', :dom_id => '#blog_post_tag_list', :url => refinery.tags_blog_admin_posts_url %> diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb index 887c830..b5018f3 100644 --- a/app/views/refinery/blog/admin/posts/_post.html.erb +++ b/app/views/refinery/blog/admin/posts/_post.html.erb @@ -7,12 +7,12 @@ </span> </span> <span class='actions'> - <%= link_to refinery_icon_tag("application_go.png"), main_app.refinery_blog_post_path(post), + <%= link_to refinery_icon_tag("application_go.png"), refinery.blog_post_path(post), :title => t('.view_live_html'), :target => "_blank" %> - <%= link_to refinery_icon_tag("application_edit.png"), main_app.edit_refinery_blog_admin_post_path(post), + <%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_blog_admin_post_path(post), :title => t('.edit') %> - <%= link_to refinery_icon_tag("delete.png"), main_app.refinery_blog_admin_post_path(post), + <%= link_to refinery_icon_tag("delete.png"), refinery.blog_admin_post_path(post), :class => "cancel confirm-delete", :title => t('.delete'), :method => :delete, diff --git a/app/views/refinery/blog/admin/settings/notification_recipients.html.erb b/app/views/refinery/blog/admin/settings/notification_recipients.html.erb index f4579d3..132ab17 100644 --- a/app/views/refinery/blog/admin/settings/notification_recipients.html.erb +++ b/app/views/refinery/blog/admin/settings/notification_recipients.html.erb @@ -1,4 +1,4 @@ -<%= form_tag main_app.notification_recipients_refinery_blog_admin_settings_path do %> +<%= form_tag refinery.notification_recipients_blog_admin_settings_path do %> <div class='field'> <span class='label_with_help'> @@ -18,7 +18,7 @@ :locals => { :f => nil, :continue_editing => false, - :cancel_url => main_app.refinery_blog_admin_posts_url, + :cancel_url => refinery.blog_admin_posts_url, :hide_delete => true } %> <% end %> diff --git a/app/views/refinery/blog/posts/_comments.html.erb b/app/views/refinery/blog/posts/_comments.html.erb index a34d106..d662a1f 100644 --- a/app/views/refinery/blog/posts/_comments.html.erb +++ b/app/views/refinery/blog/posts/_comments.html.erb @@ -15,7 +15,7 @@ <% end %> <h2><%= t('add', :scope => 'refinery.blog.posts.show.comments') %></h2> - <%= form_for [main_app, :refinery_blog, @comment] do |f| %> + <%= form_for [refinery, :blog, @comment] do |f| %> <%= render :partial => "/refinery/admin/error_messages", :locals => { :object => f.object, diff --git a/app/views/refinery/blog/posts/_nav.html.erb b/app/views/refinery/blog/posts/_nav.html.erb index 3daacab..eafd35e 100644 --- a/app/views/refinery/blog/posts/_nav.html.erb +++ b/app/views/refinery/blog/posts/_nav.html.erb @@ -1,17 +1,17 @@ <nav id="next_prev_article"> <% if @post.next.present? -%> <%= link_to (truncate(@post.next.title) + " »").html_safe, - main_app.refinery_blog_post_path(@post.next), + refinery.blog_post_path(@post.next), :class => 'next' %> <% end -%> <%= link_to t('blog_home', :scope => 'refinery.blog.posts.show'), - main_app.refinery_blog_root_path, + refinery.blog_root_path, :class => 'home' %> <% if @post.prev.present? -%> <%= link_to ("« " + truncate(@post.prev.title)).html_safe, - main_app.refinery_blog_post_path(@post.prev), + refinery.blog_post_path(@post.prev), :class => 'prev' %> <% end -%> </nav><!-- /next_prev_article --> diff --git a/app/views/refinery/blog/posts/_post.html.erb b/app/views/refinery/blog/posts/_post.html.erb index 77e43ff..c3ae924 100644 --- a/app/views/refinery/blog/posts/_post.html.erb +++ b/app/views/refinery/blog/posts/_post.html.erb @@ -21,7 +21,7 @@ <aside class='filed_in'> <%= t('filed_in', :scope => 'refinery.blog.posts.show') %> <% categories.each_with_index do |category, index| %> - <%= link_to category.title, main_app.refinery_blog_category_path(category) -%><%= ',' if index < ((categories.length) - 1) %> + <%= link_to category.title, refinery.blog_category_path(category) -%><%= ',' if index < ((categories.length) - 1) %> <% end %> </aside> <% end %> diff --git a/app/views/refinery/blog/posts/index.rss.builder b/app/views/refinery/blog/posts/index.rss.builder index 99ae0eb..867c6d6 100644 --- a/app/views/refinery/blog/posts/index.rss.builder +++ b/app/views/refinery/blog/posts/index.rss.builder @@ -3,14 +3,14 @@ xml.rss :version => "2.0" do xml.channel do xml.title Refinery::Core.config.site_name xml.description Refinery::Core.config.site_name + " Blog Posts" - xml.link main_app.refinery_blog_root_url + xml.link refinery.blog_root_url @posts.each do |post| xml.item do xml.title post.title xml.description post.body xml.pubDate post.published_at.to_s(:rfc822) - xml.link main_app.refinery_blog_post_url(post) + xml.link refinery.blog_post_url(post) end end end diff --git a/app/views/refinery/blog/shared/_categories.html.erb b/app/views/refinery/blog/shared/_categories.html.erb index d7524ef..64f4ee6 100644 --- a/app/views/refinery/blog/shared/_categories.html.erb +++ b/app/views/refinery/blog/shared/_categories.html.erb @@ -3,7 +3,7 @@ <ul id='categories'> <% @categories.each do |category| %> <li<%= " class='selected'" if @category.present? and @category.id == category.id %>> - <%= link_to "#{category.title} (#{category.post_count})", main_app.refinery_blog_category_path(category) %> + <%= link_to "#{category.title} (#{category.post_count})", refinery.blog_category_path(category) %> </li> <% end %> </ul> diff --git a/app/views/refinery/blog/shared/_post.html.erb b/app/views/refinery/blog/shared/_post.html.erb index 279de92..1a52fd4 100644 --- a/app/views/refinery/blog/shared/_post.html.erb +++ b/app/views/refinery/blog/shared/_post.html.erb @@ -1,7 +1,7 @@ <% if post.live? %> <article class="blog_post" id="<%= dom_id(post) %>"> <header> - <h1><%= link_to post.title, main_app.refinery_blog_post_path(post) %></h1> + <h1><%= link_to post.title, refinery.blog_post_path(post) %></h1> <section class='details'> <time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'> <%= t('created_at', :scope => 'refinery.blog.shared.posts', :when => l(post.published_at.to_date, :format => :short)) %> @@ -10,13 +10,13 @@ <% if (categories = post.categories).any? %> <aside class='filed_in'> <%= t('filed_in', :scope => 'refinery.blog.posts.show') %> - <%=raw categories.collect { |category| link_to category.title, main_app.refinery_blog_category_path(category) }.to_sentence %> + <%=raw categories.collect { |category| link_to category.title, refinery.blog_category_path(category) }.to_sentence %> </aside> <% end %> <% if (tags = post.tags).any? %> <aside class='tagged'> <%= t('tagged', :scope => 'refinery.blog.posts.show') %> - <%=raw tags.collect { |tag| link_to tag, main_app.refinery_blog_tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %> + <%=raw tags.collect { |tag| link_to tag, refinery.blog_tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %> </aside> <% end %> </section> @@ -30,7 +30,7 @@ </section> <footer> <p> - <%= link_to t('read_more', :scope => 'refinery.blog.shared.posts'), main_app.refinery_blog_post_path(post) if blog_post_teaser_enabled? %> + <%= link_to t('read_more', :scope => 'refinery.blog.shared.posts'), refinery.blog_post_path(post) if blog_post_teaser_enabled? %> </p> <aside class='comment_count'> <% if Refinery::Blog::Post.comments_allowed? %> diff --git a/app/views/refinery/blog/shared/_posts.html.erb b/app/views/refinery/blog/shared/_posts.html.erb index f71cd2a..a8064c4 100644 --- a/app/views/refinery/blog/shared/_posts.html.erb +++ b/app/views/refinery/blog/shared/_posts.html.erb @@ -3,7 +3,7 @@ <ul id="blog_posts"> <% @posts.each do |blog_post| %> <li class='clearfix'> - <%= link_to blog_post.title, main_app.refinery_blog_post_path(blog_post) %> + <%= link_to blog_post.title, refinery.blog_post_path(blog_post) %> </li> <% end %> </ul> diff --git a/app/views/refinery/blog/shared/_rss_feed.html.erb b/app/views/refinery/blog/shared/_rss_feed.html.erb index 5620f85..27ddf23 100644 --- a/app/views/refinery/blog/shared/_rss_feed.html.erb +++ b/app/views/refinery/blog/shared/_rss_feed.html.erb @@ -1,2 +1,2 @@ <h2><%= t('.title') %></h2> -<%= link_to t('.subscribe'), main_app.refinery_blog_rss_feed_path, :id => "rss_feed_subscribe"%> +<%= link_to t('.subscribe'), refinery.blog_rss_feed_path, :id => "rss_feed_subscribe"%> diff --git a/app/views/refinery/blog/shared/_tags.html.erb b/app/views/refinery/blog/shared/_tags.html.erb index f35900c..af91d50 100644 --- a/app/views/refinery/blog/shared/_tags.html.erb +++ b/app/views/refinery/blog/shared/_tags.html.erb @@ -2,7 +2,7 @@ <h2><%= t('.title') %></h2> <nav id='tags'> <% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag, css_class| %> - <%= link_to tag.name, main_app.refinery_blog_tagged_posts_path(tag.id, tag.name.parameterize), :class => css_class %> + <%= link_to tag.name, refinery.blog_tagged_posts_path(tag.id, tag.name.parameterize), :class => css_class %> <% end %> </nav> <% end %>
\ No newline at end of file |