diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index c234eb17b..0b2ae02b3 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -60,7 +60,7 @@ class AttachmentsController < ApplicationController :disposition => (@attachment.image? ? 'inline' : 'attachment') end 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 #更新资源文件类型 diff --git a/app/controllers/avatar_controller.rb b/app/controllers/avatar_controller.rb index 3b43fec9c..73c1dbd90 100644 --- a/app/controllers/avatar_controller.rb +++ b/app/controllers/avatar_controller.rb @@ -25,7 +25,7 @@ class AvatarController < ApplicationController end end end - if @temp_file && (@temp_file.size > 0) + if @temp_file && (@temp_file.size > 0) diskfile=disk_filename(@source_type,@source_id) @urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file)) logger.info("Saving avatar '#{diskfile}' (#{@temp_file.size} bytes)") @@ -55,7 +55,7 @@ class AvatarController < ApplicationController # saved = @avatar.save begin f = Magick::ImageList.new(diskfile) - width = 300.0; + width = 300.0 proportion = (width/f[0].columns) height = (f[0].rows*proportion) f.resize_to_fill!(width,height) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index adadfbf44..987881a83 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -26,8 +26,11 @@ class ContestsController < ApplicationController # @contests = Contest.visible # @contests ||= [] @offset, @limit = api_offset_and_limit({:limit => 10}) - @contests = Contest.visible + @contests = Contest.visible @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_pages = Paginator.new @contest_count, @limit, params['page'] diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index b46ab52b1..157de5ce7 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -99,7 +99,8 @@ class CoursesController < ApplicationController # add by nwb def search 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 if params[:name].present? @courses_all = @courses.like(params[:name]) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 991af0154..f3ebfad88 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -129,6 +129,7 @@ class ForumsController < ApplicationController format.html { redirect_to @forum, notice: l(:label_forum_create_succ) } format.json { render json: @forum, status: :created, location: @forum } else + flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}" format.html { render action: "new" } format.json { render json: @forum.errors, status: :unprocessable_entity } end @@ -165,6 +166,8 @@ class ForumsController < ApplicationController def search_forum # @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}) @forums_all = Forum.where("name LIKE '%#{params[:name]}%'") @forums_count = @forums_all.count diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 792a18e59..9639c9d00 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -42,7 +42,7 @@ class ProjectsController < ApplicationController before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches] before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar] before_filter :file, :statistics, :watcherlist - + before_filter :find_project_repository, :only => [:show] # 除非项目内人员,不可查看成员, TODO: 完了写报表里去 before_filter :memberAccess, only: :member @@ -78,6 +78,14 @@ class ProjectsController < ApplicationController ### added by william 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 session[:enterprise_college] = 2 respond_to do |format| diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 144e86f4f..1c2db7f79 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -373,7 +373,7 @@ class UsersController < ApplicationController def search sort_init 'login', 'asc' 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] when 'xml', 'json' @offset, @limit = api_offset_and_limit({:limit => 15}) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 9c72d301f..3e708b94a 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -88,7 +88,8 @@ class WelcomeController < ApplicationController when :users_student redirect_to users_search_path(:name => search_condition, :role => :student) 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 diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 88b55b2bc..80beea16c 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -256,8 +256,8 @@ module CoursesHelper people end # 截至到2014-03-17 这个是最终的判断课程是否过期的方法 - def course_endTime_timeout? project - end_time_str = Course.find_by_extra(project.try(:extra)).try(:endup_time) + def course_endTime_timeout? course + end_time_str = course.try(:endup_time) begin cTime = Time.parse(end_time_str.to_s) rescue TypeError,ArgumentError diff --git a/app/models/contest.rb b/app/models/contest.rb index d41506b87..e1706b166 100644 --- a/app/models/contest.rb +++ b/app/models/contest.rb @@ -24,8 +24,9 @@ class Contest < ActiveRecord::Base validates_length_of :name, :maximum => NAME_LENGTH_LIMIT validates_length_of :description, :maximum => DESCRIPTION_LENGTH_LIMIT - validates_presence_of :author_id, :name, :deadline - validates_format_of :deadline, :with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/ + 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 =>/^[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})$/ validate :validate_user after_create :act_as_activity diff --git a/app/models/forum.rb b/app/models/forum.rb index e6b16df39..cd9c210dd 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -9,7 +9,7 @@ class Forum < ActiveRecord::Base 'memo_count', 'last_memo_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 :description, maximum: 255 validates :name, :uniqueness => true diff --git a/app/models/issue.rb b/app/models/issue.rb index 3cd67d017..550e0dc5d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -990,13 +990,9 @@ class Issue < ActiveRecord::Base end def to_s - "#{tracker} ##{id}: #{subject}" + "#{tracker} ##{project_index}: #{subject}" 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 def css_classes @@ -1160,9 +1156,22 @@ class Issue < ActiveRecord::Base "" << self.project.name.to_s << "#" << project_index end - + def project_index - (self.project.issues.index(self).to_i + 1).to_s + if self.project.issues.include?(self) + (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 private diff --git a/app/models/journal.rb b/app/models/journal.rb index 8027f18a5..2e9363dd7 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -29,7 +29,7 @@ class Journal < ActiveRecord::Base # end 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, :author => :user, :group => :issue, diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 09db4de97..ef4996eac 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -96,8 +96,9 @@ class Mailer < ActionMailer::Base # issue_add(issue) => Mail::Message object # Mailer.issue_add(issue).deliver => sends an email to issue recipients def issue_add(issue) + issue_id = issue.project_index 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 redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to message_id issue @@ -108,7 +109,7 @@ class Mailer < ActionMailer::Base cc = issue.watcher_recipients - recipients mail :to => recipients, :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 # 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 def issue_edit(journal) issue = journal.journalized.reload + issue_id = issue.project_index 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 redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to message_id journal @@ -128,7 +130,7 @@ class Mailer < ActionMailer::Base recipients = journal.recipients # Watchers in cc 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.subject @issue = issue diff --git a/app/models/project.rb b/app/models/project.rb index f38ad0dd0..5efaf10ab 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -41,7 +41,7 @@ class Project < ActiveRecord::Base has_many :principals, :through => :member_principals, :source => :principal has_many :enabled_modules, :dependent => :delete_all 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 :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC" has_many :time_entries, :dependent => :delete_all diff --git a/app/views/avatar/_avatar_form.html.erb b/app/views/avatar/_avatar_form.html.erb index fc55bd2ef..272397c62 100644 --- a/app/views/avatar/_avatar_form.html.erb +++ b/app/views/avatar/_avatar_form.html.erb @@ -42,17 +42,17 @@
- - <%= l(:button_upload_photo) %> + + <%= l(:button_upload_photo) %> - + <%= file_field_tag 'avatar[image]', :id => nil, :class => 'file_selector', :style => 'width:70px;',#added by young :size => "1", :multiple => false, - :onchange => 'addInputAvatar(this);', + :onchange => 'addInputAvatar(this);', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), @@ -61,7 +61,7 @@ :description_placeholder => nil ,# l(:label_optional_description) :source_type => source.class.to_s, :source_id => source.id.to_s - } %> + } %> <% content_for :header_tags do %> diff --git a/app/views/bids/_homework.html.erb b/app/views/bids/_homework.html.erb index a013facbc..f3578e713 100644 --- a/app/views/bids/_homework.html.erb +++ b/app/views/bids/_homework.html.erb @@ -57,7 +57,7 @@ diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb index 670ba27cf..8c999f941 100644 --- a/app/views/contests/index.html.erb +++ b/app/views/contests/index.html.erb @@ -15,7 +15,7 @@ diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 80cd7df9d..ef8f37566 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -17,9 +17,9 @@ <% @admin = @course.course_infos%> <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> - <%# unless @course.course_extra.school.nil? %> - <%= @course.teacher.user_extensions.school.try(:name) %> - <%# end %> + <% unless @course.teacher.user_extensions.school.nil? %> + <%= link_to @course.teacher.user_extensions.school.try(:name), school_course_list_path(@course.teacher.user_extensions.school) %> + <% end %> <% end %>

