modify shoew of project
This commit is contained in:
parent
d71890526b
commit
607eb2c2ff
|
@ -544,7 +544,8 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def watch_projects
|
def watch_projects
|
||||||
@watch_type = Watcher.visible.where("watchable_type = ? and user_id = ?", 'Project', @user.id)
|
@watch_type = Watcher.where("watchable_type = ? and user_id = ?", 'Project', @user.id)
|
||||||
|
#@project = Project.visible.where("project_type < ?", 1)
|
||||||
@watch_projects = []
|
@watch_projects = []
|
||||||
unless @watch_type.nil?
|
unless @watch_type.nil?
|
||||||
@watch_type.each do |obj|
|
@watch_type.each do |obj|
|
||||||
|
|
|
@ -1426,4 +1426,7 @@ module ApplicationHelper
|
||||||
def stringCut240(str)
|
def stringCut240(str)
|
||||||
(str.length > 240) ? (str[0,240]<<"......") : str
|
(str.length > 240) ? (str[0,240]<<"......") : str
|
||||||
end
|
end
|
||||||
|
def truncate_at_line_break(str, length = 240)
|
||||||
|
str.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,59 +3,7 @@
|
||||||
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- <div id="activity">
|
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
|
||||||
<h3><%= format_activity_day(day) %></h3>
|
|
||||||
<dl>
|
|
||||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
|
||||||
<dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
|
|
||||||
<%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
|
|
||||||
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
|
||||||
<%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
|
|
||||||
<%= link_to format_activity_title(e.event_title), e.event_url %>
|
|
||||||
</dt>
|
|
||||||
<dd class="<%= "grouped" if in_group %>"><span class="description"><%= format_activity_description(e.event_description) %></span>
|
|
||||||
<span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd>
|
|
||||||
<% end -%>
|
|
||||||
</dl>
|
|
||||||
<% end -%>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <div id="activity">
|
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
|
||||||
<h3><%= format_activity_day(day) %></h3>
|
|
||||||
<div>
|
|
||||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
|
||||||
<div class="issue-note">
|
|
||||||
<!-- <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> -->
|
|
||||||
<!--<div class="img-activity">
|
|
||||||
<%= tag('img', {:src => 'http://localhost:3000/images/12_50.png', :class => 'img-ta2'}, false, false) %>
|
|
||||||
</div>
|
|
||||||
<div class="<%= "grouped" if in_group %>">
|
|
||||||
<div class="description">
|
|
||||||
<%= format_activity_description(e.event_description) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="activity-info">
|
|
||||||
<div class="time">
|
|
||||||
<span>时间: </span><%= format_time(e.event_datetime, false) %>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<span>主题: </span><span class="project-name"><%= h(e.project) if @project.nil? || @project != e.project %></span>
|
|
||||||
<%= link_to format_activity_title(e.event_title), e.event_url %>
|
|
||||||
</div>
|
|
||||||
<div class="author">
|
|
||||||
<span>作者: </span><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
|
||||||
</div>
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<% end -%>
|
|
||||||
</div>
|
|
||||||
<% end -%>
|
|
||||||
</div>-->
|
|
||||||
<!--add by huang-->
|
|
||||||
<div id="activity">
|
<div id="activity">
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||||
<h3></h3>
|
<h3></h3>
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
<% @project = Project.find_by_id(@project.id) %>
|
<% @project = Project.find_by_id(@project.id) %>
|
||||||
<% @course = Course.find_by_extra(@project.identifier) %>
|
<% @course = Course.find_by_extra(@project.identifier) %>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr><td>
|
||||||
<td><% if(@project.project_type==1) %>
|
<% if(@project.project_type==1) %>
|
||||||
<% if get_avatar?(@project) %>
|
<% if get_avatar?(@project) %>
|
||||||
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<% end %> </td>
|
<% end %> </td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<div class="info_font" style=" word-wrap: break-word; word-break: break-all">
|
<div class="info_font" style=" word-wrap: break-word; word-break: break-all">
|
||||||
<%= @project.name %>
|
<span aligm="left"><%= @project.name %></span>
|
||||||
</div>
|
</div>
|
||||||
<%if User.current.logged? %>
|
<%if User.current.logged? %>
|
||||||
<% if @course.teacher.id == User.current.id %>
|
<% if @course.teacher.id == User.current.id %>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/courses", :controller => 'projects', :action => 'course'%></a></td>
|
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/courses", :controller => 'projects', :action => 'course'%></a></td>
|
||||||
<td ><%=link_to "主页", home_path %> > <%=link_to "实践课程", :controller => 'projects', :action => 'course' %> >
|
<td ><%=link_to "主页", home_path %> > <%=link_to "实践课程", :controller => 'projects', :action => 'course' %> >
|
||||||
<span><%= link_to(@bid.courses.first.name.slice(0..6), project_path(@bid.courses.first)) %></span> >
|
<span><%= link_to(@bid.courses.first.name,project_path(@bid.courses.first)) %></span> >
|
||||||
<%=link_to(@bid.name, respond_path(@bid))%></td>
|
<%=link_to(@bid.name, respond_path(@bid))%></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 70px" >课程名:</td>
|
<td style="width: 70px" >课程名:</td>
|
||||||
<td>
|
<td>
|
||||||
<span style=" word-wrap: break-word; word-break: break-all"><strong> <%= link_to @bid.courses.first.name.slice(0..6), project_path(@bid.courses.first) %></strong></span>
|
<span style=" word-wrap: break-word; word-break: break-all"><strong> <%= link_to @bid.courses.first.name,project_path(@bid.courses.first) %></strong></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="">
|
<tr style="">
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<%= view_layouts_base_sidebar_hook_response %>
|
<%= view_layouts_base_sidebar_hook_response %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content">
|
<div id="content_tag">
|
||||||
<%= render_flash_messages %>
|
<%= render_flash_messages %>
|
||||||
<%= yield :content%>
|
<%= yield :content%>
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<%= call_hook :view_layouts_base_content %>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" >
|
<td colspan="2" width="580px" >
|
||||||
<p class="font_description">
|
<p class="font_description">
|
||||||
<%= textilizable( truncate(e.event_description, :length => 240)) %>
|
<%= textilizable(truncate(e.event_description, :length => 68)) %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -27,9 +27,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
||||||
<% else %>
|
<% else %>
|
||||||
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Put your Redmine plugins here.
|
|
|
@ -295,7 +295,11 @@ ul.tool li{list-style-type:none;
|
||||||
color:#acaeb1;
|
color:#acaeb1;
|
||||||
font-size:13px;
|
font-size:13px;
|
||||||
}
|
}
|
||||||
|
.font_lighter_e{
|
||||||
|
width: 700px;
|
||||||
|
color:#acaeb1;
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
.font_lighter2{
|
.font_lighter2{
|
||||||
font-family:'微软雅黑';
|
font-family:'微软雅黑';
|
||||||
color:#9a9a9a;
|
color:#9a9a9a;
|
||||||
|
|
|
@ -439,6 +439,13 @@ ul.projects li.root
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content_tag
|
||||||
|
{
|
||||||
|
width:640px;
|
||||||
|
float:right;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
#content .wiki img
|
#content .wiki img
|
||||||
{
|
{
|
||||||
max-width:98%
|
max-width:98%
|
||||||
|
|
Loading…
Reference in New Issue