aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery
diff options
context:
space:
mode:
authorJeff Shumate <jeff@catapulsion.net>2012-01-25 22:27:46 -0700
committerJeff Shumate <jeff@catapulsion.net>2012-01-25 22:27:46 -0700
commite274bb1757aa3c27645c181bae6164131a7a35dd (patch)
tree2c896df9bd0a66aa288bfdf8f30fe767516ec0bc /app/views/refinery
parentd1ad82d42eceb53b203716e1c37f4fbb326a2ee8 (diff)
downloadrefinerycms-blog-e274bb1757aa3c27645c181bae6164131a7a35dd.tar.gz
refinerycms-blog-e274bb1757aa3c27645c181bae6164131a7a35dd.tar.bz2
refinerycms-blog-e274bb1757aa3c27645c181bae6164131a7a35dd.zip
add source url for post
Diffstat (limited to 'app/views/refinery')
-rw-r--r--app/views/refinery/blog/admin/posts/_form.html.erb16
-rw-r--r--app/views/refinery/blog/posts/_post.html.erb8
2 files changed, 23 insertions, 1 deletions
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb
index a33baeb..68b1d31 100644
--- a/app/views/refinery/blog/admin/posts/_form.html.erb
+++ b/app/views/refinery/blog/admin/posts/_form.html.erb
@@ -83,6 +83,22 @@
<div class='field'>
<span class='label_with_help'>
+ <%= f.label :source_url_title, t('.source_url_title') %>
+ <%= refinery_help_tag t('.source_url_title_help') %>
+ </span>
+ <%= f.text_field :source_url_title, :class => "widest" %>
+ </div>
+
+ <div class='field'>
+ <span class='label_with_help'>
+ <%= f.label :source_url, t('.source_url') %>
+ <%= refinery_help_tag t('.source_url_help') %>
+ </span>
+ <%= f.text_field :source_url, :class => "widest" %>
+ </div>
+
+ <div class='field'>
+ <span class='label_with_help'>
<%= f.label :user_id, t('.author') %>
<%= refinery_help_tag t('.author_help') %>
<br/>
diff --git a/app/views/refinery/blog/posts/_post.html.erb b/app/views/refinery/blog/posts/_post.html.erb
index 020ba41..77e43ff 100644
--- a/app/views/refinery/blog/posts/_post.html.erb
+++ b/app/views/refinery/blog/posts/_post.html.erb
@@ -10,7 +10,13 @@
<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)) %>
</time>
- <%= "#{t('by', :scope => 'refinery.blog.posts.show')} #{@post.author.username}" if @post.author.present? %>.
+ <%= content_tag(:div, "#{t('by', :scope => 'refinery.blog.posts.show')} #{@post.author.username}", :class => "blog_author") if @post.author.present? %>
+ <% if @post.source_url.present? %>
+ <div class='blog_source'>
+ <%= "#{t('source', :scope => 'refinery.blog.posts.show')}: " %>
+ <%= link_to (@post.source_url_title.blank? ? @post.source_url : @post.source_url_title), @post.source_url %>
+ </div>
+ <% end %>
<% if (categories = @post.categories).any? %>
<aside class='filed_in'>
<%= t('filed_in', :scope => 'refinery.blog.posts.show') %>