diff --git a/app/views/courses/index.html.erb b/app/views/courses/index.html.erb index c29903d78..db94cf6c5 100644 --- a/app/views/courses/index.html.erb +++ b/app/views/courses/index.html.erb @@ -6,7 +6,7 @@ <%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %> - + - - + +
<%= l(:label_course_practice) %><%= l(:label_course_all) %> <%= l(:label_user_location) %> : <% if User.current.logged?%> @@ -24,8 +24,8 @@
<%= link_to request.host()+"/course", :controller => 'courses', :action => 'index', :course_type => 1 %> <%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index', :course_type => 1 %><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %> <%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_all), :controller => 'courses', :action => 'index' %>
<% end %> diff --git a/app/views/courses/search.html.erb b/app/views/courses/search.html.erb index 96f8c227d..25b45e0db 100644 --- a/app/views/courses/search.html.erb +++ b/app/views/courses/search.html.erb @@ -22,7 +22,7 @@ - <%= link_to "forge.trustie.net/courses", :controller => 'courses', :action => 'index'%> + <%= link_to request.host() + "/courses", :controller => 'courses', :action => 'index'%> <%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 59d6720c7..f0cc62140 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -44,7 +44,7 @@ <% if e.event_type == "issue" %> - <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count) %> + <%= link_to l(:label_find_all_comments), issue_path(e.id) %> <%= l(:label_comments_count, :count => e.journals.count) %> <% end %> @@ -84,7 +84,7 @@ ! - <%= l :label_update_time %> + <%= l :label_create_time %> : <%= format_time(@course.created_at) %> diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index b14df7b11..f67aa1181 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -3,15 +3,15 @@

<%= labelled_form_for(@forum) do |f| %> <% if @forum.errors.any? %> -
-

<%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:

+ <% end %>
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 72e7ce221..34fc953da 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -3,17 +3,17 @@

