Merge remote-tracking branch 'remotes/origin/szzh' into develop
This commit is contained in:
commit
dd396a6da2
|
@ -60,7 +60,7 @@ class AttachmentsController < ApplicationController
|
||||||
:disposition => (@attachment.image? ? 'inline' : 'attachment')
|
:disposition => (@attachment.image? ? 'inline' : 'attachment')
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
redirect_to "http://forge.trustie.net/file_not_found.html"
|
redirect_to "http://" + (Setting.host_name.to_s) +"/file_not_found.html"
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新资源文件类型
|
#更新资源文件类型
|
||||||
|
|
|
@ -55,7 +55,7 @@ class AvatarController < ApplicationController
|
||||||
# saved = @avatar.save
|
# saved = @avatar.save
|
||||||
begin
|
begin
|
||||||
f = Magick::ImageList.new(diskfile)
|
f = Magick::ImageList.new(diskfile)
|
||||||
width = 300.0;
|
width = 300.0
|
||||||
proportion = (width/f[0].columns)
|
proportion = (width/f[0].columns)
|
||||||
height = (f[0].rows*proportion)
|
height = (f[0].rows*proportion)
|
||||||
f.resize_to_fill!(width,height)
|
f.resize_to_fill!(width,height)
|
||||||
|
|
|
@ -28,6 +28,9 @@ class ContestsController < ApplicationController
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||||
@contests = Contest.visible
|
@contests = Contest.visible
|
||||||
@contests = @contests.like(params[:name]) if params[:name].present?
|
@contests = @contests.like(params[:name]) if params[:name].present?
|
||||||
|
if params[:contests_search]
|
||||||
|
(redirect_to contests_path, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||||
|
end
|
||||||
@contest_count = @contests.count
|
@contest_count = @contests.count
|
||||||
@contest_pages = Paginator.new @contest_count, @limit, params['page']
|
@contest_pages = Paginator.new @contest_count, @limit, params['page']
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,8 @@ class CoursesController < ApplicationController
|
||||||
# add by nwb
|
# add by nwb
|
||||||
def search
|
def search
|
||||||
courses_all = Course.all_course
|
courses_all = Course.all_course
|
||||||
|
name = params[:name]
|
||||||
|
(redirect_to courses_path, :notice => l(:label_sumbit_empty);return) if name.blank?
|
||||||
@courses = courses_all.visible
|
@courses = courses_all.visible
|
||||||
if params[:name].present?
|
if params[:name].present?
|
||||||
@courses_all = @courses.like(params[:name])
|
@courses_all = @courses.like(params[:name])
|
||||||
|
|
|
@ -129,6 +129,7 @@ class ForumsController < ApplicationController
|
||||||
format.html { redirect_to @forum, notice: l(:label_forum_create_succ) }
|
format.html { redirect_to @forum, notice: l(:label_forum_create_succ) }
|
||||||
format.json { render json: @forum, status: :created, location: @forum }
|
format.json { render json: @forum, status: :created, location: @forum }
|
||||||
else
|
else
|
||||||
|
flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}"
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
||||||
end
|
end
|
||||||
|
@ -165,6 +166,8 @@ class ForumsController < ApplicationController
|
||||||
|
|
||||||
def search_forum
|
def search_forum
|
||||||
# @forums = paginateHelper Forum.where("name LIKE '%#{params[:name]}%'")
|
# @forums = paginateHelper Forum.where("name LIKE '%#{params[:name]}%'")
|
||||||
|
name = params[:name]
|
||||||
|
(redirect_to forums_path, :notice => l(:label_sumbit_empty);return) if name.blank?
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||||
@forums_all = Forum.where("name LIKE '%#{params[:name]}%'")
|
@forums_all = Forum.where("name LIKE '%#{params[:name]}%'")
|
||||||
@forums_count = @forums_all.count
|
@forums_count = @forums_all.count
|
||||||
|
|
|
@ -42,7 +42,7 @@ class ProjectsController < ApplicationController
|
||||||
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
||||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
||||||
before_filter :file, :statistics, :watcherlist
|
before_filter :file, :statistics, :watcherlist
|
||||||
|
before_filter :find_project_repository, :only => [:show]
|
||||||
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
||||||
before_filter :memberAccess, only: :member
|
before_filter :memberAccess, only: :member
|
||||||
|
|
||||||
|
@ -78,6 +78,14 @@ class ProjectsController < ApplicationController
|
||||||
### added by william
|
### added by william
|
||||||
include ActsAsTaggableOn::TagsHelper
|
include ActsAsTaggableOn::TagsHelper
|
||||||
|
|
||||||
|
def find_project_repository
|
||||||
|
unless @project.repositories.nil?
|
||||||
|
@project.repositories.each do |repository|
|
||||||
|
repository.fetch_changesets if Setting.autofetch_changesets?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def enterprise_course
|
def enterprise_course
|
||||||
session[:enterprise_college] = 2
|
session[:enterprise_college] = 2
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -373,7 +373,7 @@ class UsersController < ApplicationController
|
||||||
def search
|
def search
|
||||||
sort_init 'login', 'asc'
|
sort_init 'login', 'asc'
|
||||||
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
||||||
|
(redirect_to users_path, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||||
case params[:format]
|
case params[:format]
|
||||||
when 'xml', 'json'
|
when 'xml', 'json'
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 15})
|
@offset, @limit = api_offset_and_limit({:limit => 15})
|
||||||
|
|
|
@ -88,7 +88,8 @@ class WelcomeController < ApplicationController
|
||||||
when :users_student
|
when :users_student
|
||||||
redirect_to users_search_path(:name => search_condition, :role => :student)
|
redirect_to users_search_path(:name => search_condition, :role => :student)
|
||||||
else
|
else
|
||||||
redirect_to home_path, :alert => l(:label_sumbit_empty)
|
#redirect_to home_path, :alert => l(:label_sumbit_empty)
|
||||||
|
(redirect_to home_path, :notice => l(:label_sumbit_empty);return) #if params[:name].blank?
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -256,8 +256,8 @@ module CoursesHelper
|
||||||
people
|
people
|
||||||
end
|
end
|
||||||
# 截至到2014-03-17 这个是最终的判断课程是否过期的方法
|
# 截至到2014-03-17 这个是最终的判断课程是否过期的方法
|
||||||
def course_endTime_timeout? project
|
def course_endTime_timeout? course
|
||||||
end_time_str = Course.find_by_extra(project.try(:extra)).try(:endup_time)
|
end_time_str = course.try(:endup_time)
|
||||||
begin
|
begin
|
||||||
cTime = Time.parse(end_time_str.to_s)
|
cTime = Time.parse(end_time_str.to_s)
|
||||||
rescue TypeError,ArgumentError
|
rescue TypeError,ArgumentError
|
||||||
|
|
|
@ -24,8 +24,9 @@ class Contest < ActiveRecord::Base
|
||||||
|
|
||||||
validates_length_of :name, :maximum => NAME_LENGTH_LIMIT
|
validates_length_of :name, :maximum => NAME_LENGTH_LIMIT
|
||||||
validates_length_of :description, :maximum => DESCRIPTION_LENGTH_LIMIT
|
validates_length_of :description, :maximum => DESCRIPTION_LENGTH_LIMIT
|
||||||
validates_presence_of :author_id, :name, :deadline
|
validates_presence_of :author_id, :name, :budget
|
||||||
validates_format_of :deadline, :with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/
|
#validates_format_of :deadline, :with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/
|
||||||
|
validates_format_of :deadline, :with =>/^[1-9][0-9]{3}\-0?[1-9]|1[12]\-0?[1-9]|[12]\d|3[01]$/
|
||||||
# validates_format_of :budget, :with => /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/
|
# validates_format_of :budget, :with => /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/
|
||||||
validate :validate_user
|
validate :validate_user
|
||||||
after_create :act_as_activity
|
after_create :act_as_activity
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Forum < ActiveRecord::Base
|
||||||
'memo_count',
|
'memo_count',
|
||||||
'last_memo_id',
|
'last_memo_id',
|
||||||
'creator_id'
|
'creator_id'
|
||||||
validates_presence_of :name, :creator_id
|
validates_presence_of :name, :creator_id, :description
|
||||||
validates_length_of :name, maximum: 50
|
validates_length_of :name, maximum: 50
|
||||||
validates_length_of :description, maximum: 255
|
validates_length_of :description, maximum: 255
|
||||||
validates :name, :uniqueness => true
|
validates :name, :uniqueness => true
|
||||||
|
|
|
@ -990,13 +990,9 @@ class Issue < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
"#{tracker} ##{id}: #{subject}"
|
"#{tracker} ##{project_index}: #{subject}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# 缺陷在项目中的序号
|
|
||||||
def inProjectIndex
|
|
||||||
(self.project.issues.index(self).to_i + 1).to_s
|
|
||||||
end
|
|
||||||
|
|
||||||
# Returns a string of css classes that apply to the issue
|
# Returns a string of css classes that apply to the issue
|
||||||
def css_classes
|
def css_classes
|
||||||
|
@ -1162,7 +1158,20 @@ class Issue < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def project_index
|
def project_index
|
||||||
|
if self.project.issues.include?(self)
|
||||||
(self.project.issues.index(self).to_i + 1).to_s
|
(self.project.issues.index(self).to_i + 1).to_s
|
||||||
|
else
|
||||||
|
issue_index = 1
|
||||||
|
self.project.issues.each do |issue|
|
||||||
|
if self.id == nil
|
||||||
|
issue_index = self.project.issues.count +1
|
||||||
|
break
|
||||||
|
elsif self.id > issue.id
|
||||||
|
issue_index = issue_index+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
issue_index.to_s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Journal < ActiveRecord::Base
|
||||||
# end
|
# end
|
||||||
attr_accessor :indice
|
attr_accessor :indice
|
||||||
|
|
||||||
acts_as_event :title =>Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.inProjectIndex}#{status}: #{o.issue.subject}" },
|
acts_as_event :title =>Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.project_index}#{status}: #{o.issue.subject}" },
|
||||||
:description =>:notes,
|
:description =>:notes,
|
||||||
:author => :user,
|
:author => :user,
|
||||||
:group => :issue,
|
:group => :issue,
|
||||||
|
|
|
@ -96,8 +96,9 @@ class Mailer < ActionMailer::Base
|
||||||
# issue_add(issue) => Mail::Message object
|
# issue_add(issue) => Mail::Message object
|
||||||
# Mailer.issue_add(issue).deliver => sends an email to issue recipients
|
# Mailer.issue_add(issue).deliver => sends an email to issue recipients
|
||||||
def issue_add(issue)
|
def issue_add(issue)
|
||||||
|
issue_id = issue.project_index
|
||||||
redmine_headers 'Project' => issue.project.identifier,
|
redmine_headers 'Project' => issue.project.identifier,
|
||||||
'Issue-Id' => (issue.project.issues.index(issue).to_i + 1).to_s,
|
'Issue-Id' => issue_id,
|
||||||
'Issue-Author' => issue.author.login
|
'Issue-Author' => issue.author.login
|
||||||
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
||||||
message_id issue
|
message_id issue
|
||||||
|
@ -108,7 +109,7 @@ class Mailer < ActionMailer::Base
|
||||||
cc = issue.watcher_recipients - recipients
|
cc = issue.watcher_recipients - recipients
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:cc => cc,
|
:cc => cc,
|
||||||
:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
|
:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds a Mail::Message object used to email recipients of the edited issue.
|
# Builds a Mail::Message object used to email recipients of the edited issue.
|
||||||
|
@ -118,8 +119,9 @@ class Mailer < ActionMailer::Base
|
||||||
# Mailer.issue_edit(journal).deliver => sends an email to issue recipients
|
# Mailer.issue_edit(journal).deliver => sends an email to issue recipients
|
||||||
def issue_edit(journal)
|
def issue_edit(journal)
|
||||||
issue = journal.journalized.reload
|
issue = journal.journalized.reload
|
||||||
|
issue_id = issue.project_index
|
||||||
redmine_headers 'Project' => issue.project.identifier,
|
redmine_headers 'Project' => issue.project.identifier,
|
||||||
'Issue-Id' => (issue.project.issues.index(issue).to_i + 1).to_s,
|
'Issue-Id' => issue_id.to_s,
|
||||||
'Issue-Author' => issue.author.login
|
'Issue-Author' => issue.author.login
|
||||||
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
||||||
message_id journal
|
message_id journal
|
||||||
|
@ -128,7 +130,7 @@ class Mailer < ActionMailer::Base
|
||||||
recipients = journal.recipients
|
recipients = journal.recipients
|
||||||
# Watchers in cc
|
# Watchers in cc
|
||||||
cc = journal.watcher_recipients - recipients
|
cc = journal.watcher_recipients - recipients
|
||||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
|
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
||||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||||
s << issue.subject
|
s << issue.subject
|
||||||
@issue = issue
|
@issue = issue
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Project < ActiveRecord::Base
|
||||||
has_many :principals, :through => :member_principals, :source => :principal
|
has_many :principals, :through => :member_principals, :source => :principal
|
||||||
has_many :enabled_modules, :dependent => :delete_all
|
has_many :enabled_modules, :dependent => :delete_all
|
||||||
has_and_belongs_to_many :trackers, :order => "#{Tracker.table_name}.position"
|
has_and_belongs_to_many :trackers, :order => "#{Tracker.table_name}.position"
|
||||||
has_many :issues, :dependent => :destroy, :include => [:status, :tracker]
|
has_many :issues, :dependent => :destroy, :include => [:status, :tracker] , :order => "id ASC"
|
||||||
has_many :issue_changes, :through => :issues, :source => :journals
|
has_many :issue_changes, :through => :issues, :source => :journals
|
||||||
has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
|
has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
|
||||||
has_many :time_entries, :dependent => :delete_all
|
has_many :time_entries, :dependent => :delete_all
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<td style="width: 50%">
|
<td style="width: 50%">
|
||||||
<div id = "what_is_project_div" style="display: none">
|
<div id = "what_is_project_div" style="display: none">
|
||||||
<p>项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。</p>
|
<p>项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。</p>
|
||||||
<p>项目托管平台:<a href="http://forge.trustie.net/">http://forge.trustie.net/</a> </p>
|
<p>项目托管平台:<%= link_to Setting.protocol + "://" + Setting.host_name + "/", home_path %> </p>
|
||||||
<%= link_to "我要创建项目",new_project_path(course: 0, project_type: 0), :target => '_blank'%>
|
<%= link_to "我要创建项目",new_project_path(course: 0, project_type: 0), :target => '_blank'%>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="project-search" style="float: right">
|
<div class="project-search" style="float: right">
|
||||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<% @admin = @course.course_infos%>
|
<% @admin = @course.course_infos%>
|
||||||
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
|
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
|
||||||
<!-- <%= @admin.first.user.user_extensions.occupation %> -->
|
<!-- <%= @admin.first.user.user_extensions.occupation %> -->
|
||||||
<%# unless @course.course_extra.school.nil? %>
|
<% unless @course.teacher.user_extensions.school.nil? %>
|
||||||
<%= @course.teacher.user_extensions.school.try(:name) %>
|
<%= link_to @course.teacher.user_extensions.school.try(:name), school_course_list_path(@course.teacher.user_extensions.school) %>
|
||||||
<%# end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p >
|
<p >
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
||||||
<table width="940px">
|
<table width="940px">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_all) %></td>
|
||||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
<% if User.current.logged?%>
|
<% if User.current.logged?%>
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/course", :controller => 'courses', :action => 'index', :course_type => 1 %> </a></td>
|
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %> </a></td>
|
||||||
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index', :course_type => 1 %></td>
|
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_all), :controller => 'courses', :action => 'index' %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/courses", :controller => 'courses', :action => 'index'%> </a></td>
|
<td style="padding-left: 8px"><a><%= link_to request.host() + "/courses", :controller => 'courses', :action => 'index'%> </a></td>
|
||||||
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %></td>
|
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</td>
|
</td>
|
||||||
<% if e.event_type == "issue" %>
|
<% if e.event_type == "issue" %>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
|
<span> <%= link_to l(:label_find_all_comments), issue_path(e.id) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<strong> !</strong></td>
|
<strong> !</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font_lighter" style="float: right"><%= l :label_update_time %>
|
<td class="font_lighter" style="float: right"><%= l :label_create_time %>
|
||||||
: <%= format_time(@course.created_at) %>
|
: <%= format_time(@course.created_at) %>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||||
<%= labelled_form_for(@forum) do |f| %>
|
<%= labelled_form_for(@forum) do |f| %>
|
||||||
<% if @forum.errors.any? %>
|
<% if @forum.errors.any? %>
|
||||||
<div id="error_explanation">
|
<!--<div id="error_explanation">
|
||||||
<h2><%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<% @forum.errors.full_messages.each do |msg| %>
|
<#% @forum.errors.full_messages.each do |msg| %>
|
||||||
<li><%= msg %></li>
|
<li><#%= msg %></li>
|
||||||
<% end %>
|
<#% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div> -->
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="actions" style="margin:10px">
|
<div class="actions" style="margin:10px">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -3,17 +3,17 @@
|
||||||
<h3><%=l(:label_memo_new)%></h3>
|
<h3><%=l(:label_memo_new)%></h3>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
||||||
<% if @memo.errors.any? %>
|
<!--<#% if @memo.errors.any? %>
|
||||||
<div id="error_explanation">
|
<div id="error_explanation">
|
||||||
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
<h2><#%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<% @memo.errors.full_messages.each do |msg| %>
|
<#% @memo.errors.full_messages.each do |msg| %>
|
||||||
<li><%= msg %></li>
|
<li><#%= msg %></li>
|
||||||
<% end %>
|
<#% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<#% end %> -->
|
||||||
<div class="actions" style="max-width:680px">
|
<div class="actions" style="max-width:680px">
|
||||||
<p><%= f.text_field :subject, :required => true%></p>
|
<p><%= f.text_field :subject, :required => true%></p>
|
||||||
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
||||||
|
|
|
@ -143,7 +143,7 @@ body table tr td span6 {
|
||||||
<td><p >在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置</p></td>
|
<td><p >在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,<span5> 其中的name和email要和forge.trustie.net上的登陆名和邮箱保持一致</span5>
|
<td align="left">Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,<span5> 其中的name和email要和<%= Setting.host_name %>上的登陆名和邮箱保持一致</span5>
|
||||||
,方便代码贡献统计 )。 </td>
|
,方便代码贡献统计 )。 </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -313,7 +313,7 @@ body table tr td span6 {
|
||||||
<td><p ><span>$git config --global user.name “your_name”</span></p>
|
<td><p ><span>$git config --global user.name “your_name”</span></p>
|
||||||
<p><span>$git config --global user.email “your_email” </span> </p>
|
<p><span>$git config --global user.email “your_email” </span> </p>
|
||||||
<p>Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,
|
<p>Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,
|
||||||
<span5> 其中的name和email要和forge.trustie.net上的登陆名和密码保持一致</span5>
|
<span5> 其中的name和email要和<%= Setting.host_name %>上的登陆名和密码保持一致</span5>
|
||||||
,方便代码贡献统计 )。</p></td>
|
,方便代码贡献统计 )。</p></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -143,7 +143,7 @@ body table tr td span6 {
|
||||||
<table width="900" border="0">
|
<table width="900" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><p>Right-click on the desktop and select the "Settings" in the "TortoiseGit"</p>
|
<td><p>Right-click on the desktop and select the "Settings" in the "TortoiseGit"</p>
|
||||||
<p>User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository, <span5> the name and email must be the same with login name and email you registed in the forge.trustie.net</span5>
|
<p>User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository, <span5> the name and email must be the same with login name and email you registed in the <%= Setting.host_name %></span5>
|
||||||
). </p>
|
). </p>
|
||||||
<p>Then you can customize the "Context Menu":</p>
|
<p>Then you can customize the "Context Menu":</p>
|
||||||
<p>Please check the "<span>Clone</span>","<span>Sync</span>" and "<span>Commit</span>" options in the "<span>Context Menu</span>",</p>
|
<p>Please check the "<span>Clone</span>","<span>Sync</span>" and "<span>Commit</span>" options in the "<span>Context Menu</span>",</p>
|
||||||
|
@ -306,7 +306,7 @@ body table tr td span6 {
|
||||||
<td><p><span>$git config --global user.name “your_name”M</span></p>
|
<td><p><span>$git config --global user.name “your_name”M</span></p>
|
||||||
<p><span>$git config --global user.email “your_email”</span> </p>
|
<p><span>$git config --global user.email “your_email”</span> </p>
|
||||||
<p>User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository,
|
<p>User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository,
|
||||||
<span5> the name and email must be the same with login name and email you registed in the forge.trustie.net</span5>
|
<span5> the name and email must be the same with login name and email you registed in the <%= Setting.host_name %></span5>
|
||||||
). </p></td>
|
). </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -14,5 +14,5 @@
|
||||||
|
|
||||||
<%= watcher_link(@issue, User.current) %>
|
<%= watcher_link(@issue, User.current) %>
|
||||||
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
|
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
|
||||||
<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
|
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,11 +28,12 @@
|
||||||
<ul class="issue_list">
|
<ul class="issue_list">
|
||||||
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
|
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
|
||||||
<ul class="list-group-item-meta">
|
<ul class="list-group-item-meta">
|
||||||
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span><%= l(:label_post_on)%> <% a = [] %>
|
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span>
|
||||||
|
<%= l(:label_post_on)%> <% a = [] %>
|
||||||
<% a << column_content[1] %>
|
<% a << column_content[1] %>
|
||||||
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
||||||
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
||||||
<%= link_to a.join(' '), issue_path(issue), :class => "issue-link" %>
|
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
|
||||||
</ul>
|
</ul>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<ul class="list-group-item-meta">
|
<ul class="list-group-item-meta">
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
|
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
|
||||||
<div class="find-comment-class">
|
<div class="find-comment-class">
|
||||||
<span><%= link_to l(:label_find_all_comments), issue_path(issue) %></span><%= l(:label_comments_count, :count => issue.journals.all.count) %>
|
<span><%= link_to l(:label_find_all_comments), issue_path(issue.id) %></span><%= l(:label_comments_count, :count => issue.journals.all.count) %>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
<tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
|
<tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
|
||||||
<td class="id">
|
<td class="id">
|
||||||
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
|
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
|
||||||
<%= link_to issue.id, issue_path(issue) %>
|
<%= link_to issue.id, issue_path(issue.id) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="project"><%= link_to_project(issue.project) %></td>
|
<td class="project"><%= link_to_project(issue.project) %></td>
|
||||||
<td class="tracker"><%=h issue.tracker %></td>
|
<td class="tracker"><%=h issue.tracker %></td>
|
||||||
<td class="subject">
|
<td class="subject">
|
||||||
<%= link_to truncate(issue.subject, :length => 60), issue_path(issue) %> (<%=h issue.status %>)
|
<%= link_to truncate(issue.subject, :length => 60), issue_path(issue.id) %> (<%=h issue.status %>)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<span class="footer_text_link"><%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
|
<span class="footer_text_link"><%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
|
||||||
<span class="footer_text_link"><%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
|
<span class="footer_text_link"><%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
|
||||||
<span id="copyright"><%=l(:label_copyright)%>@2007~2014</span>
|
<span id="copyright"><%=l(:label_copyright)%>@2007~2014</span>
|
||||||
<span id="contact_us" class="footer_text_link"><%= link_to l(:label_contact_us),"http://forge.trustie.net/projects/2/member", :target=>"_blank" %></span>
|
<span id="contact_us" class="footer_text_link"><%= link_to l(:label_contact_us),"http://" + Setting.host_name + "/projects/2/member", :target=>"_blank" %></span>
|
||||||
<span id="record"class="footer_text_link"><%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %></span>
|
<span id="record"class="footer_text_link"><%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %></span>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -41,10 +41,25 @@
|
||||||
<%=link_to_user(User.current)%>
|
<%=link_to_user(User.current)%>
|
||||||
<ul class="sub_menu">
|
<ul class="sub_menu">
|
||||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||||
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li>
|
<li id="course_loggedas_li"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %>
|
||||||
|
<ul class="course_sub_menu">
|
||||||
|
<% User.current.courses.each do |course| %>
|
||||||
|
<% if !course_endTime_timeout?(course) %>
|
||||||
|
<li><%= link_to course.name, course_path(course) %></li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li>
|
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||||
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li>
|
<ul class="project_sub_menu">
|
||||||
|
<% User.current.projects.each do |project| %>
|
||||||
|
<li><%= link_to project.name, project_path(project) %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||||
|
@ -77,11 +92,40 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addProjectSlipMenu () {
|
||||||
|
var loggedas = $('#project_loggedas_li')
|
||||||
|
var project_sub_menu = $('.project_sub_menu')
|
||||||
|
var course_sub_menu = $('.course_sub_menu')
|
||||||
|
loggedas.mouseenter(function(event) {
|
||||||
|
course_sub_menu.hide();
|
||||||
|
project_sub_menu.show();
|
||||||
|
});
|
||||||
|
project_sub_menu.mouseleave(function(event) {
|
||||||
|
project_sub_menu.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function addCourseSlipMenu () {
|
||||||
|
var loggedas = $('#course_loggedas_li')
|
||||||
|
var project_sub_menu = $('.project_sub_menu')
|
||||||
|
var course_sub_menu = $('.course_sub_menu')
|
||||||
|
loggedas.mouseenter(function(event) {
|
||||||
|
project_sub_menu.hide();
|
||||||
|
course_sub_menu.show();
|
||||||
|
});
|
||||||
|
course_sub_menu.mouseleave(function(event) {
|
||||||
|
course_sub_menu.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
addSlipMenu();
|
addSlipMenu();
|
||||||
|
addProjectSlipMenu ();
|
||||||
|
addCourseSlipMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
$('.sub_menu').find("a").attr('target', '_blank');
|
$('.sub_menu').find("a").attr('target', '_blank');
|
||||||
|
$('.project_sub_menu').find("a").attr('target', '_blank');
|
||||||
|
$('.course_sub_menu').find("a").attr('target', '_blank');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
主办单位:
|
主办单位:
|
||||||
<%= link_to "国防科学技术大学并行与分布处理国家重点实验室","http://www.nudt.edu.cn/ArticleShow.asp?ID=47"%>
|
<%= link_to "国防科学技术大学并行与分布处理国家重点实验室","http://www.nudt.edu.cn/ArticleShow.asp?ID=47"%>
|
||||||
<%= link_to "计算机科学与技术系", "http://www.nudt.edu.cn/ArticleShow.asp?ID=41"%>
|
<%= link_to "计算机科学与技术系", "http://www.nudt.edu.cn/ArticleShow.asp?ID=41"%>
|
||||||
<%= link_to "联系我们","http://forge.trustie.net/projects/2/member"%>
|
<%= link_to "联系我们","http://" + Setting.host_name + "/projects/2/member"%>
|
||||||
<%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/"%>
|
<%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<h1><%= link_to(h("#{issue.tracker.name} ##{issue.id}: #{issue.subject}"), issue_url) %></h1>
|
<h1><%= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><%=l(:field_author)%>: <%=h issue.author %></li>
|
<li><%=l(:field_author)%>: <%=h issue.author %></li>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %>
|
<%= "#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}" %>
|
||||||
<%= issue_url %>
|
<%= issue_url %>
|
||||||
|
|
||||||
* <%=l(:field_author)%>: <%= issue.author %>
|
* <%=l(:field_author)%>: <%= issue.author %>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %>
|
<%= l(:text_issue_added, :id => "##{@issue.project_index}", :author => h(@issue.author)) %>
|
||||||
<hr />
|
<hr />
|
||||||
<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => @issue.author) %>
|
<%= l(:text_issue_added, :id => "##{@issue.project_index}", :author => @issue.author) %>
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %>
|
<%= l(:text_issue_updated, :id => "##{@issue.project_index}", :author => h(@journal.user)) %>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<% details_to_strings(@journal.details, false, :only_path => false).each do |string| %>
|
<% details_to_strings(@journal.details, false, :only_path => false).each do |string| %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
|
<%= l(:text_issue_updated, :id => "##{@issue.project_index}", :author => @journal.user) %>
|
||||||
|
|
||||||
<% details_to_strings(@journal.details, true).each do |string| -%>
|
<% details_to_strings(@journal.details, true).each do |string| -%>
|
||||||
<%= string %>
|
<%= string %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
||||||
<div><%= @message %></div>
|
<div><%= @message %></div>
|
||||||
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
||||||
<h4><%= link_to(l(:lable_not_receive_mail),"http://forge.trustie.net/my/account")%></h4>
|
<h4><%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></h4>
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,16 @@
|
||||||
|
|
||||||
<div class="box ph10_5">
|
<div class="box ph10_5">
|
||||||
<!--[form:message]-->
|
<!--[form:message]-->
|
||||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br />
|
<% unless replying %>
|
||||||
<%= f.text_field :subject,:size => 60, :style => "width: 99%;", :id => "message_subject",:readonly=>true %><!--by young-->
|
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||||
</p>
|
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %><!--by young-->
|
||||||
<p>
|
</p>
|
||||||
|
<% else %>
|
||||||
|
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||||
|
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
<p>
|
||||||
<% unless replying %>
|
<% unless replying %>
|
||||||
<% if @message.safe_attribute? 'sticky' %>
|
<% if @message.safe_attribute? 'sticky' %>
|
||||||
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/projects", :controller => 'projects', :action => 'course', :project_type => 1 %> </a></td>
|
<td style="padding-left: 8px"><a><%= link_to request.host() + "/projects", :controller => 'projects', :action => 'course', :project_type => 1 %> </a></td>
|
||||||
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course', :project_type => 1 %></td>
|
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course', :project_type => 1 %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -1,91 +1,77 @@
|
||||||
<% if @events_by_day.size >0 %>
|
<% if @events_by_day.size >0 %>
|
||||||
<div class="content-title-top-avtive">
|
<div class="content-title-top-avtive">
|
||||||
<!-- <h3><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h3> -->
|
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
<%= 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>
|
||||||
|
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||||
<div>
|
|
||||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
||||||
<div>
|
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||||
<table class="underline-evreycontent" style="font-size: 14px;">
|
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||||
<tr>
|
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%>
|
||||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%></td>
|
</div>
|
||||||
<td>
|
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||||
<table width="580px" border="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
||||||
<span class="font_lighter">
|
<span class="activity-title font_lighter">
|
||||||
<% if @canShowRealName %>
|
<% if @canShowRealName %>
|
||||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>)
|
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>)
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= l(:label_new_activity) %> </span>
|
<%= l(:label_new_activity) %>
|
||||||
|
</span>
|
||||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="activity_description info-break" style="font-size: 13px;">
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580px" >
|
|
||||||
<p class="info-break">
|
|
||||||
<%= h(truncate(strip_tags(e.event_description).gsub(/ /,' '), length: 30, omission:'...')) %>
|
<%= h(truncate(strip_tags(e.event_description).gsub(/ /,' '), length: 30, omission:'...')) %>
|
||||||
</p></td>
|
</div>
|
||||||
</tr>
|
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||||
<tr>
|
<span class="font_lighter"> <%= l :label_activity_time %>: <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></span>
|
||||||
<td align="left"><span class="font_lighter"> <%= l :label_activity_time %>: <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></span></td>
|
|
||||||
<% if e.event_type == "issue" %>
|
<% if e.event_type == "issue" %>
|
||||||
<td align="right"><span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count)%></span></td>
|
<div class="" style="display:inline-block;position:absolute; right:2%;">
|
||||||
|
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count)%></span>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</div>
|
||||||
</table></td>
|
</div>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if(@events_pages.page == @events_pages.last_page) %>
|
||||||
|
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||||
|
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||||
|
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||||
|
<span class="activity-title font_lighter">
|
||||||
<div class="font_description">
|
<% if @canShowRealName %>
|
||||||
<table width="660">
|
|
||||||
<tr>
|
|
||||||
<td><%= image_tag(url_to_avatar(@user), :class => "avatar") %></td>
|
|
||||||
<td colspan="2">
|
|
||||||
<table width="580">
|
|
||||||
<tr>
|
|
||||||
<td >
|
|
||||||
<%
|
|
||||||
#判断是否显示真名
|
|
||||||
if @canShowRealName
|
|
||||||
%>
|
|
||||||
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>)
|
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>)
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>
|
<%= link_to (h @user.try(:name)), user_path(@user) if @user %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= l(:label_user_create_project) %> <%= link_to @project.name %><strong> !</strong></td>
|
<%#= l(:label_new_activity) %>
|
||||||
</tr>
|
</span>
|
||||||
<tr>
|
<%= l(:label_user_create_project) %> <%= link_to @project.name %><strong> !</strong>
|
||||||
<td class="font_lighter" style="float: right"><%= l :label_update_time %>: <%= format_time(@project.created_on) %>
|
<div class="activity_description info-break" style="font-size: 13px;">
|
||||||
</table></td>
|
</div>
|
||||||
</tr>
|
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||||
</table>
|
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul>
|
<ul>
|
||||||
<%= pagination_links_full @events_pages%>
|
<%= pagination_links_full @events_pages%>
|
||||||
|
<% #binding.pry %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="linkother">
|
<div class="linkother">
|
||||||
<a href="http://forge.trustie.net" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
|
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
|
||||||
<a href="http://course.trustie.net" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
|
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
|
||||||
<a href="http://contest.trustie.net" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
|
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
|
||||||
</div>
|
</div>
|
|
@ -87,9 +87,11 @@
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
|
|
||||||
|
<% if User.current.logged? %>
|
||||||
<p id="errorExplanation">
|
<p id="errorExplanation">
|
||||||
该学校未开设任何课程,您可以查看其他学校课程
|
该学校未开设任何课程,您可以查看其他学校课程
|
||||||
</p>
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<h1></h1>
|
<h1></h1>
|
||||||
<% find_all_new_hot_course(9, @school_id).map do |course| %>
|
<% find_all_new_hot_course(9, @school_id).map do |course| %>
|
||||||
|
|
|
@ -1448,7 +1448,7 @@ zh:
|
||||||
label_respond_requirement: 对需求进行了反馈
|
label_respond_requirement: 对需求进行了反馈
|
||||||
label_contest_requirement: 对竞赛进行了反馈
|
label_contest_requirement: 对竞赛进行了反馈
|
||||||
label_question_requirement: 对作业提出了问题!
|
label_question_requirement: 对作业提出了问题!
|
||||||
label_deadline: 投资时限yyyy-mm-dd
|
label_deadline: 截止日期yyyy-mm-dd
|
||||||
label_requirement_name: 在此输入需求名称
|
label_requirement_name: 在此输入需求名称
|
||||||
label_contest_name: 在此输入竞赛名称
|
label_contest_name: 在此输入竞赛名称
|
||||||
label_requirement_description: 内容:对你的需求进行描述
|
label_requirement_description: 内容:对你的需求进行描述
|
||||||
|
|
|
@ -700,7 +700,7 @@ RedmineApp::Application.routes.draw do
|
||||||
#######confusing########
|
#######confusing########
|
||||||
get 'welcome/search', to: 'welcome#search'
|
get 'welcome/search', to: 'welcome#search'
|
||||||
get 'school/index', to: 'school#index'
|
get 'school/index', to: 'school#index'
|
||||||
get 'course/:school_id', to: 'welcome#course', :as => 'school_course_list'
|
get 'school/:school_id', to: 'welcome#course', :as => 'school_course_list'
|
||||||
#get 'course/:school_id', to: 'welcome#course'
|
#get 'course/:school_id', to: 'welcome#course'
|
||||||
post 'school/get_options/:province', :to => 'school#get_options'
|
post 'school/get_options/:province', :to => 'school#get_options'
|
||||||
get 'school/get_options/:province', :to => 'school#get_options'
|
get 'school/get_options/:province', :to => 'school#get_options'
|
||||||
|
|
|
@ -71,6 +71,10 @@ default_language:
|
||||||
default: zh
|
default: zh
|
||||||
host_name:
|
host_name:
|
||||||
default: forge.trustie.net
|
default: forge.trustie.net
|
||||||
|
host_course:
|
||||||
|
default: course.trustie.net
|
||||||
|
host_contest:
|
||||||
|
default: contest.trustie.net
|
||||||
protocol:
|
protocol:
|
||||||
default: http
|
default: http
|
||||||
feeds_limit:
|
feeds_limit:
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,8 +2,8 @@ module Redmine
|
||||||
module Info
|
module Info
|
||||||
class << self
|
class << self
|
||||||
def app_name; 'Trustie' end
|
def app_name; 'Trustie' end
|
||||||
def url; 'http://forge.trustie.net/' end
|
def url; 'http://'+ Setting.host_name + '/' end
|
||||||
def help_url; 'http://forge.trustie.net/forums' end
|
def help_url; 'http://'+ Setting.host_name + '/forums' end
|
||||||
def versioned_name; "#{app_name} #{Redmine::VERSION}" end
|
def versioned_name; "#{app_name} #{Redmine::VERSION}" end
|
||||||
|
|
||||||
def environment
|
def environment
|
||||||
|
|
|
@ -2158,10 +2158,68 @@ ul.messages-for-user-reply li {
|
||||||
#loggedas .sub_menu a{
|
#loggedas .sub_menu a{
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub_menu li{
|
.sub_menu li{
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#project_loggedas_li .project_sub_menu {
|
||||||
|
box-shadow: 2px 2px 6px #b0b0b0 ;
|
||||||
|
display: none;
|
||||||
|
background: #13AEBF 0 0 no-repeat;
|
||||||
|
left: 115px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0px 0px;
|
||||||
|
text-align: left;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
#project_loggedas_li .project_sub_menu a{
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#project_loggedas_li li {
|
||||||
|
border-bottom: 1px solid #129DAD;
|
||||||
|
color: white;
|
||||||
|
list-style: none ;
|
||||||
|
padding: 6px 0px;
|
||||||
|
margin-left: 5%;
|
||||||
|
font-size: 0.8em;
|
||||||
|
width: 90%;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
#course_loggedas_li .course_sub_menu {
|
||||||
|
box-shadow: 2px 2px 6px #b0b0b0 ;
|
||||||
|
display: none;
|
||||||
|
background: #13AEBF 0 0 no-repeat;
|
||||||
|
left: 115px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0px 0px;
|
||||||
|
text-align: left;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
#course_loggedas_li .course_sub_menu a{
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#course_loggedas_li li {
|
||||||
|
border-bottom: 1px solid #129DAD;
|
||||||
|
color: white;
|
||||||
|
list-style: none ;
|
||||||
|
padding: 6px 0px;
|
||||||
|
margin-left: 5%;
|
||||||
|
font-size: 0.8em;
|
||||||
|
width: 90%;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
/*gcm*/
|
/*gcm*/
|
||||||
.footer_logo_link{
|
.footer_logo_link{
|
||||||
margin:5px;
|
margin:5px;
|
||||||
|
|
Loading…
Reference in New Issue