aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/posts/show.html.erb
blob: 603a44f0c1ca286bdf591e41e963c1ae01a380f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<% 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('blog.shared.comments.none') %>.
        </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| %>
        <% if Rails.version < '3.0.0'%>
          <%= f.error_messages %>
        <% else %>
          <%= render :partial => "/shared/admin/error_messages",
                     :locals => {
                       :object => f.object,
                       :include_object_name => true
                     } %>
        <% end %>
        <div class='field'>
          <%= f.label :name %>
          <%= f.text_field :name %>
        </div>
        <div class='field'>
          <%= f.label :email %>
          <% if Rails.version > '3.0.0' %>
            <%= f.email_field :email %>
          <% else %>
            <%= f.text_field :email %>
          <% end %>
        </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/posts" %>
  <%= render :partial => "/blog/shared/rss_feed" %>
  <%= blog_archive_list %>
<% end %>

<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true }  %>

<% if Refinery.version < '0.9.9' %>
  <% content_for :head_libraries, jquery_include_tags(:jquery_ui => false) %>
  <% content_for :head do %>
    <%= stylesheet_link_tag 'refinerycms-blog' %>
    <%= javascript_include_tag('refinerycms-blog') %>
    <% if BlogPost::ShareThis.enabled? %>
    <script src="http://w.sharethis.com/button/buttons.js"></script>
    <script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script>
  <% end %>
<% else %>
  <% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
  <% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %>
  <% content_for :javascripts do %>
    <%= 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? %>
<% end %>