<%=l(:label_memo_new)%>

<% if User.current.logged? %> <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %> - <% if @memo.errors.any? %> +

<%= f.text_field :subject, :required => true%>

<%= f.text_area :content, :required => true, :id => 'editor02' %>

diff --git a/app/views/git_usage/ch_usage.html.erb b/app/views/git_usage/ch_usage.html.erb index 5fca6b156..330ab9b5e 100644 --- a/app/views/git_usage/ch_usage.html.erb +++ b/app/views/git_usage/ch_usage.html.erb @@ -143,7 +143,7 @@ body table tr td span6 {

在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置

- Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到, 其中的name和email要和forge.trustie.net上的登陆名和邮箱保持一致 + Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到, 其中的name和email要和<%= Setting.host_name %>上的登陆名和邮箱保持一致 ,方便代码贡献统计 )。 @@ -313,7 +313,7 @@ body table tr td span6 {

$git config --global user.name “your_name”

$git config --global user.email “your_email” 

Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到, - 其中的name和email要和forge.trustie.net上的登陆名和密码保持一致 + 其中的name和email要和<%= Setting.host_name %>上的登陆名和密码保持一致 ,方便代码贡献统计 )。

diff --git a/app/views/git_usage/en_usage.html.erb b/app/views/git_usage/en_usage.html.erb index ce202c792..237895d23 100644 --- a/app/views/git_usage/en_usage.html.erb +++ b/app/views/git_usage/en_usage.html.erb @@ -143,7 +143,7 @@ body table tr td span6 {

Right-click on the desktop and select the "Settings" in the "TortoiseGit"

-

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, the name and email must be the same with login name and email you registed in the forge.trustie.net +

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, the name and email must be the same with login name and email you registed in the <%= Setting.host_name %> ).

Then you can customize the "Context Menu":

Please check the "Clone","Sync" and "Commit" options in the "Context Menu",

@@ -306,7 +306,7 @@ body table tr td span6 {

$git config --global user.name “your_name”M

$git config --global user.email “your_email” 

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, - the name and email must be the same with login name and email you registed in the forge.trustie.net + the name and email must be the same with login name and email you registed in the <%= Setting.host_name %> ).

diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 3f87eaabd..61cea920c 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -14,5 +14,5 @@ <%= 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_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) %>
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index dd3487258..b36c4b57d 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -28,11 +28,12 @@
    <% unless issue.author.nil? || issue.author.name == "Anonymous" %>
      - <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %><%= l(:label_post_on)%> <% a = [] %> + <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %> + <%= l(:label_post_on)%> <% a = [] %> <% a << column_content[1] %> <%# a << "##{column_content[0]}" << "(#{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"%>
    <% end -%>
      @@ -46,7 +47,7 @@ <% end %> <%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
      - <%= link_to l(:label_find_all_comments), issue_path(issue) %><%= l(:label_comments_count, :count => issue.journals.all.count) %> + <%= link_to l(:label_find_all_comments), issue_path(issue.id) %><%= l(:label_comments_count, :count => issue.journals.all.count) %>
diff --git a/app/views/issues/_list_simple.html.erb b/app/views/issues/_list_simple.html.erb index 0e4aa0731..3a33e6f5f 100644 --- a/app/views/issues/_list_simple.html.erb +++ b/app/views/issues/_list_simple.html.erb @@ -12,12 +12,12 @@ <%= 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) %> <%= link_to_project(issue.project) %> <%=h issue.tracker %> - <%= 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 %>) <% end %> diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index cc538fa80..74610d14b 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -12,7 +12,7 @@ <%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%> <%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %> <%=l(:label_copyright)%>@2007~2014 - <%= link_to l(:label_contact_us),"http://forge.trustie.net/projects/2/member", :target=>"_blank" %> + <%= link_to l(:label_contact_us),"http://" + Setting.host_name + "/projects/2/member", :target=>"_blank" %> <%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %>

diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index d340ea9e9..983c83d2d 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -41,10 +41,25 @@ <%=link_to_user(User.current)%>
  • @@ -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 () { addSlipMenu(); + addProjectSlipMenu (); + addCourseSlipMenu(); }); jQuery(document).ready(function($) { $('.sub_menu').find("a").attr('target', '_blank'); + $('.project_sub_menu').find("a").attr('target', '_blank'); + $('.course_sub_menu').find("a").attr('target', '_blank'); }); diff --git a/app/views/layouts/_bootstrap_base_footer.html.erb b/app/views/layouts/_bootstrap_base_footer.html.erb index 2bda28bdd..a2fdd6208 100644 --- a/app/views/layouts/_bootstrap_base_footer.html.erb +++ b/app/views/layouts/_bootstrap_base_footer.html.erb @@ -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=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/"%>
  • diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 3d851d442..f0dc88d8b 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -1,4 +1,4 @@ -

    <%= link_to(h("#{issue.tracker.name} ##{issue.id}: #{issue.subject}"), issue_url) %>

    +

    <%= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %>