diff --git a/app/views/article_homepages/_article_form.html.erb b/app/views/article_homepages/_article_form.html.erb index 9b52040f8..af1db98d1 100644 --- a/app/views/article_homepages/_article_form.html.erb +++ b/app/views/article_homepages/_article_form.html.erb @@ -17,7 +17,7 @@ :owner_id => @article.nil? ? 0: @article.id, :owner_type => OwnerTypeHelper::ArticleHomepage, :width => '100%', - :height => 500, + :height => 418, :minHeight=>500, :class => 'talk_text fl', :input_html => { :id => 'message_content', diff --git a/app/views/article_homepages/_article_show.html.erb b/app/views/article_homepages/_article_show.html.erb index f671fd20b..48acad76a 100644 --- a/app/views/article_homepages/_article_show.html.erb +++ b/app/views/article_homepages/_article_show.html.erb @@ -1,6 +1,6 @@
-
+
<% if User.current && User.current == @article.user %>
    @@ -46,8 +46,22 @@
<% 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 %> +
    +
  • -
<% 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 @@
- 个人主页 + 设置个人主页
diff --git a/config/routes.rb b/config/routes.rb index c6c8afe10..907081732 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -555,6 +555,7 @@ RedmineApp::Application.routes.draw do get '/boards/:id/boards_topic', :to =>'boards#show', :as => 'boards_topic' match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news' match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post] + match 'users/:user_id/homepage/articles/:id', :to => 'article_homepages#show', :as => "user_homepage_show" scope ":username" do resources :posts diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index b6dc8b202..f3095a08c 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -531,7 +531,8 @@ a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line a:hover.BlueCirBtn{ background:#3598db; color:#fff;} a.BlueCirBtnMini{ display:block;width:40px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} - +a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;} /* 按钮*/ a.btn_orange_big{ display:inline-block;