Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
This commit is contained in:
commit
78af80394a
|
@ -8,6 +8,7 @@ class CoursesController < ApplicationController
|
||||||
menu_item :overview
|
menu_item :overview
|
||||||
menu_item :feedback, :only => :feedback
|
menu_item :feedback, :only => :feedback
|
||||||
menu_item :homework, :only => :homework
|
menu_item :homework, :only => :homework
|
||||||
|
menu_item :new_homework
|
||||||
|
|
||||||
menu_item l(:label_sort_by_time), :only => :index
|
menu_item l(:label_sort_by_time), :only => :index
|
||||||
menu_item l(:label_sort_by_active), :only => :index
|
menu_item l(:label_sort_by_active), :only => :index
|
||||||
|
|
|
@ -39,23 +39,40 @@ class TagsController < ApplicationController
|
||||||
@obj_flag = params[:object_flag]
|
@obj_flag = params[:object_flag]
|
||||||
|
|
||||||
@selected_tags = Array.new
|
@selected_tags = Array.new
|
||||||
|
@selected_tag_ids = Array.new
|
||||||
|
@selected_tag_objs = Array.new
|
||||||
@related_tags = nil
|
@related_tags = nil
|
||||||
|
@related_tag_ids = Array.new
|
||||||
|
@related_tag_objs = Array.new
|
||||||
if params[:q]
|
if params[:q]
|
||||||
@selected_tags << params[:q]
|
@tag = ActsAsTaggableOn::Tag.find(params[:q])
|
||||||
|
@selected_tags << @tag.name
|
||||||
|
@selected_tag_ids << @tag.id.to_s
|
||||||
|
@selected_tag_objs << @tag
|
||||||
else
|
else
|
||||||
@do_what = params[:do_what]
|
@do_what = params[:do_what]
|
||||||
@tag = params[:tag]
|
@tag = ActsAsTaggableOn::Tag.find(params[:tag])
|
||||||
@selected_tags = params[:current_selected_tags]
|
#@selected_tags = params[:current_selected_tags]
|
||||||
@selected_tags = @selected_tags.nil? ? Array.new : @selected_tags
|
@selected_tag_ids = params[:current_selected_tags]
|
||||||
|
@selected_tag_ids = @selected_tag_ids.nil? ? Array.new : @selected_tag_ids
|
||||||
|
@selected_tag_ids.each do |t|
|
||||||
|
ta = ActsAsTaggableOn::Tag.find(t)
|
||||||
|
@selected_tags << ta.name
|
||||||
|
@selected_tag_objs << ta
|
||||||
|
end
|
||||||
|
#@selected_tags = @selected_tags.nil? ? Array.new : @selected_tags
|
||||||
|
|
||||||
case @do_what
|
case @do_what
|
||||||
when '0' then
|
when '0' then
|
||||||
@selected_tags.delete @tag #数组中删除有多方式 可以改用shift,pop
|
@selected_tags.delete @tag.name #数组中删除有多方式 可以改用shift,pop
|
||||||
|
@selected_tag_ids.delete @tag.id.to_s
|
||||||
|
@selected_tag_objs.delete @tag
|
||||||
when '1' then
|
when '1' then
|
||||||
# 判断是否已存在该tag 主要用来处理分页的情况
|
# 判断是否已存在该tag 主要用来处理分页的情况
|
||||||
unless @selected_tags.include? @tag
|
unless @selected_tags.include? @tag.name
|
||||||
@selected_tags << @tag
|
@selected_tags << @tag.name
|
||||||
|
@selected_tag_ids << @tag.id.to_s
|
||||||
|
@selected_tag_objs << @tag
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -75,7 +92,7 @@ class TagsController < ApplicationController
|
||||||
@attachments_results,
|
@attachments_results,
|
||||||
@contests_results,
|
@contests_results,
|
||||||
@courses_results,
|
@courses_results,
|
||||||
@open_source_projects_results= refresh_results(@obj_id,@obj_flag,@selected_tags)
|
@open_source_projects_results= refresh_results(@obj_id,@obj_flag,@selected_tags,@selected_tag_ids)
|
||||||
|
|
||||||
# 这里是做tag推荐用的, 用来生产推荐的tags
|
# 这里是做tag推荐用的, 用来生产推荐的tags
|
||||||
unless @obj.nil?
|
unless @obj.nil?
|
||||||
|
@ -85,6 +102,13 @@ class TagsController < ApplicationController
|
||||||
# @tags.delete(i)
|
# @tags.delete(i)
|
||||||
# end
|
# end
|
||||||
@related_tags = @tags
|
@related_tags = @tags
|
||||||
|
@tag_objs = @obj.tags
|
||||||
|
@tag_objs.each do |t|
|
||||||
|
unless @selected_tags.include?(t.name)
|
||||||
|
@related_tag_ids << t.id.to_s
|
||||||
|
@related_tag_objs << t
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -162,8 +186,8 @@ class TagsController < ApplicationController
|
||||||
|
|
||||||
if request.get?
|
if request.get?
|
||||||
# 获取传过来的tag_id taggable_id 和 taggable_type,通过2者确定要删除tag的对象
|
# 获取传过来的tag_id taggable_id 和 taggable_type,通过2者确定要删除tag的对象
|
||||||
@tag_name = params[:tag_name]
|
@tag_id = params[:tag_name]
|
||||||
@tag_id = (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).id
|
@tag_name = (ActsAsTaggableOn::Tag.find(@tag_id)).name
|
||||||
@taggable_id = params[:taggable_id] # 当做参数传时对象会变成字符串
|
@taggable_id = params[:taggable_id] # 当做参数传时对象会变成字符串
|
||||||
@taggable_type = numbers_to_object_type(params[:taggable_type])
|
@taggable_type = numbers_to_object_type(params[:taggable_type])
|
||||||
|
|
||||||
|
@ -192,7 +216,7 @@ class TagsController < ApplicationController
|
||||||
private
|
private
|
||||||
# 这里用来刷新搜索结果的区域
|
# 这里用来刷新搜索结果的区域
|
||||||
# 函数的返回值 前2字段用来处理获取其他tag和分页 ,另外4个返回值为过滤结果
|
# 函数的返回值 前2字段用来处理获取其他tag和分页 ,另外4个返回值为过滤结果
|
||||||
def refresh_results(obj_id,obj_flag,selected_tags)
|
def refresh_results(obj_id,obj_flag,selected_tags,selected_tag_ids = nil)
|
||||||
@users_results = nil
|
@users_results = nil
|
||||||
@projects_results = nil
|
@projects_results = nil
|
||||||
@issues_results = nil
|
@issues_results = nil
|
||||||
|
@ -210,36 +234,36 @@ class TagsController < ApplicationController
|
||||||
case obj_flag
|
case obj_flag
|
||||||
when '1' then
|
when '1' then
|
||||||
@obj = User.find_by_id(obj_id)
|
@obj = User.find_by_id(obj_id)
|
||||||
@obj_pages,@users_results,@results_count = for_pagination(get_users_by_tag(selected_tags))
|
@obj_pages,@users_results,@results_count = for_pagination(get_users_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '2' then
|
when '2' then
|
||||||
@obj = Project.find_by_id(obj_id)
|
@obj = Project.find_by_id(obj_id)
|
||||||
@obj_pages,@projects_results,@results_count = for_pagination(get_projects_by_tag(selected_tags))
|
@obj_pages,@projects_results,@results_count = for_pagination(get_projects_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '3' then
|
when '3' then
|
||||||
@obj = Issue.find_by_id(obj_id)
|
@obj = Issue.find_by_id(obj_id)
|
||||||
@obj_pages,@issues_results,@results_count = for_pagination(get_issues_by_tag(selected_tags))
|
@obj_pages,@issues_results,@results_count = for_pagination(get_issues_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '4' then
|
when '4' then
|
||||||
@obj_pages,@bids_results,@results_count = for_pagination(get_bids_by_tag(selected_tags))
|
@obj_pages,@bids_results,@results_count = for_pagination(get_bids_by_tag(selected_tags,selected_tag_ids))
|
||||||
@obj = Bid.find_by_id(obj_id)
|
@obj = Bid.find_by_id(obj_id)
|
||||||
when '5'
|
when '5'
|
||||||
@obj = Forum.find_by_id(obj_id)
|
@obj = Forum.find_by_id(obj_id)
|
||||||
@obj_pages,@forums_results,@results_count = for_pagination(get_forums_by_tag(selected_tags))
|
@obj_pages,@forums_results,@results_count = for_pagination(get_forums_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '6'
|
when '6'
|
||||||
@obj = Attachment.find_by_id(obj_id)
|
@obj = Attachment.find_by_id(obj_id)
|
||||||
|
|
||||||
# modifed by Long Jun
|
# modifed by Long Jun
|
||||||
# this is used to find the attachments that came from the same project and tagged with the same tag.
|
# this is used to find the attachments that came from the same project and tagged with the same tag.
|
||||||
#@result = get_attachments_by_project_tag(selected_tags, @obj)
|
#@result = get_attachments_by_project_tag(selected_tags, @obj)
|
||||||
@result = get_attachments_by_tag(selected_tags)
|
@result = get_attachments_by_tag(selected_tags,selected_tag_ids)
|
||||||
@obj_pages, @attachments_results, @results_count = for_pagination(@result)
|
@obj_pages, @attachments_results, @results_count = for_pagination(@result)
|
||||||
when '7'
|
when '7'
|
||||||
@obj = Contest.find_by_id(obj_id)
|
@obj = Contest.find_by_id(obj_id)
|
||||||
@obj_pages,@contests_results,@results_count = for_pagination(get_contests_by_tag(selected_tags))
|
@obj_pages,@contests_results,@results_count = for_pagination(get_contests_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '8'
|
when '8'
|
||||||
@obj = OpenSourceProject.find_by_id(obj_id)
|
@obj = OpenSourceProject.find_by_id(obj_id)
|
||||||
@obj_pages, @open_source_projects_results, @results_count = for_pagination(get_open_source_projects_by_tag(selected_tags))
|
@obj_pages, @open_source_projects_results, @results_count = for_pagination(get_open_source_projects_by_tag(selected_tags,selected_tag_ids))
|
||||||
when '9' then
|
when '9' then
|
||||||
@obj = Course.find_by_id(obj_id)
|
@obj = Course.find_by_id(obj_id)
|
||||||
@obj_pages, @courses_results, @results_count = for_pagination(get_courses_by_tag(selected_tags))
|
@obj_pages, @courses_results, @results_count = for_pagination(get_courses_by_tag(selected_tags,selected_tag_ids))
|
||||||
else
|
else
|
||||||
@obj = nil
|
@obj = nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -75,8 +75,8 @@ module AttachmentsHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_attachments_by_tag(tag_name)
|
def get_attachments_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Attachment.tagged_with(tag_name).order('created_on desc')
|
Attachment.tagged_with(tag_name,{},selected_tag_ids).order('created_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
# this method is used to get all attachments that from one project and tagged one tag
|
# this method is used to get all attachments that from one project and tagged one tag
|
||||||
|
|
|
@ -35,8 +35,8 @@ module BidsHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_bids_by_tag(tag_name)
|
def get_bids_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Bid.tagged_with(tag_name).order('updated_on desc')
|
Bid.tagged_with(tag_name,{},selected_tag_ids).order('updated_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
#added by huang
|
#added by huang
|
||||||
|
|
|
@ -35,8 +35,8 @@ module ContestsHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_contests_by_tag(tag_name)
|
def get_contests_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Contest.tagged_with(tag_name).order('updated_on desc')
|
Contest.tagged_with(tag_name,{},selected_tag_ids).order('updated_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
#added by huang
|
#added by huang
|
||||||
|
|
|
@ -449,8 +449,8 @@ module CoursesHelper
|
||||||
return homework_users
|
return homework_users
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_courses_by_tag(tag_name)
|
def get_courses_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Course.tagged_with(tag_name).order('updated_at desc')
|
Course.tagged_with(tag_name,{},selected_tag_ids).order('updated_at desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
#课程实践年份下拉框
|
#课程实践年份下拉框
|
||||||
|
|
|
@ -22,7 +22,7 @@ module ForumsHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_forums_by_tag(tag_name)
|
def get_forums_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Forum.tagged_with(tag_name).order('updated_at desc')
|
Forum.tagged_with(tag_name,{},selected_tag_ids).order('updated_at desc')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -382,8 +382,8 @@ module IssuesHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_issues_by_tag(tag_name)
|
def get_issues_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Issue.tagged_with(tag_name).order('updated_on desc')
|
Issue.tagged_with(tag_name,{},selected_tag_ids).order('updated_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,8 +31,8 @@ module OpenSourceProjectsHelper
|
||||||
s = content_tag('div', s, :class => 'user_tags')
|
s = content_tag('div', s, :class => 'user_tags')
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_open_source_projects_by_tag(tag_name)
|
def get_open_source_projects_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
OpenSourceProject.tagged_with(tag_name).order('created_at desc')
|
OpenSourceProject.tagged_with(tag_name,{},selected_tag_ids).order('created_at desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_origin(url)
|
def show_origin(url)
|
||||||
|
|
|
@ -232,8 +232,8 @@ module ProjectsHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_projects_by_tag(tag_name)
|
def get_projects_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
Project.tagged_with(tag_name).order('updated_on desc')
|
Project.tagged_with(tag_name,{},selected_tag_ids).order('updated_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
# added by fq
|
# added by fq
|
||||||
|
|
|
@ -57,8 +57,8 @@ module UsersHelper
|
||||||
|
|
||||||
# this method is used to get all projects that tagged one tag
|
# this method is used to get all projects that tagged one tag
|
||||||
# added by william
|
# added by william
|
||||||
def get_users_by_tag(tag_name)
|
def get_users_by_tag(tag_name,selected_tag_ids = nil)
|
||||||
User.tagged_with(tag_name).order('updated_on desc')
|
User.tagged_with(tag_name,{},selected_tag_ids).order('updated_on desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
# added by fq
|
# added by fq
|
||||||
|
|
|
@ -137,6 +137,11 @@ class IssueQuery < Query
|
||||||
:type => :list_optional, :values => role_values
|
:type => :list_optional, :values => role_values
|
||||||
) unless role_values.empty?
|
) unless role_values.empty?
|
||||||
|
|
||||||
|
#done_values = [10,20,30,40,50,60,70,80,90,100]
|
||||||
|
#add_available_filter("done_ratio_111",
|
||||||
|
# :type => :list_optional, :values => done_values
|
||||||
|
#)
|
||||||
|
|
||||||
if versions.any?
|
if versions.any?
|
||||||
add_available_filter "fixed_version_id",
|
add_available_filter "fixed_version_id",
|
||||||
:type => :list_optional,
|
:type => :list_optional,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if options[:author] %>
|
<% if options[:author] %>
|
||||||
<span class="author" title="attachment.author">
|
<span class="author" title="<%= attachment.author%>">
|
||||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>,
|
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>,
|
||||||
<%= format_time(attachment.created_on) %>
|
<%= format_time(attachment.created_on) %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||||
<% tip1 = (@bid.reward_type == 3) ? l(:label_student_response) : l(:label_user_response) %>
|
<% tip1 = (@bid.reward_type == 3) ? l(:label_student_response) : l(:label_user_response) %>
|
||||||
<p class="font_lighter" style="font-size: 15px; padding-left: 12px; "><%=tip1%></p>
|
<p class="font_lighter" style="font-size: 15px; padding-left: 12px; ">
|
||||||
|
<%=tip1%>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div id='leave-message'>
|
<div id='leave-message'>
|
||||||
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
|
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
|
||||||
|
@ -22,11 +24,19 @@
|
||||||
<ul class="message-for-user">
|
<ul class="message-for-user">
|
||||||
<% for journal in journals%>
|
<% for journal in journals%>
|
||||||
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
|
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
|
||||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
<span class="portrait">
|
||||||
|
<%= image_tag(url_to_avatar(journal.user), :class => "avatar") %>
|
||||||
|
</span>
|
||||||
<span class="body">
|
<span class="body">
|
||||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
<span class="user">
|
||||||
<span class="font_lighter"><%= label %></span>
|
<%= link_to journal.user, user_path(journal.user)%>
|
||||||
<div> <%= textilizable journal.notes%> </div>
|
</span>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= label %>
|
||||||
|
</span>
|
||||||
|
<div>
|
||||||
|
<%= textilizable journal.notes%>
|
||||||
|
</div>
|
||||||
<span class="font_lighter">
|
<span class="font_lighter">
|
||||||
<%= l(:label_bids_published) %>
|
<%= l(:label_bids_published) %>
|
||||||
<%= time_tag(journal.created_on).html_safe %>
|
<%= time_tag(journal.created_on).html_safe %>
|
||||||
|
@ -38,8 +48,7 @@
|
||||||
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal},
|
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal},
|
||||||
:remote => true,:method => 'post', :title => l(:button_quote))%>
|
:remote => true,:method => 'post', :title => l(:button_quote))%>
|
||||||
<%= link_to l(:label_bid_respond_quote),'',
|
<%= link_to l(:label_bid_respond_quote),'',
|
||||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"}
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %>
|
||||||
%>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @user==User.current|| User.current.admin? %>
|
<% if @user==User.current|| User.current.admin? %>
|
||||||
<%= link_to(l(:label_bid_respond_delete),
|
<%= link_to(l(:label_bid_respond_delete),
|
||||||
|
|
|
@ -1,15 +1,33 @@
|
||||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||||
<div style="margin-left: 20px;">
|
<div style="margin-left: 20px;">
|
||||||
<span class="portrait"><%= image_tag(url_to_avatar(@bid.author), :class => "avatar")%></span>
|
<span class="portrait">
|
||||||
|
<%= image_tag(url_to_avatar(@bid.author), :class => "avatar")%>
|
||||||
|
</span>
|
||||||
<span class="body" style="word-break: break-all;word-wrap: break-word;">
|
<span class="body" style="word-break: break-all;word-wrap: break-word;">
|
||||||
<h3><%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%>:<%= link_to(@bid.name,respond_path(@bid)) %></h3>
|
<h3>
|
||||||
|
<%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%>:
|
||||||
|
<%= link_to(@bid.name,respond_path(@bid)) %>
|
||||||
|
</h3>
|
||||||
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
|
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
|
||||||
<p>
|
<p>
|
||||||
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= @bid.budget %></span></strong>
|
<strong>
|
||||||
|
<%= l(:label_bids_reward_method) %>
|
||||||
|
<span class="bonus">
|
||||||
|
<%= l(:label_call_bonus) %>
|
||||||
|
|
||||||
|
<%= l(:label_RMB_sign) %>
|
||||||
|
<%= @bid.budget %>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
<% elsif @bid.reward_type == 2%>
|
<% elsif @bid.reward_type == 2%>
|
||||||
<p>
|
<p>
|
||||||
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= @bid.budget%></span></strong>
|
<strong>
|
||||||
|
<%= l(:label_bids_reward_method) %>
|
||||||
|
<span class="bonus">
|
||||||
|
<%= @bid.budget%>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; width:60px">
|
<td valign="top" style="padding-left: 8px; width:62px">
|
||||||
<%= l(:label_main_teacher) %> :
|
<%= l(:label_main_teacher) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
|
@ -202,18 +202,18 @@
|
||||||
<% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %>
|
<% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px;">
|
<td valign="top" style="padding-left: 8px;">
|
||||||
<%= l(:label_teacher_work_unit) %> :
|
<%= l(:label_course_organizers) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
<a href="http://<%= Setting.host_course%>/?school_id=<%= @course.teacher.user_extensions.school.id%>">
|
<a href="http://<%= Setting.host_course%>/?school_id=<%= @course.school.id%>">
|
||||||
<%= @course.teacher.user_extensions.school %>
|
<%= @course.school %>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% else %>
|
<% else %>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px;">
|
<td valign="top" style="padding-left: 8px;">
|
||||||
<%= l(:label_teacher_work_unit) %> :
|
<%= l(:label_course_organizers) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
<%= l(:field_course_un) %>
|
<%= l(:field_course_un) %>
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; width:60px">
|
<td valign="top" style="padding-left: 8px; width:62px;">
|
||||||
<%= l(:lable_course_teacher) %> :
|
<%= l(:lable_course_teacher) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<% if params[:project_type] == "1" %>
|
<% if params[:project_type] == "1" %>
|
||||||
<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_practice) %></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?%>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<table width="940px">
|
<table width="940px">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info_font" style="width: 220px; color: #15bccf""><%= l(:label_project_deposit) %></td>
|
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></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? %>
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
<%if @repository.type.to_s=="Repository::Git"%>
|
<%if @repository.type.to_s=="Repository::Git"%>
|
||||||
<%= @repos_url%>
|
<%= @repos_url%>
|
||||||
<%else %>
|
<%else %>
|
||||||
<td><%=h @repository.url %></td>
|
<td>
|
||||||
|
<%=h @repository.url %>
|
||||||
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<p style=" word-wrap: break-word; word-break: break-all">
|
<p style=" word-wrap: break-word; word-break: break-all">
|
||||||
|
@ -19,14 +21,17 @@
|
||||||
{:controller => 'repositories', :action => 'show',
|
{:controller => 'repositories', :action => 'show',
|
||||||
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
||||||
:class => 'repository' + (repo == @repository ? ' selected' : '')
|
:class => 'repository' + (repo == @repository ? ' selected' : '')
|
||||||
}.join(' | ').html_safe %>)</p>
|
}.join(' | ').html_safe %>)
|
||||||
|
</p>
|
||||||
<h3>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码</h3>
|
<h3>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码</h3>
|
||||||
<h3>建立版本库文件夹,打开命令行执行如下:</h3>
|
<h3>建立版本库文件夹,打开命令行执行如下:</h3>
|
||||||
<div class="repos_explain">
|
<div class="repos_explain">
|
||||||
<p>git init</p>
|
<p>git init</p>
|
||||||
<p>git add *</p>
|
<p>git add *</p>
|
||||||
<p>git commit -m "first commit"</p>
|
<p>git commit -m "first commit"</p>
|
||||||
<p>git remote add origin <%= @repos_url%></p>
|
<p>git remote add origin
|
||||||
|
<%= @repos_url%>
|
||||||
|
</p>
|
||||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||||
<p>git push -u origin master:master</p>
|
<p>git push -u origin master:master</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,26 +43,36 @@
|
||||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||||
<p>git push -u origin master:master</p>
|
<p>git push -u origin master:master</p>
|
||||||
</div>
|
</div>
|
||||||
|
<h3>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</h3>
|
||||||
|
<div class="repos_explain">
|
||||||
|
<p>git clone <%= @repos_url%></p>
|
||||||
|
<p>git push</p>
|
||||||
|
<p>git checkout -b branch_name</p>
|
||||||
|
<p>git push origin branch_name</p>
|
||||||
|
</div>
|
||||||
</h3>
|
</h3>
|
||||||
<h3>从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:</h3>
|
<h3>从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:</h3>
|
||||||
<div class="repos_explain">
|
<div class="repos_explain">
|
||||||
<p>git remote add trustie <%= @repos_url%></p>
|
<p>git remote add trustie
|
||||||
|
<%= @repos_url%>
|
||||||
|
</p>
|
||||||
<p>git add .</p>
|
<p>git add .</p>
|
||||||
<p>git commit -m "first commit"</p>
|
<p>git commit -m "first commit"</p>
|
||||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||||
<p>git push -u trustie master:master</p>
|
<p>git push -u trustie master:master</p>
|
||||||
<p><%= link_to "李海提供", user_path(646)%></p>
|
<p><%= link_to "李海", user_path(646)%>提供</p>
|
||||||
</div>
|
</div>
|
||||||
</h3>
|
|
||||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||||
<%= render :partial => 'dir_list' %>
|
<%= render :partial => 'dir_list' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render_properties(@properties) %>
|
<%= render_properties(@properties) %>
|
||||||
|
|
||||||
<% if authorize_for('repositories', 'revisions') %>
|
<% if authorize_for('repositories', 'revisions') %>
|
||||||
<% if @changesets && !@changesets.empty? %>
|
<% if @changesets && !@changesets.empty? %>
|
||||||
<h3><%= l(:label_latest_revision_plural) %></h3>
|
<h3>
|
||||||
|
<%= l(:label_latest_revision_plural) %>
|
||||||
|
</h3>
|
||||||
<%= render :partial => 'revisions',
|
<%= render :partial => 'revisions',
|
||||||
:locals => {:project => @project, :path => @path,
|
:locals => {:project => @project, :path => @path,
|
||||||
:revisions => @changesets, :entry => nil }%>
|
:revisions => @changesets, :entry => nil }%>
|
||||||
|
@ -70,8 +85,7 @@
|
||||||
:repository_id => @repository.identifier_param %>
|
:repository_id => @repository.identifier_param %>
|
||||||
<% sep = '|' %>
|
<% sep = '|' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @repository.supports_directory_revisions? &&
|
<% if @repository.supports_directory_revisions? && ( has_branches || !@path.blank? || !@rev.blank? ) %>
|
||||||
( has_branches || !@path.blank? || !@rev.blank? ) %>
|
|
||||||
<%= sep %>
|
<%= sep %>
|
||||||
<%= link_to l(:label_view_revisions),
|
<%= link_to l(:label_view_revisions),
|
||||||
:action => 'changes',
|
:action => 'changes',
|
||||||
|
@ -99,7 +113,15 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- added by bai -->
|
<!-- added by bai -->
|
||||||
<strong><span style="color: #099;"><%= l(:label_how_commit_code) %></span></strong> <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "usage")%> | <%= link_to('English', en_usage_path, :class => "usage")%>
|
<strong>
|
||||||
|
<span style="color: #099;">
|
||||||
|
<%= l(:label_how_commit_code) %>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
|
||||||
|
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "usage")%>
|
||||||
|
|
|
||||||
|
<%= link_to('English', en_usage_path, :class => "usage")%>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
<% i += 1 %>
|
<% i += 1 %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to image_tag("/images/sidebar/add.png"),:action => "index",
|
<%= link_to image_tag("/images/sidebar/add.png"),:action => "index",
|
||||||
:current_selected_tags => selected_tags,:tag => rt,:do_what => "1",
|
:current_selected_tags => selected_tags,:tag => rt.id,:do_what => "1",
|
||||||
:obj_id => obj_id,:object_flag => obj_flag %>
|
:obj_id => obj_id,:object_flag => obj_flag %>
|
||||||
<span id="tag">
|
<span id="tag">
|
||||||
<%= rt %>
|
<%= rt.name %>
|
||||||
</span>
|
</span>
|
||||||
<% break if i >= 10 %>
|
<% break if i >= 10 %>
|
||||||
<!-- 这里用例计数某类对象的所有该tag总数 -->
|
<!-- 这里用例计数某类对象的所有该tag总数 -->
|
||||||
<%= render :partial => 'sidebar_tags',:locals => {:show_flag => obj_flag,:sg => rt }%>
|
<%= render :partial => 'sidebar_tags',:locals => {:show_flag => obj_flag,:sg => rt,:selected_tag_ids => related_tag_ids }%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<% for sg in selected_tags %>
|
<% for sg in selected_tags %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to image_tag("/images/sidebar/minus.png"),:action => "index",
|
<%= link_to image_tag("/images/sidebar/minus.png"),:action => "index",
|
||||||
:current_selected_tags => selected_tags ,:tag => sg,:do_what => "0",
|
:current_selected_tags => selected_tags ,:tag => sg.id,:do_what => "0",
|
||||||
:obj_id => obj_id,:object_flag => obj_flag %>
|
:obj_id => obj_id,:object_flag => obj_flag %>
|
||||||
<span id="tag"><%= sg %> </span>
|
<span id="tag"><%= sg.name %> </span>
|
||||||
<%= render :partial => 'sidebar_tags',:locals => {:show_flag => obj_flag,:sg => sg }%>
|
<%= render :partial => 'sidebar_tags',:locals => {:show_flag => obj_flag,:sg => sg ,:selected_tag_ids => @selected_tag_ids}%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<% case show_flag%>
|
<% case show_flag%>
|
||||||
<% when '1' then %>
|
<% when '1' then %>
|
||||||
(<%= User.tagged_with("#{sg}").size %>)
|
(<%= User.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||||
<%when '2' then %>
|
<%when '2' then %>
|
||||||
(<%= Project.tagged_with(sg).size %>)
|
(<%= Project.tagged_with(sg.name,{},selected_tag_ids).size %>)
|
||||||
<% when '3' then %>
|
<% when '3' then %>
|
||||||
(<%= Issue.tagged_with("#{sg}").size %>)
|
(<%= Issue.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||||
<% when '4' then %>
|
<% when '4' then %>
|
||||||
(<%= Bid.tagged_with("#{sg}").size %>)
|
(<%= Bid.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||||
<% when '5' then %>
|
<% when '5' then %>
|
||||||
(<%= Forum.tagged_with("#{sg}").size %>)
|
(<%= Forum.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||||
<% when '6' then %>
|
<% when '6' then %>
|
||||||
(<%= Attachment.tagged_with("#{sg}").size %>)
|
(<%= Attachment.tagged_with("#{sg.name}",{},selected_tag_ids).size %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// })
|
// })
|
||||||
</script>
|
</script>
|
||||||
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求 9代表课程-->
|
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求 9代表课程-->
|
||||||
<% @tags = obj.reload.tag_list %>
|
<% @tags = obj.reload.tags %>
|
||||||
|
|
||||||
<% if non_list_all and (@tags.size > 0) %>
|
<% if non_list_all and (@tags.size > 0) %>
|
||||||
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
|
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<h3><strong><%= l(:label_tags_selected) %></strong></h3>
|
<h3><strong><%= l(:label_tags_selected) %></strong></h3>
|
||||||
<div id="selected_tags">
|
<div id="selected_tags">
|
||||||
<%= render :partial => "selected_tags",:locals => {
|
<%= render :partial => "selected_tags",:locals => {
|
||||||
:selected_tags => @selected_tags,:obj_flag => @obj_flag,:obj_id => @obj_id }%>
|
:selected_tags => @selected_tag_objs,:obj_flag => @obj_flag,:obj_id => @obj_id }%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3><strong><%= l(:label_tags_related) %></strong></h3>
|
<h3><strong><%= l(:label_tags_related) %></strong></h3>
|
||||||
<div id="related_tags">
|
<div id="related_tags">
|
||||||
<%= render :partial => "related_tags",:locals => {:related_tags => @related_tags,
|
<%= render :partial => "related_tags",:locals => {:related_tags => @related_tag_objs,
|
||||||
:selected_tags => @selected_tags,:obj_flag => @obj_flag,:obj_id => @obj_id }%>
|
:selected_tags => @selected_tag_ids,:related_tag_ids => @related_tag_ids,:obj_flag => @obj_flag,:obj_id => @obj_id }%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
<% if User.current == @user %>
|
<% if User.current == @user %>
|
||||||
<% (membership.roles).each do |role| %>
|
<% (membership.roles).each do |role| %>
|
||||||
<% unless (role == Role.find(9) || role == Role.find(3)) %>
|
<% unless (role == Role.find(9) || role == Role.find(3)) %>
|
||||||
<%= join_in_course(membership.course, User.current) %>
|
<%= join_in_course(membership.course, User.current) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= l(:label_x_base_courses_member, :count => membership.course.members.count) %>
|
<%= l(:label_x_base_courses_member, :count => membership.course.members.count) %>
|
||||||
(<%= "#{membership.course.members.count}" %>)
|
(<%= "#{membership.course.members.count}" %>)
|
||||||
<%= l(:label_homework) %>
|
<%= l(:label_homework) %>
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
|
||||||
<h3 style="margin-left: 5px; color: #e8770d;">
|
<h3 style="margin-left: 5px; color: #e8770d;">
|
||||||
<strong><%= l(:lable_hot_projects)%></strong>
|
<strong>
|
||||||
|
<%= l(:lable_hot_projects)%>
|
||||||
|
</strong>
|
||||||
</h3>
|
</h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;">
|
<span style="margin-top: -20px;float: right; display: block;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
|
@ -83,14 +85,16 @@
|
||||||
<!-- 上左下右 -->
|
<!-- 上左下右 -->
|
||||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
<div style="float: left; margin-left: 10px; width: 380px;">
|
||||||
<% unless project.is_public %>
|
<% unless project.is_public %>
|
||||||
<span class="private_project"><%= l(:label_private) %></span>
|
<span class="private_project">
|
||||||
|
<%= l(:label_private) %>
|
||||||
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||||
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||||
</div>
|
</div>
|
||||||
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;">
|
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;min-height: 42px;">
|
||||||
<span class='font_lighter' title ='<%=project.short_description%>'>
|
<span class='font_lighter' title ='<%=project.short_description%>'>
|
||||||
<%=project.description.truncate(100, omission: '...')%>
|
<%=project.description.truncate(90, omission: '...')%>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
|
@ -109,17 +113,21 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
|
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
|
||||||
<ul class="user-welcome-message-list">
|
<ul class="user-welcome-message-list">
|
||||||
<h3 style="color: rgb(21, 188, 207)"><strong><%= l(:lable_user_active)%></strong></h3>
|
<h3 style="color: rgb(21, 188, 207)">
|
||||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
<strong>
|
||||||
|
<%= l(:lable_user_active)%>
|
||||||
|
</strong>
|
||||||
|
</h3>
|
||||||
|
<span style="margin-top: -20px;float: right; display: block;">
|
||||||
|
<%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %>
|
||||||
|
</span>
|
||||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||||
<%activities = find_all_activities%>
|
<%activities = find_all_activities%>
|
||||||
<% activities.each do |event| %>
|
<% activities.each do |event| %>
|
||||||
<!--<%# cache cache_key_for_event(event) do %> -->
|
|
||||||
<li style="display: block;height:60px; padding-bottom: 4px;">
|
<li style="display: block;height:60px; padding-bottom: 4px;">
|
||||||
<div class="inner-right" style="float: left; height: 100%; ">
|
<div class="inner-right" style="float: left; height: 100%; ">
|
||||||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inner-right" style="float: right; width:86%; height: 100%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" >
|
<div class="inner-right" style="float: right; width:86%; height: 100%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" >
|
||||||
<span style="color: green;">
|
<span style="color: green;">
|
||||||
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
|
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
|
||||||
|
@ -148,14 +156,18 @@
|
||||||
<!--<%# cache 'forum_links' do %> -->
|
<!--<%# cache 'forum_links' do %> -->
|
||||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||||
<h3 style="color: rgb(21, 188, 207);">
|
<h3 style="color: rgb(21, 188, 207);">
|
||||||
<strong><%= l(:lable_bar_active)%></strong>
|
<strong>
|
||||||
|
<%= l(:lable_bar_active)%>
|
||||||
|
</strong>
|
||||||
<%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
<%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
<%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
<%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
</h3>
|
</h3>
|
||||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to l(:label_more), forums_path %></span>
|
<span style="margin-top: -30px;float: right; display: block;">
|
||||||
|
<%= link_to l(:label_more), forums_path %>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="welcome-box-list-new memo_activity">
|
<div class="welcome-box-list-new memo_activity">
|
||||||
<% topics = find_new_forum_topics(7) %>
|
<% topics = find_new_forum_topics(6) %>
|
||||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||||
<!--<%# cache cache_key_for_topic(topic) do %> -->
|
<!--<%# cache cache_key_for_topic(topic) do %> -->
|
||||||
<li class="message-brief-intro">
|
<li class="message-brief-intro">
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<label>
|
<label>
|
||||||
<%=l(:label_attachment_plural)%>
|
<%=l(:label_attachment_plural)%>
|
||||||
</label>
|
</label>
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= render :partial => 'attachments/form',:locals => {:container => @page} %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,22 @@
|
||||||
<div class="message-body">
|
<div class="message-body">
|
||||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||||
<p>
|
<p>
|
||||||
<span><%= link_to reply.user.name, user_path(reply.user) %>: </span>
|
<span>
|
||||||
<span class="message-notes"> <%= reply.notes %></span>
|
<%= link_to reply.user.name, user_path(reply.user) %>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
<span class="message-notes">
|
||||||
|
<%= reply.notes %>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span class="time"><%= format_time reply.created_on %></span>
|
<span class="time">
|
||||||
|
<%= format_time reply.created_on %>
|
||||||
|
</span>
|
||||||
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||||
<% if reply_allow %>
|
<% if reply_allow %>
|
||||||
<%= link_to l(:label_projects_feedback_respond),'',
|
<%= link_to l(:label_projects_feedback_respond),'',
|
||||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"}
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"} %>
|
||||||
%>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
<%= form_tag({:controller => 'words', :action => 'create_reply'}, :remote => true) do %>
|
<%= form_tag(words_create_reply_path, :remote => true) do %>
|
||||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||||
:style => "resize: none;", :rows => 4,
|
:style => "resize: none;", :rows => 4,
|
||||||
:placeholder => l(:label_projects_feedback_respond_content),
|
:placeholder => l(:label_projects_feedback_respond_content),
|
||||||
|
|
|
@ -5,15 +5,12 @@
|
||||||
) %>').hide();
|
) %>').hide();
|
||||||
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
|
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
|
||||||
pre_append.fadeIn(600);
|
pre_append.fadeIn(600);
|
||||||
|
|
||||||
var textarea = $('#project_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
var textarea = $('#project_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
||||||
textarea.val('');
|
textarea.val('');
|
||||||
$('#project_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
$('#project_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
||||||
|
|
||||||
var textarea1 = $('#course_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
var textarea1 = $('#course_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
||||||
textarea1.val('');
|
textarea1.val('');
|
||||||
$('#course_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
$('#course_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
||||||
|
|
||||||
setMaxLengthItem(pre_append.find('textarea')[0]);
|
setMaxLengthItem(pre_append.find('textarea')[0]);
|
||||||
<% else %>
|
<% else %>
|
||||||
alert("<%= l(:label_feedback_fail) %>");
|
alert("<%= l(:label_feedback_fail) %>");
|
||||||
|
|
|
@ -1841,3 +1841,5 @@ en:
|
||||||
label_all_schol: All school
|
label_all_schol: All school
|
||||||
label_select_province: Please select the provinces
|
label_select_province: Please select the provinces
|
||||||
label_search_conditions_not_null: The search conditions can not be empty
|
label_search_conditions_not_null: The search conditions can not be empty
|
||||||
|
lable_school_list: List of schools
|
||||||
|
button_delete_file: delete
|
|
@ -2169,3 +2169,4 @@ zh:
|
||||||
label_no_contest_news_title: 竞赛标题不能为空
|
label_no_contest_news_title: 竞赛标题不能为空
|
||||||
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
||||||
label_subject_empty: 主题不能为空
|
label_subject_empty: 主题不能为空
|
||||||
|
label_course_organizers: 开设单位
|
||||||
|
|
|
@ -22,6 +22,7 @@ body
|
||||||
{
|
{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote
|
blockquote
|
||||||
|
|
Loading…
Reference in New Issue