Merge branch 'szzh' into dev_hjq

This commit is contained in:
huang 2015-07-31 17:20:51 +08:00
commit cecbf8b43f
7 changed files with 34 additions and 19 deletions

View File

@ -482,7 +482,7 @@ module UsersHelper
when "Message"
return ( activity.act.parent_id == nil || activity.act.parent_id == '' ) ? '发布了帖子' : '回复了帖子'
when "Poll"
return '发布了问卷'
return '创建了问卷'
else
return '有了新动态'
end

View File

@ -235,9 +235,10 @@ class Issue < ActiveRecord::Base
base_reload(*args)
end
def to_param
@to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
end
# 之所以注释是以为最终以id形式显示另外如果项目名称带点号或者纯数字会出现问题
# def to_param
# @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
# end
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields

View File

@ -61,7 +61,7 @@
<!--gcm-->
<p class="stats">
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %>
<%= content_tag('span', link_to("#{course_activity_count @course}", course_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
</p>
<!--gcm-->

View File

@ -1,8 +1,11 @@
<% if(User.current.logged? && User.current!=target)%>
<% if User.current.logged?%>
<% if User.current == target%>
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class="fr gz_btn mr10 ">编辑资料</a>
<%else%>
<%if(target.watched_by?(User.current))%>
<a id="user_watch_id" href="<%= watch_path(:object_type=>
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<a id="user_watch_id" href="<%= watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %>
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">关注</a>
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %>
<% end%>
<% end %>

View File

@ -146,9 +146,7 @@
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
</a>
</div>
<div class="subNav ">
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a>
</div>
<% else%>
<div class="subNav">
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
@ -184,7 +182,7 @@
<% if (get_join_course_count(@user) != 0) %>
<li>加入课程&nbsp;:</li>
<% end %>
<% if @user.user_extensions.identity == 0 %>
<% if @user.user_extensions.identity == 1 %>
<li>参加匿评&nbsp;:</li>
<% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
@ -215,7 +213,7 @@
<% if (get_join_course_count(@user) != 0) %>
<li><%= get_join_course_count(@user) %></li>
<% end %>
<% if @user.user_extensions.identity == 0 %>
<% if @user.user_extensions.identity == 1 %>
<li><%= get_anonymous_evaluation_count(@user) %></li>
<% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
@ -239,6 +237,17 @@
<div class="cl"></div>
<!-- tag模块 -->
<div class="project_Label">
<h4 class="mb5"><%= l(:label_tag)%>:</h4>
<div class="tag_h">
<div id="tags">
<%= render :partial => 'tags/project_tag', :locals => {:obj => @user,:object_flag => "1"}%>
</div>
</div>
<div class="cl"></div>
</div><!--项目标签 end-->
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
<% visitor_count,visitor_list = get_visitor_users(@user) %>

View File

@ -42,7 +42,7 @@
</span>
<% else %>
<div id="tag">
<span class="tag_show">
<span class="re_tag f_l">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>

View File

@ -97,7 +97,9 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
.w70{ width:70px;}
.h200{ height:200px;}
/* 个人主页*/
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a.edit_btn{display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.edit_btn{ color:#ff5722;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.gz_btn{ color:#ff5722;}
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.qx_btn{color:#64bdd9;}