diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 17:28:09 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 17:28:09 +0300 |
commit | 06071e558008477e1b8dbb376d6693af97eeff32 (patch) | |
tree | 0ed1e765b37975fbbd054b058a45712ee7464c73 /app/views/blog | |
parent | 3fa8937b95a4d90000ad1be9c588424052136455 (diff) | |
download | refinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.tar.gz refinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.tar.bz2 refinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.zip |
Wip.
Diffstat (limited to 'app/views/blog')
-rw-r--r-- | app/views/blog/categories/show.html.erb | 21 | ||||
-rw-r--r-- | app/views/blog/comment_mailer/notification.html.erb | 17 | ||||
-rw-r--r-- | app/views/blog/posts/_comment.html.erb | 10 | ||||
-rw-r--r-- | app/views/blog/posts/_nav.html.erb | 11 | ||||
-rw-r--r-- | app/views/blog/posts/_post.html.erb | 31 | ||||
-rw-r--r-- | app/views/blog/posts/archive.html.erb | 20 | ||||
-rw-r--r-- | app/views/blog/posts/index.html.erb | 24 | ||||
-rw-r--r-- | app/views/blog/posts/index.rss.builder | 17 | ||||
-rw-r--r-- | app/views/blog/posts/show.html.erb | 67 | ||||
-rw-r--r-- | app/views/blog/posts/tagged.html.erb | 22 | ||||
-rw-r--r-- | app/views/blog/shared/_categories.html.erb | 10 | ||||
-rw-r--r-- | app/views/blog/shared/_post.html.erb | 46 | ||||
-rw-r--r-- | app/views/blog/shared/_posts.html.erb | 10 | ||||
-rw-r--r-- | app/views/blog/shared/_rss_feed.html.erb | 2 | ||||
-rw-r--r-- | app/views/blog/shared/_tags.html.erb | 8 |
15 files changed, 0 insertions, 316 deletions
diff --git a/app/views/blog/categories/show.html.erb b/app/views/blog/categories/show.html.erb deleted file mode 100644 index 40444ec..0000000 --- a/app/views/blog/categories/show.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -<% content_for :body_content_title, @category.title %> - -<% content_for :body_content_left do %> - <% if @blog_posts.any? %> - <section id="blog_posts"> - <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> - <%= will_paginate @blog_posts %> - </section> - <% else %> - <p> - <%= t('.no_posts') %> - </p> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%= render :partial => "/blog/shared/categories" %> -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> diff --git a/app/views/blog/comment_mailer/notification.html.erb b/app/views/blog/comment_mailer/notification.html.erb deleted file mode 100644 index 800f12c..0000000 --- a/app/views/blog/comment_mailer/notification.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%=raw t('.greeting') %>, - -<%=raw t('.you_recieved_new_comment') %> - -<%=raw t('.comment_starts') %> - -<%=raw t('.from') %>: <%= @comment.name %> -<%=raw t('.email') %>: <%= @comment.email %> -<%=raw t('.message') %>: -<%=simple_format strip_tags(@comment.body) %> - -<%=raw t('.comment_ends') %> - -<%=raw t('.closing_line') %>, -<%=raw RefinerySetting[:site_name] %> - -<%=raw t('.ps') %> diff --git a/app/views/blog/posts/_comment.html.erb b/app/views/blog/posts/_comment.html.erb deleted file mode 100644 index 5503826..0000000 --- a/app/views/blog/posts/_comment.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<article class='blog_comment_message' id='<%= "comment-#{comment.to_param}" %>'> - <%= image_tag comment.avatar_url, :alt => comment.name, :class => 'avatar' %> - <%= simple_format auto_link(comment.message.to_s) %> - <footer class='blog_comment_author'> - <p> - <%= t('by', :scope => 'blog.posts.comments', :who => comment.name) %>, - <%= t('time_ago', :scope => 'blog.posts.comments', :time => time_ago_in_words(comment.created_at)) %> - </p> - </footer> -</article> diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb deleted file mode 100644 index df4b435..0000000 --- a/app/views/blog/posts/_nav.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<nav id="next_prev_article"> - <% if @blog_post.next.present? -%> - <%= link_to (truncate(@blog_post.next.title) + " »").html_safe, @blog_post.next, :class => 'next' %> - <% end -%> - - <%= link_to t('blog_home', :scope => 'blog.posts.show'), blog_root_path, :class => 'home' %> - - <% if @blog_post.prev.present? -%> - <%= link_to ("« " + truncate(@blog_post.prev.title)).html_safe, @blog_post.prev, :class => 'prev' %> - <% end -%> -</nav><!-- /next_prev_article --> diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb deleted file mode 100644 index 12978d3..0000000 --- a/app/views/blog/posts/_post.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<% flash.each do |key, value| %> - <div id='flash' class="flash flash_<%= key %>"> - <%= value %> - </div> -<% end %> -<article id="blog_post"> - <header> - <h1><%= @blog_post.title %></h1> - <section class='details'> - <time datetime="<%=l @blog_post.published_at.to_date, :format => :default %>" class='posted_at'> - <%= t('created_at', :scope => 'blog.shared.posts', :when => l(@blog_post.published_at.to_date, :format => :short)) %> - </time> - <%= "#{t('by', :scope => 'blog.posts.show')} #{@blog_post.author.username}" if @blog_post.author.present? %>. - <% if (categories = @blog_post.categories).any? %> - <aside class='filed_in'> - <%= t('filed_in', :scope => 'blog.posts.show') %> - <% categories.each_with_index do |category, index| %> - <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %> - <% end %> - </aside> - <% end %> - </section> - </header> - <%= @blog_post.body.html_safe %> - - <% if BlogPost::ShareThis.enabled? %> - <span class="st_sharethis" displayText="ShareThis"></span> - <% end %> -</article> -<%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%> -<%= render 'nav' if next_or_previous?(@blog_post) %> diff --git a/app/views/blog/posts/archive.html.erb b/app/views/blog/posts/archive.html.erb deleted file mode 100644 index a2044e8..0000000 --- a/app/views/blog/posts/archive.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -<% content_for :body_content_left do %> - <h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1> - <% if @blog_posts.any? %> - <section id="blog_posts"> - <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> - </section> - <% else %> - <p><%= t('.no_blog_articles_posted', :date => @archive_date.strftime('%B %Y')) %></p> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%= render :partial => "/blog/shared/categories" %> - <%= render :partial => "/blog/shared/tags" %> - <%= render :partial => "/blog/shared/rss_feed" %> - <%= blog_archive_list %> -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> diff --git a/app/views/blog/posts/index.html.erb b/app/views/blog/posts/index.html.erb deleted file mode 100644 index 8c3801a..0000000 --- a/app/views/blog/posts/index.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% content_for :body_content_left do %> - <%=raw @page[Page.default_parts.first.to_sym] if Page.default_parts.any? %> - - <% if @blog_posts.any? %> - <section id="blog_posts"> - <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> - <%= will_paginate @blog_posts %> - </section> - <% else %> - <p><%= t('.no_blog_articles_yet') %></p> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%=raw @page[Page.default_parts.second.to_sym] if Page.default_parts.many? %> - - <%= render :partial => "/blog/shared/categories" %> - <%= render :partial => "/blog/shared/tags" %> - <%= render :partial => "/blog/shared/rss_feed" %> - <%= blog_archive_list %> -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> diff --git a/app/views/blog/posts/index.rss.builder b/app/views/blog/posts/index.rss.builder deleted file mode 100644 index 51fa4da..0000000 --- a/app/views/blog/posts/index.rss.builder +++ /dev/null @@ -1,17 +0,0 @@ -xml.instruct! :xml, :version => "1.0" -xml.rss :version => "2.0" do - xml.channel do - xml.title RefinerySetting.find_or_set(:site_name, "Company Name") - xml.description RefinerySetting.find_or_set(:site_name, "Company Name") + " Blog Posts" - xml.link blog_root_url - - @blog_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 blog_post_url(post) - end - end - end -end
\ No newline at end of file diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb deleted file mode 100644 index cc763a8..0000000 --- a/app/views/blog/posts/show.html.erb +++ /dev/null @@ -1,67 +0,0 @@ -<% content_for :body_content_left do %> - <div id="show_blog_post"> - <%= render 'post' %> - </div> - - <% if BlogPost.comments_allowed? %> - <aside id="comments"> - <h2><%= t('.comments.title') %></h2> - <% if (comments = @blog_post.comments.approved).any? %> - <%= render :partial => "comment", :collection => comments %> - <% else %> - <p> - <%= t('none', :scope => 'blog.shared.comments') %>. - </p> - <% end %> - - <% flash.each do |key, value| %> - <div id='flash' class="flash flash_<%= key %>"> - <%= value %> - </div> - <% end %> - - <h2><%= t('.comments.add') %></h2> - <%= form_for [:blog_post, @blog_comment] do |f| %> - <%= render :partial => "/shared/admin/error_messages", - :locals => { - :object => f.object, - :include_object_name => true - } %> - <div class='field'> - <%= f.label :name %> - <%= f.text_field :name %> - </div> - <div class='field'> - <%= f.label :email %> - <%= f.email_field :email %> - </div> - <div class='field message_field'> - <%= f.label :message %> - <%= f.text_area :message, :rows => 6 %> - </div> - <div class='field form-actions'> - <%= f.submit t('.submit') %> - </div> - <% end %> - </aside> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%= render :partial => "/blog/shared/categories" %> - <%= render :partial => "/blog/shared/tags" %> - <%= render :partial => "/blog/shared/posts" %> - <%= render :partial => "/blog/shared/rss_feed" %> - <%= blog_archive_list %> -<% end %> - -<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %> - -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> -<% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %> -<% content_for :javascripts do %> - <%# enable AJAX'd post nav at your own risk until html5 history API implemented. %> - <%#= javascript_include_tag('refinerycms-blog') %> - <script src="http://w.sharethis.com/button/buttons.js"></script> - <script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script> -<% end if BlogPost::ShareThis.enabled? %> diff --git a/app/views/blog/posts/tagged.html.erb b/app/views/blog/posts/tagged.html.erb deleted file mode 100644 index 904150f..0000000 --- a/app/views/blog/posts/tagged.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% content_for :body_content_title, "#{t('.posts_tagged')} “#{@tag_name.titleize}”".html_safe -%> - -<% content_for :body_content_left do %> - <% if @blog_posts.any? %> - <section id="blog_posts"> - <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> - <%= will_paginate @blog_posts %> - </section> - <% else %> - <p><%= t('.no_blog_articles_yet') %></p> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%= render :partial => "/blog/shared/categories" %> - <%= render :partial => "/blog/shared/tags" %> - <%= render :partial => "/blog/shared/rss_feed" %> - <%= blog_archive_list %> -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> diff --git a/app/views/blog/shared/_categories.html.erb b/app/views/blog/shared/_categories.html.erb deleted file mode 100644 index 05cc53f..0000000 --- a/app/views/blog/shared/_categories.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @blog_categories.any? %> - <h2><%= t('.title') %></h2> - <ul id='categories'> - <% @blog_categories.each do |category| %> - <li<%= " class='selected'" if @category.present? and @category.id == category.id %>> - <%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %> - </li> - <% end %> - </ul> -<% end %>
\ No newline at end of file diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb deleted file mode 100644 index 6cda22d..0000000 --- a/app/views/blog/shared/_post.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -<% if post.live? %> - <article class="blog_post" id="<%= dom_id(post) %>"> - <header> - <h1><%= link_to post.title, blog_post_url(post) %></h1> - <section class='details'> - <time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'> - <%= t('created_at', :scope => 'blog.shared.posts', :when => l(post.published_at.to_date, :format => :short)) %> - </time> - <%= "#{t('by', :scope => 'blog.posts.show')} #{post.author.username}" if post.author.present? %>. - <% if (categories = post.categories).any? %> - <aside class='filed_in'> - <%= t('filed_in', :scope => 'blog.posts.show') %> - <%=raw categories.collect { |category| link_to category.title, blog_category_url(category) }.to_sentence %> - </aside> - <% end %> - <% if (tags = post.tags).any? %> - <aside class='tagged'> - <%= t('tagged', :scope => 'blog.posts.show') %> - <%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %> - </aside> - <% end %> - </section> - </header> - <section class='clearfix'> - <% if blog_post_teaser_enabled? %> - <%= blog_post_teaser(post) %> - <% else %> - <%= post.body.html_safe %> - <% end %> - </section> - <footer> - <p> - <%= link_to t('read_more', :scope => 'blog.shared.posts'), blog_post_url(post) if blog_post_teaser_enabled? %> - </p> - <aside class='comment_count'> - <% if BlogPost.comments_allowed? %> - <% if post.comments.any? %> - (<%= pluralize(post.comments.approved.count, t('singular', :scope => 'blog.shared.comments')) %>) - <% else %> - (<%= t('none', :scope => 'blog.shared.comments') %>) - <% end %> - <% end %> - </aside> - </footer> - </article> -<% end %> diff --git a/app/views/blog/shared/_posts.html.erb b/app/views/blog/shared/_posts.html.erb deleted file mode 100644 index 24a8199..0000000 --- a/app/views/blog/shared/_posts.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @blog_posts.many? %> - <h2><%= t('.other') %></h2> - <ul id="blog_posts"> - <% @blog_posts.each do |blog_post| %> - <li class='clearfix'> - <%= link_to blog_post.title, blog_post_url(blog_post) %> - </li> - <% end %> - </ul> -<% end %>
\ No newline at end of file diff --git a/app/views/blog/shared/_rss_feed.html.erb b/app/views/blog/shared/_rss_feed.html.erb deleted file mode 100644 index 1c2cef7..0000000 --- a/app/views/blog/shared/_rss_feed.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<h2><%= t('.title') %></h2> -<%= link_to t('.subscribe'), blog_rss_feed_url, :id => "rss_feed_subscribe"%> diff --git a/app/views/blog/shared/_tags.html.erb b/app/views/blog/shared/_tags.html.erb deleted file mode 100644 index b0b11ee..0000000 --- a/app/views/blog/shared/_tags.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% if @tags.any? %> - <h2><%= t('.title') %></h2> - <nav id='tags'> - <% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag, css_class| %> - <%= link_to tag.name, tagged_posts_path(tag.id, tag.name.parameterize), :class => css_class %> - <% end %> - </nav> -<% end %>
\ No newline at end of file |