From 48442e95f5b302352c0949b04dfe1c9d07f3aa78 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Tue, 13 Aug 2013 11:11:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E9=A1=B9=E7=9B=AE=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E5=AD=97=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project.rb | 1 + app/views/activities/index.html.erb | 3 ++- app/views/layouts/base_projects.html.erb | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 9a0265a8..97c4f732 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -88,6 +88,7 @@ class Project < ActiveRecord::Base validates_presence_of :name, :identifier validates_uniqueness_of :identifier validates_associated :repository, :wiki + validates_length_of :description, :maximum => 255 validates_length_of :name, :maximum => 255 validates_length_of :homepage, :maximum => 255 validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index ffee6324..0154bb68 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -67,7 +67,8 @@ - + diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 09c8f74a..01acb7ba 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -28,6 +28,7 @@
+ <% @project = Project.find(@project.id)%>
<%= h(e.project) if @project.nil? || @project != e.project %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(e.event_title), e.event_url %> <%= h(e.project) if @project.nil? || @project != e.project %> + <%= l(:label_new_activity) %> <%= link_to format_activity_title(e.event_title), e.event_url %>

<%= format_activity_description(e.event_description) %>

@@ -70,6 +71,7 @@
+ <%= textilizable @project.description %>
<%= link_to image_tag(url_to_avatar(@project), :class => 'avatar2') %>