修改作业、项目、用户base的主页链接

This commit is contained in:
sw 2014-11-26 14:46:08 +08:00
parent ff93a62685
commit 54ffd59eaf
3 changed files with 100 additions and 44 deletions

View File

@ -46,15 +46,16 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
高校课程实践社区
</a>
</td>
<td style="width: auto; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %></a>
</td>
<td>
<p class="top-content-list-homework"><%= link_to "主页", home_path %>
>

View File

@ -30,8 +30,14 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">软件项目托管社区</td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_name%>" style="color: #15bccf;">
软件项目托管社区
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px">
<div class="top-content-search">
<%= form_tag(projects_search_path, :method => :get) do %>
@ -43,8 +49,12 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to @project, project_path(@project) %></p></td>
<td>
<p class="top-content-list">
<%=link_to l(:label_home),home_path %> >
<%=link_to @project, project_path(@project) %>
</p>
</td>
</tr>
</table>
</div>
@ -54,7 +64,9 @@
<% @project = Project.find_by_id(@project.id)%>
<table>
<tr>
<td><%= image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
<td>
<%= image_tag(url_to_avatar(@project), :class => 'avatar2') %>
</td>
<td>
<div class="info-course">
<%= link_to @project.name, project_path(@project)%>
@ -86,15 +98,26 @@
<% @project.versions.each do |version| %>
<% files_count += version.attachments.count %>
<% end %>
<td class="font_index"><%=link_to "#{@project.members.count}", project_member_path(@project) %></td>
<td class="font_index"><%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %></td>
<td class="font_index"><%=link_to "#{@project.issues.count}", project_issues_path(@project) %></td>
<!-- <td class="font_index"><%=link_to files_count, project_files_path(@project) %></td> -->
<td class="font_index">
<%=link_to "#{@project.members.count}", project_member_path(@project) %>
</td>
<td class="font_index">
<%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %>
</td>
<td class="font_index">
<%=link_to "#{@project.issues.count}", project_issues_path(@project) %>
</td>
</tr>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_member) %></td>
<td align="center" width="100px"><%= l(:label_user_watchered) %></td>
<td align="center" width="70px"> <%= l(:label_project_issues) %></td>
<td align="center" width="70px">
<%= l(:label_member) %>
</td>
<td align="center" width="100px">
<%= l(:label_user_watchered) %>
</td>
<td align="center" width="70px">
<%= l(:label_project_issues) %>
</td>
<!-- <td align="center" width="58px"><%#= l(:label_attachment) %></td> -->
</tr>
</table>
@ -109,7 +132,10 @@
<%= textilizable @project.description %>
</div>
<div class="created_on_project">
<strong style="color: #15bccf"><%= l(:label_create_time) %></strong><%= format_time(@project.created_on) %>
<strong style="color: #15bccf">
<%= l(:label_create_time) %>
</strong>
<%= format_time(@project.created_on) %>
</div>
</div>
<div class="user_underline"></div>

View File

@ -101,8 +101,12 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 238px; color: #15bccf"><%= l(:label_user_home) %></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 238px; color: #15bccf" rowspan="2">
<%= l(:label_user_home) %>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px">
<div class="top-content-search <%='hidden' if show_search_bar(params) %>">
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
@ -113,12 +117,11 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
</td>
<td>
<%=link_to "主页", home_path %> >
<span><%=link_to @user.name, user_path %></span>
<span>
<%=link_to @user.name, user_path %>
</span>
</td>
</tr>
</table>
@ -131,23 +134,28 @@
<div class="inf_user_image">
<table>
<tr>
<td align="left" valign="middle" ><%= image_tag(url_to_avatar(@user), :class => 'avatar2') %></td>
<td align="left" valign="middle" >
<%= image_tag(url_to_avatar(@user), :class => 'avatar2') %>
</td>
<td>
<table>
<tr>
<!-- added by bai -->
<!-- modified by zjc 姓名添加超链接 -->
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= link_to h (@user.name) %>
<%= image_tag(gender_avatar_uri(@user), weight:"25px", height:"25px") if (@user.user_extensions && (@user.user_extensions.identity != 2) )%></td>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all">
<%= link_to h (@user.name) %>
<%= image_tag(gender_avatar_uri(@user), weight:"25px", height:"25px") if (@user.user_extensions && (@user.user_extensions.identity != 2) )%>
</td>
</tr>
<tr>
<td align="center"> <% unless User.current == @user %>
<%= watcher_link(@user, User.current) %>
<% else %>
<%= link_to(l(:label_user_edit), my_account_path(@user)) if User.current %>
<% end %></td>
<td align="center">
<% unless User.current == @user %>
<%= watcher_link(@user, User.current) %>
<% else %>
<%= link_to(l(:label_user_edit), my_account_path(@user)) if User.current %>
<% end %>
</td>
</tr>
<tr>
<td class="score">
<div id="score_div">
@ -156,8 +164,8 @@
</td>
</tr>
<!-- end -->
</table></td>
</table>
</td>
</tr>
</table>
<div>
@ -228,29 +236,42 @@
<% unless @user.user_extensions.nil? %>
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
<tr>
<td style="padding-left: 5px" width="70px"><%= l(:field_occupation) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<% unless @user.user_extensions.school.nil? %>
<a href="http://course.trustie.net/?school_id=<%= @user.user_extensions.school.id%>"><%= @user.user_extensions.school.name %></a>
<% end %>
</td>
</td>
</tr>
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style="padding-left: 5px" width="70px"><%= l(:field_occupation) %></td>
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.occupation %>
</td>
</td>
</tr>
<% elsif @user.user_extensions.identity == 2 %>
<tr>
<td style="padding-left: 18px" width="70px"><%= l(:label_company_name) %></td>
<td style="padding-left: 18px" width="70px">
<%= l(:label_company_name) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.firstname %>
</td>
</tr>
<% end %>
<tr>
<td style="padding-left: 31px" width="76px"><%= l(:label_location) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %><%= @user.user_extensions.location_city %></td>
<td style="padding-left: 31px" width="76px">
<%= l(:label_location) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.location %>
<%= @user.user_extensions.location_city %>
</td>
</tr>
<tr>
<% if @user.user_extensions.identity == 0 %>
@ -307,7 +328,9 @@
<div class="user_underline"></div>
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_user_watcher) %></strong>
<strong>
<%= l(:label_user_watcher) %>
</strong>
<% if show_more_watchers?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
@ -318,7 +341,9 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"> <%= show_watcher_profile(@user) %> </td>
<td style="padding-top: 5px">
<%= show_watcher_profile(@user) %>
</td>
</tr>
</table>
</div>
@ -327,7 +352,9 @@
<!--fans-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></strong>
<strong>
<%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %>
</strong>
<% if show_more_fans?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
@ -337,7 +364,9 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"> <%= show_fans_picture(@user) %> </td>
<td style="padding-top: 5px">
<%= show_fans_picture(@user) %>
</td>
</tr>
</table>
</div>