GitlabVersion
z9hang 11 years ago
commit da3aa7b291

@ -48,13 +48,14 @@
<div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div> <div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
<div class="memo-content"> <div class="memo-content">
<%= raw @memo.content %> <%=h sanitize(@memo.content.html_safe) %>
<p> <p>
<% if @memo.attachments.any?%> <% if @memo.attachments.any?%>
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options} %> <%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options} %>
<% end %> <% end %>
</p> </p>
<div class="clearfix"></div>
</div> </div>
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author.name %></div> <div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author.name %></div>

@ -1,51 +1,58 @@
<!--add by huang--> <!--add by huang-->
<h3><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)%></h3> <h3><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></h3>
<div class="inf_user_image"> <div class="inf_user_image">
<% for user in @user.watcher_users %> <% for user in @user.watcher_users %>
<ul class="list_watch"><li> <ul class="list_watch">
<table width="660px" border="0" align="center"> <li>
<tr> <table width="660px" border="0" align="center">
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), <tr>
user_path(user), <td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(user), :class => "avatar"),
:title => "#{user.name}" %></td> user_path(user),
<td><table width="580px" border="0"> :title => "#{user.name}" %></td>
<tr> <!-- modified by bai --> <td>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %> <table width="580px" border="0">
</td> <tr> <!-- modified by bai -->
</tr> <td colspan="2" valign="top">
<strong><%= content_tag "div", link_to(user.name, user_path(user)), :class => "project_avatar_name" %></strong>
</td>
</tr>
<tr> <tr>
<!-- added by bai 区分了个人列表里的项目与课程 --> <!-- added by bai 区分了个人列表里的项目与课程 -->
<td colspan="2" width="580px" ><p class="font_description"> <td colspan="2" width="580px"><p class="font_description">
<% unless user.memberships.empty? %> <% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %> <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %> <% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %> <%= l(:label_x_contribute_to, :count => memberships.count) %>
<% for member in memberships %> <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %> <% end %>
<% end %> <% end %>
</p> </p>
<p class="font_description">
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p>
</td>
</tr>
<!-- end -->
<tr> <p class="font_description">
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %> <% unless user.memberships.empty? %>
</td> <% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
</tr> <% memberships = user.memberships.all(:conditions => cond) %>
</table></td> <%= l(:label_x_course_contribute_to, :count => memberships.count) %>
</tr> <% for member in memberships %>
</table></li></ul> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %> <% end %>
<% end %>
</p>
</td>
</tr>
<!-- end -->
<tr>
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
</td>
</tr>
</table>
</td>
</tr>
</table>
</li>
</ul>
<% end %>
</div> </div>
Loading…
Cancel
Save