From 5eceb3d841839a35a0dd5942065beb4292d42d83 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 8 Jan 2016 14:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=80=E4=BA=9Bbug;=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=B2=E8=AE=BE=E4=B8=BA=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shield_activities_controller.rb | 2 +- app/views/blogs/_article.html.erb | 3 +++ app/views/layouts/_org_courses.html.erb | 2 +- app/views/layouts/_org_projects.html.erb | 2 +- app/views/layouts/_user_courses.html.erb | 2 +- app/views/layouts/_user_projects.html.erb | 2 +- .../shield_activities/{destroy.js.erb => show_acts.js.erb} | 0 config/routes.rb | 6 +++++- 8 files changed, 13 insertions(+), 6 deletions(-) rename app/views/shield_activities/{destroy.js.erb => show_acts.js.erb} (100%) diff --git a/app/controllers/shield_activities_controller.rb b/app/controllers/shield_activities_controller.rb index 7f4f4eebf..b2d5191b3 100644 --- a/app/controllers/shield_activities_controller.rb +++ b/app/controllers/shield_activities_controller.rb @@ -15,7 +15,7 @@ class ShieldActivitiesController < ApplicationController end end - def destroy + def show_acts if params[:org_id] if params[:project_id] ShieldActivity.where("container_type='Organization' and container_id=#{params[:org_id].to_i} and shield_type='Project' and shield_id=#{params[:project_id]}").each do |act| diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index cd701d804..8c5d493d7 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -46,6 +46,9 @@ <% end %> TO <%= link_to activity.blog.name+" | 博客", user_blogs_path(:user_id=>activity.author_id,:host=>Setting.host_user), :class => "newsBlue ml15 mr5"%> + <% if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %> + 已设为首页 + <% end %>