<% if User.current && User.current == @article.user %>
<% end %>
+
+
+ <%= link_to image_tag(url_to_avatar(@article.user),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.user) %>
+
+
+
+
-
+
<%= format_time( @article.created_at)%>
+
+
+
+
+
<%=@article.content.html_safe %>
diff --git a/app/views/homepages/_article_list.html.erb b/app/views/homepages/_article_list.html.erb
index 2115ad5f6..b93c57e44 100644
--- a/app/views/homepages/_article_list.html.erb
+++ b/app/views/homepages/_article_list.html.erb
@@ -1,15 +1,13 @@
-
个人主页列表
-
- <%=link_to '新 建', new_article_homepage_path(), :target => "_blank", :class => 'BlueCirBtn' %>
-
-
-
+
排序:
<%= link_to "时间", {:controller => 'homepages', :action => 'index', :user_id =>@user.id, :sort => @b_sort}, :class => "sortTxt", :remote => true %>
<%= link_to "", {:controller => 'homepages', :action => 'index', :user_id =>@user.id, :sort => @b_sort}, :class => "#{@b_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} ", :remote => true %>
+
+ <%=link_to '新 建', new_article_homepage_path(), :target => "_blank", :class => 'BlueCirBtnMiddle', :style => 'margin-right: 0;' %>
+
@@ -17,57 +15,33 @@
<% @articles.each do |activity| %>
-
- <%= link_to activity.title.to_s.html_safe, user_homepage_article_homepage_path(:user_id=>activity.user_id, :homepage_id=>activity.homepage_id,:id=>activity), :class=> "list-title fl", :target => '_blank' %>
<% if activity.homepage.article_id and activity.id == activity.homepage.article_id %>
+ <%= link_to activity.title.to_s.html_safe, homepage_user_path(activity.user_id), :class=> "list-title fl", :target => '_blank' %>
主页
+ <% else %>
+ <%= link_to activity.title.to_s.html_safe, user_homepage_show_path(:user_id=>activity.user_id,:id=>activity), :class=> "list-title fl", :target => '_blank' %>
<% end %>
-
- 更新:<%= format_time(activity.updated_at) %>
+ 更新:<%= format_time(activity.updated_at) %>
+
+ <%= link_to(
+ l(:button_delete),
+ {:controller => 'article_homepages',:action => 'destroy', :id => activity.id},
+ :method => :delete,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'fr'
+ ) if User.current.admin? || User.current.id == activity.user_id %>
+ <%= link_to(
+ l(:button_edit),
+ {:controller => 'article_homepages',:action => 'edit', :id => activity.id},
+ :class => 'fr mr10'
+ ) if User.current.admin? || User.current.id == activity.user_id %>
+
+
-
-
- -
-
- -
- <% if activity.id == activity.homepage.article_id %>
- <%= link_to(
- l(:button_cancel_base_homepage),
- {:controller => 'homepages',:action => 'cancel_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id},
- :method => :post,
- :class => 'postOptionLink'
- ) if User.current && User.current.id == activity.homepage.user_id %>
- <% else %>
- <%= link_to(
- l(:button_set_base_homepage),
- {:controller => 'homepages',:action => 'set_homepage',:user_id=>activity.user_id,:id=>activity.homepage_id, :article_id => activity.id},
- :method => :post,
- :class => 'postOptionLink'
- ) if User.current && User.current.id == activity.homepage.user_id %>
- <% end %>
-
- -
- <%= link_to(
- l(:button_edit),
- {:controller => 'article_homepages',:action => 'edit', :id => activity.id},
- :class => 'postOptionLink'
- ) if User.current.admin? || User.current.id == activity.user_id %>
-
- -
- <%= link_to(
- l(:button_delete),
- {:controller => 'article_homepages',:action => 'destroy', :id => activity.id},
- :method => :delete,
- :data => {:confirm => l(:text_are_you_sure)},
- :class => 'postOptionLink'
- ) if User.current.admin? || User.current.id == activity.user_id %>
-
-
-
-
-
<% end %>
diff --git a/app/views/homepages/index.html.erb b/app/views/homepages/index.html.erb
index 58f54432e..e6c7be736 100644
--- a/app/views/homepages/index.html.erb
+++ b/app/views/homepages/index.html.erb
@@ -1,7 +1,7 @@