Merge branch 'dev_hjq' into szzh
This commit is contained in:
commit
ba395fd2eb
|
@ -223,7 +223,6 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
if saved
|
||||
|
||||
#修改界面增加跟踪者
|
||||
watcherlist = @issue.watcher_users
|
||||
select_users = []
|
||||
|
@ -253,9 +252,7 @@ class IssuesController < ApplicationController
|
|||
JournalReply.add_reply(@issue.current_journal.id, reply_id, User.current.id)
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record?
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to issue_url(@issue.id) }
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
|
|
@ -36,8 +36,7 @@ class JournalsController < ApplicationController
|
|||
sort_update(@query.sortable_columns)
|
||||
|
||||
if @query.valid?
|
||||
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC",
|
||||
:limit => 25)
|
||||
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", :limit => 25)
|
||||
end
|
||||
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
|
||||
render :layout => false, :content_type => 'application/atom+xml'
|
||||
|
@ -72,9 +71,9 @@ class JournalsController < ApplicationController
|
|||
end
|
||||
# Replaces pre blocks with [...]
|
||||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> "
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
|
||||
@id = user.id
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
|
|
|
@ -162,7 +162,7 @@ class ProjectsController < ApplicationController
|
|||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
render :layout => 'new_base'
|
||||
else
|
||||
redirect_to signin_url
|
||||
end
|
||||
|
@ -188,7 +188,7 @@ class ProjectsController < ApplicationController
|
|||
@project.safe_attributes = params[:project]
|
||||
@project.organization_id = params[:organization_id]
|
||||
@project.user_id = User.current.id
|
||||
@project.project_new_type = 1
|
||||
@project.project_new_type = params[:project_new_type]
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
|
@ -220,7 +220,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.html { render :action => 'new', :layout => 'new_base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -101,33 +101,12 @@ class UsersController < ApplicationController
|
|||
elsif @user != User.current && !User.current.admin?
|
||||
return render_403
|
||||
end
|
||||
# 记录当前点击按钮的时间
|
||||
# 考虑到用户未退出刷新消息页面
|
||||
message_time = OnclickTime.where("user_id =?", User.current).first
|
||||
if message_time.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
message_new_time.onclick_time = Time.now
|
||||
message_new_time.save
|
||||
else
|
||||
# 24小时内显示
|
||||
contrast_time = Time.now - 86400
|
||||
message_time.update_attributes(:onclick_time => Time.now)
|
||||
end
|
||||
@user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
|
||||
# 当前用户查看消息,则设置消息为已读
|
||||
# DO 待优化,只需查出符合条件的再更新
|
||||
# 初始化/更新 点击按钮时间
|
||||
# 24小时内显示系统消息
|
||||
update_onclick_time
|
||||
# 全部设为已读
|
||||
if params[:viewed] == "all"
|
||||
course_querys = @user.course_messages
|
||||
forge_querys = @user.forge_messages
|
||||
user_querys = @user.user_feedback_messages
|
||||
forum_querys = @user.memo_messages
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
end
|
||||
update_message_viewed(@user)
|
||||
end
|
||||
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
||||
case params[:type]
|
||||
|
@ -197,6 +176,39 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 初始化/更新 点击按钮时间
|
||||
def update_onclick_time
|
||||
# 记录当前点击按钮的时间
|
||||
# 考虑到用户未退出刷新消息页面
|
||||
message_time = OnclickTime.where("user_id =?", User.current).first
|
||||
if message_time.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
message_new_time.onclick_time = Time.now
|
||||
message_new_time.save
|
||||
else
|
||||
# 24小时内显示
|
||||
contrast_time = Time.now - 86400
|
||||
message_time.update_attributes(:onclick_time => Time.now)
|
||||
end
|
||||
# 24小时内显示系统消息
|
||||
@user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
|
||||
end
|
||||
|
||||
# 消息设置为已读
|
||||
def update_message_viewed(user)
|
||||
course_querys = CourseMessage.where("user_id =? and viewed =?", user, 0)
|
||||
forge_querys = ForgeMessage.where("user_id =? and viewed =?", user, 0)
|
||||
user_querys = UserFeedbackMessage.where("user_id =? and viewed =?", user, 0)
|
||||
forum_querys = MemoMessage.where("user_id =? and viewed =?", user, 0)
|
||||
if User.current.id == @user.id
|
||||
course_querys.update_all(:viewed => true)
|
||||
forge_querys.update_all(:viewed => true)
|
||||
user_querys.update_all(:viewed => true)
|
||||
forum_querys.update_all(:viewed => true)
|
||||
end
|
||||
end
|
||||
|
||||
# 系统消息
|
||||
def user_system_messages
|
||||
@sytem_messages = SystemMessage.order("created_at desc").all
|
||||
|
|
|
@ -76,6 +76,36 @@ module ProjectsHelper
|
|||
return result
|
||||
end
|
||||
|
||||
# 项目类型
|
||||
def project_type_select
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << l(:label_development_team)
|
||||
option1 << l(:label_development_team)
|
||||
option2 = []
|
||||
option2 << l(:label_research_group)
|
||||
option2 << l(:label_research_group)
|
||||
option3 = []
|
||||
option3 << l(:label_friend_organization)
|
||||
option3 << l(:label_friend_organization)
|
||||
type << option1
|
||||
type << option2
|
||||
type << option3
|
||||
type
|
||||
end
|
||||
|
||||
# 项目类型描述
|
||||
def project_newtype_descrption
|
||||
case params
|
||||
when 1
|
||||
value = l(:label_type_des_development)
|
||||
when 2
|
||||
value = l(:label_type_des_research)
|
||||
when 3
|
||||
value = l(:label_type_des_friend)
|
||||
end
|
||||
end
|
||||
|
||||
# 被邀请成员的状态
|
||||
def status_for_ivitied(ivite_list, project)
|
||||
if ivite_list.user.member_of?(project)
|
||||
|
|
|
@ -463,7 +463,7 @@ module UsersHelper
|
|||
def get_issue_des_update(journal)
|
||||
no_html = "message"
|
||||
arr = details_to_strings(journal.details, no_html)
|
||||
unless journal.notes.empty?
|
||||
unless journal.notes.blank?
|
||||
arr << "留言内容:" + journal.notes
|
||||
end
|
||||
str = ''
|
||||
|
|
|
@ -171,11 +171,16 @@ class Journal < ActiveRecord::Base
|
|||
|
||||
# 缺陷状态更改,消息提醒
|
||||
def act_as_forge_message
|
||||
receivers = []
|
||||
# 直接回复
|
||||
if self.user_id != self.issue.author_id
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.author_id, :project_id => self.issue.project_id, :viewed => false)
|
||||
receivers << self.issue.author_id
|
||||
end
|
||||
if self.user_id != self.issue.assigned_to_id && self.issue.assigned_to_id != self.issue.author_id # 指派人不是自己的话,则给指派人发送
|
||||
self.forge_messages << ForgeMessage.new(:user_id => self.issue.assigned_to_id, :project_id => self.issue.project_id, :viewed => false)
|
||||
receivers << self.issue.assigned_to_id
|
||||
end
|
||||
receivers.each do |r|
|
||||
self.forge_messages << ForgeMessage.new(:user_id => r, :project_id => self.issue.project_id, :viewed => false)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -5,8 +5,34 @@ class JournalReply < ActiveRecord::Base
|
|||
|
||||
belongs_to :user
|
||||
belongs_to :journal
|
||||
after_create :send_journal_messages
|
||||
|
||||
def self.add_reply(journal_id, reply_id, user_id)
|
||||
self.create(:journal_id => journal_id, :reply_id => reply_id, :user_id => user_id)
|
||||
end
|
||||
|
||||
def send_journal_messages
|
||||
journal = self.journal
|
||||
replier = User.find(self.reply_id)
|
||||
receivers = []
|
||||
# 被回复的人发送消息
|
||||
if journal.user_id != self.reply_id && self.reply_id != journal.issue.author_id
|
||||
receivers << replier
|
||||
end
|
||||
if journal.user_id != journal.issue.author_id && self.reply_id != journal.issue.author_id
|
||||
receivers << self.journal.issue.author
|
||||
end
|
||||
# journal_forge_messages = ForgeMessage.new
|
||||
receivers.each do |r|
|
||||
journal.forge_messages << ForgeMessage.new(:user_id =>r.id, :project_id => journal.issue.project_id, :viewed => false)
|
||||
end
|
||||
|
||||
# if self.user_id != self.journal_reply.user_id
|
||||
# receivers << self.journal_reply.user_id
|
||||
# end
|
||||
# # 给缺陷发布者发送
|
||||
# if self.user_id != self.issue.author_id && self.journal_reply.user_id != self.issue.author_id
|
||||
# receivers << self.issue.author_id
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -264,6 +264,7 @@ class User < Principal
|
|||
if OnclickTime.where("user_id =?", User.current).first.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
# 第一次初始化点击铃铛时间
|
||||
message_new_time.onclick_time = User.current.last_login_on.nil? ? Time.now : User.current.last_login_on
|
||||
message_new_time.save
|
||||
end
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_status) %>:</label>
|
||||
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||
<%= f.select :status_id,
|
||||
(@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:no_label => true},
|
||||
# ajax 刷新
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150" %>
|
||||
<%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:no_label => true},
|
||||
# ajax 刷新
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150" %>
|
||||
<% else %>
|
||||
<%= h(@issue.status.name) %>
|
||||
<% end %>
|
||||
|
@ -20,10 +19,9 @@
|
|||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_priority) %>:</label>
|
||||
<% if @issue.safe_attribute? 'priority_id' %>
|
||||
<%= f.select :priority_id,
|
||||
(@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -32,8 +30,8 @@
|
|||
<label class="label"><%= l(:field_assigned_to) %>:</label>
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
<%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to),
|
||||
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -41,8 +39,8 @@
|
|||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<label class="label"><%= l(:field_fixed_version) %>:</label>
|
||||
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
|
@ -60,11 +58,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_start_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<%= f.text_field :start_date,
|
||||
:size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('start_date') %>
|
||||
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('start_date') %>
|
||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -72,10 +66,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_due_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<%= f.text_field :due_date, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('due_date') %>
|
||||
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('due_date') %>
|
||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -83,10 +74,7 @@
|
|||
<li>
|
||||
<label class="label02"><%= l(:field_estimated_hours) %>:</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('estimated_hours') %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
|
||||
<span class="mt3 ml5"><%= l(:field_hours) %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -94,9 +82,9 @@
|
|||
<li><label class="label02"> % 完成 : </label>
|
||||
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
||||
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true},
|
||||
:onchange => "PrecentChange(this.value)",
|
||||
:class => "w150" %>
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true},
|
||||
:onchange => "PrecentChange(this.value)",
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!--属性-->
|
||||
<div class="pro_info_box mb10">
|
||||
<%= issue_fields_rows do |rows| %>
|
||||
<ul class="fl" >
|
||||
<li><p class="label03" > 状态 : </p><p class="pro_info_p"><%= @issue.status.name %></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
|
||||
<li><p class="label03" > 指派给 : </p><span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl" >
|
||||
<li><p class="label03" > 优先级 : </p><span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
|
||||
<li><p class="label03" > % 完成 : </p><span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl " >
|
||||
<% unless @issue.disabled_core_fields.include?('start_date') %>
|
||||
<li><p class="label03" style="width:50px;" > 开始 : </p><p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
|
||||
<li><p class="label03" style="width:50px;"> 周期 : </p><span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="fl " >
|
||||
<% unless @issue.disabled_core_fields.include?('due_date') %>
|
||||
<li><p class="label03" > 计划完成 : </p><span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
|
||||
<li><p class="label03" > 目标版本 : </p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %><!--pro_info_box end-->
|
||||
<%#= render_custom_fields_rows(@issue) %>
|
||||
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</div>
|
||||
<!--pro_info_box 属性 end-->
|
|
@ -6,21 +6,17 @@
|
|||
<div id="all_attributes" style="display:none;">
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<div class="ping_C mb10 ml10"></div>
|
||||
<!--<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">-->
|
||||
<!--<%#= l(:button_submit) %>-->
|
||||
<!--</a>-->
|
||||
</div>
|
||||
|
||||
<% end %><!--end-->
|
||||
|
||||
<!--<fieldset><legend><%#= l(:field_notes) %></legend>-->
|
||||
<!--回复框-->
|
||||
<% if @journals.present? %>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="journal_issue_note" class="wiki"></div>
|
||||
<div id="journal_issue_note" class="wiki">
|
||||
|
||||
</div>
|
||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||
<fieldset><legend>回复</legend>
|
||||
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
|
||||
|
|
|
@ -28,11 +28,7 @@
|
|||
<li>
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||
<%= f.text_field :subject,
|
||||
:class => "w576",
|
||||
:maxlength => 255,
|
||||
:style => "font-size:small",
|
||||
:no_label => true %>
|
||||
<%= f.text_field :subject, :class => "w576", :maxlength => 255, :style => "font-size:small", :no_label => true %>
|
||||
<!--Added by young-->
|
||||
<%= javascript_tag do %>
|
||||
observeAutocompleteField('issue_subject',
|
||||
|
@ -53,13 +49,7 @@
|
|||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
|
||||
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor",
|
||||
# :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
||||
# :accesskey => accesskey(:edit),
|
||||
# :class => "w583",
|
||||
:width=>'87%',
|
||||
:resizeType => 0,
|
||||
:no_label => true %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true %>
|
||||
<%# end %>
|
||||
<%#= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
|
@ -68,13 +58,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
<li>
|
||||
<% if @copy_from && @copy_from.attachments.any? %>
|
||||
<p>
|
||||
<%# if @copy_from && @copy_from.attachments.any? %>
|
||||
<!--<p>-->
|
||||
<!-- 去除附件复制功能 -->
|
||||
<!-- <label for="copy_attachments"><#%= l(:label_copy_attachments) %></label>
|
||||
<#%= check_box_tag 'copy_attachments', '1', @copy_attachments %> -->
|
||||
</p>
|
||||
<% end %>
|
||||
<!--</p>-->
|
||||
<%# end %>
|
||||
<% if @copy_from && !@copy_from.leaf? %>
|
||||
<p>
|
||||
<label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<% i = 0 %>
|
||||
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
|
||||
<% @issue.editable_custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% if i == split_on -%>
|
||||
</div><div class="splitcontentright">
|
||||
<% end -%>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="splitcontentleft">
|
||||
<% i = 0 %>
|
||||
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
|
||||
<% @issue.editable_custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% if i == split_on -%>
|
||||
</div><div class="splitcontentright">
|
||||
<% end -%>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg' %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_issue_edit) %></h2>
|
||||
</div>
|
||||
|
@ -12,6 +12,7 @@
|
|||
<div class="ping_dispic">
|
||||
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
|
||||
</div>
|
||||
|
||||
<div class="talk_txt fl">
|
||||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>' title="<%= get_issue_type(@issue.tracker_id)[1] %>"></span>
|
||||
|
@ -20,32 +21,59 @@
|
|||
</p><br/>
|
||||
|
||||
<div class="cl"></div>
|
||||
<p>由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>
|
||||
<%# if @issue.created_on != @issue.updated_on %>
|
||||
添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||
<%# else %>
|
||||
<%#= format_time(@issue.updated_on).html_safe %>
|
||||
<%# end %>
|
||||
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||
</div>
|
||||
|
||||
<!--talk_txt end-->
|
||||
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
|
||||
<div class="cl"></div>
|
||||
<div class="talk_info mb10 list_style" style="word-break:break-all;">
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<div class="talk_info mb10" style="word-break:break-all;">
|
||||
<% if @issue.description? %>
|
||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<div class="pro_pic_box mb10">
|
||||
<a href="javascript:void(0)" class="link_img fl">
|
||||
<!--显示附件、图片-->
|
||||
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
|
||||
<% end -%>
|
||||
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||||
</div><!--pro_pic_box end-->
|
||||
<div class="cl"></div>
|
||||
<!--属性-->
|
||||
</div><!--pro_pic_box end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--属性-->
|
||||
<<<<<<< .mine
|
||||
<%= render :partial => 'attributes_show' %>
|
||||
<!--pro_info_box 属性 end-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
<div class="pro_info_box mb10">
|
||||
<%= issue_fields_rows do |rows| %>
|
||||
<ul class="fl">
|
||||
|
@ -73,7 +101,18 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
>>>>>>> .theirs
|
||||
|
||||
<<<<<<< .mine
|
||||
<%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>-->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
=======
|
||||
<ul class="fl ">
|
||||
<% unless @issue.disabled_core_fields.include?('start_date') %>
|
||||
<li><p class="label03" style="width:50px;"> 开始 : </p>
|
||||
|
@ -82,6 +121,33 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
>>>>>>> .theirs
|
||||
<<<<<<< .mine
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
|
||||
<li><p class="label03" style="width:50px;"> 周期 : </p>
|
||||
<span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
|
||||
|
@ -106,28 +172,23 @@
|
|||
<% end %><!--pro_info_box end-->
|
||||
<%#= render_custom_fields_rows(@issue) %>
|
||||
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</div>
|
||||
<!--pro_info_box 属性 end-->
|
||||
<div class="cl"></div>
|
||||
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
>>>>>>> .theirs
|
||||
</div>
|
||||
|
||||
<!--problem_main end-->
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<!--留言-->
|
||||
<% if @issue.editable? %>
|
||||
<div id="update">
|
||||
<%= render :partial => 'edit' %>
|
||||
</div>
|
||||
<p style="padding-top: 5px"></p>
|
||||
|
||||
<!--引用时不能修改,剥离出引用内容-->
|
||||
|
||||
<%#--引用时不能修改,剥离出引用内容--%>
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
||||
<%= l(:button_submit) %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<%#= submit_tag l(:button_submit) %>
|
||||
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
|
||||
</div>
|
||||
|
@ -138,6 +199,7 @@
|
|||
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
$('#issue_notes').val("<%= raw escape_javascript(@content) %>");
|
||||
<%
|
||||
# when quoting a private journal, check the private checkbox
|
||||
if @journal && @journal.private_notes?
|
||||
if @journal && @journal.private_notes?
|
||||
%>
|
||||
$('#issue_private_notes').attr('checked', true);
|
||||
<% end %>
|
||||
//quote_issue_journal()
|
||||
|
||||
showAndScrollTo("update", "notes");
|
||||
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;
|
||||
|
|
|
@ -170,9 +170,9 @@
|
|||
<div class=" mt10">
|
||||
<h3 class="mb10 c_blue">请选择项目类型:</h3>
|
||||
<ul class="mb10" id="project_type">
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14"> 开发模式:<span class="f12 ml5 c_grey">为团队开发提供一系列在线协同工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14"> 研讨模式:<span class="f12 ml5 c_grey">为小组研究提供阶段汇报和交流工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14"> 圈子模式:<span class="f12 ml5 c_grey">为朋友圈提供简洁的交流和分享工具。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 1 ? 'checked' : ''%> id="development_group"/><label class="f14"> 开发模式:<span class="f12 ml5 c_grey">面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 2 ? 'checked' : ''%> id="research_group"/><label class="f14"> 研讨模式:<span class="f12 ml5 c_grey">面向小组研究,支持任务分工、论坛交流、资源分享等。</span></label></li>
|
||||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14"> 圈子模式:<span class="f12 ml5 c_grey">面向好友分享,支持论坛交流、资源分享等。</span></label></li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" class="orange_btn" onclick="click_ok('<%= change_project_type_project_path @project%>');" >确定</a>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %>
|
||||
<hr />
|
||||
|
||||
<h1><%= link_to(h(@project.name), @applied_url) %></h1>
|
||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||
<span style="float: left; width: 526px">
|
||||
<p><%=link_to @user.show_name, user_url(@user) %> 申请加入项目:<%=link_to @project.name, @applied_url %> </p>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %>
|
||||
<%= l(:mail_issue_content)%>
|
||||
<%=link_to @user.show_name, user_url(@user) %>
|
||||
<%=link_to @project.name, @applied_url %>
|
||||
|
||||
|
||||
|
||||
<h1><%= link_to(h(@project.name), @applied_url) %></h1>
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<%# 这些代码删除也没什么影响,暂时放着,待优化 %>
|
||||
<%= wikitoolbar_for 'project_description' %>
|
||||
|
||||
<% @project.custom_field_values.each do |value| %>
|
||||
<p>
|
||||
<%= custom_field_tag_with_label :project, value %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'project_identifier' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function() {
|
||||
$("#project_inherit_members").change(function(){
|
||||
if (!$(this).is(':checked')) {
|
||||
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
|
||||
$("#project_inherit_members").attr("checked", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,23 +1,112 @@
|
|||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
<%= error_messages_for 'project' %>
|
||||
<div class="project_r_h02">
|
||||
<h2 class="project_h2"><%= l(:label_project_new)%></h2>
|
||||
</div>
|
||||
<div class="hwork_new">
|
||||
<ul>
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<li class="ml45">
|
||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label><span class="c_red">*</span> <%= l(:label_projects_new_name)%> :</label>
|
||||
<input type="text" name="project[name]" id="project_name" class="courses_input" maxlength="100" onkeyup="regex_project_name();">
|
||||
<span class="c_red" id="project_name_notice" style="display: none;">项目名称不能为空</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_type_project)%> :</label>
|
||||
<%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>
|
||||
<span class=" ml15 c_orange" id = "project_newtype_select">为团队提供系列在线开发工具!</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label class="fl" > <%= l(:label_tags_project_description) %> :</label>
|
||||
<textarea name="project[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<p style="display: none" >
|
||||
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
|
||||
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<em class="info">
|
||||
<%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %>
|
||||
<%= l(:text_project_identifier_info).html_safe %>
|
||||
</em>
|
||||
<% end %></p>
|
||||
</li>
|
||||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input id="project_is_public" name="project[is_public]" type="checkbox" value="1" checked="checked">
|
||||
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<p style="display:none;">
|
||||
<%= f.text_field :project_type, :value => 0 %>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<%= render :partial => 'form_new', :locals => { :f => f } %>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a>
|
||||
<%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
||||
</ul>
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<div class="project_new">
|
||||
<%=l(:label_project_new)%>
|
||||
<span class="description">
|
||||
</span>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)">
|
||||
<%=raw l(:label_project_new_description)%>
|
||||
</p>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% html_title(l(:label_project_new)) -%>
|
||||
|
||||
<script>
|
||||
//////////////////////////////////////////////////////////////
|
||||
//新建项目
|
||||
//验证项目名称
|
||||
function regex_project_name()
|
||||
{
|
||||
var name = $.trim($("#project_name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#project_name_notice").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_notice").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//提交新建项目
|
||||
function submit_new_project()
|
||||
{
|
||||
if(regex_project_name())
|
||||
{
|
||||
$("#new_project").submit();
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#project_new_type').change(function(){
|
||||
var type = $('#project_new_type').val();
|
||||
if(type == '1'){
|
||||
$(this).next().html("<%= l(:label_type_des_development)%>");
|
||||
}
|
||||
else if(type == '2'){
|
||||
$(this).next().html("<%= l(:label_type_des_research)%>");
|
||||
}
|
||||
else if(type == '3'){
|
||||
$(this).next().html("<%= l(:label_type_des_friend)%>");
|
||||
}
|
||||
// var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值
|
||||
// var p2=$('#param2').val();//获取本页面其他标签的值
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<% html_title(l(:label_project_new)) -%>
|
|
@ -5,9 +5,8 @@
|
|||
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
||||
<label class="label02"><span class="c_red">*</span> 项目名称 :</label>
|
||||
<!--<input id="project_name" name="project[name]" class=" w543" type="text" value="<%#= @project.name%>">-->
|
||||
<input type="text" name="project[name]" id="project_name" class="w543" maxlength="100" onkeyup="regex_project_name();" value="<%= @project.name %>">
|
||||
<span class="c_red ml110" id="project_name_notice" style="display: none;">项目名称不能为空!</span>
|
||||
|
@ -15,7 +14,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<li >
|
||||
<label class="label02" > 描述 :</label>
|
||||
<label class="label02" > 项目描述 :</label>
|
||||
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
@ -24,11 +23,6 @@
|
|||
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02">隐藏代码库 :</label>
|
||||
<input id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" class="blue_btn ml110" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
|
||||
<% end %>
|
||||
|
|
|
@ -118,17 +118,47 @@
|
|||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<li class="homepageNewsPubTypeHomework fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotReadHomework fl":"homepageNewsTypeHomework fl" %>">发布了作业于课程:<%= ma.course_message.course.name %></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl" style="width:315px;"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p><strong>标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.nil? %>
|
||||
<div class="fl"><strong>内容:</strong></div>
|
||||
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -146,7 +176,39 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<%= ma.course_message.name %>
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||
<% else %>
|
||||
|
@ -274,7 +336,13 @@
|
|||
<% if ma.course_message_type == "StudentWorksScore" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<% unless ma.content.nil? %>
|
||||
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
|
||||
|
@ -283,6 +351,13 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style" >
|
||||
<%= ma.content.html_safe %>
|
||||
<p><strong>课程:</strong><%= ma.course.name %>
|
||||
(<%= ma.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%=ma.course_message.student_work.homework_common.name %></p>
|
||||
<% unless ma.course_message.student_work.homework_common.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.student_work.homework_common.description.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -314,7 +389,10 @@
|
|||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
||||
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
|
@ -323,7 +401,16 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<%= ma.course_message.notes %>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.notes %></div>
|
||||
<div class="fl"><strong>您的作品评论:</strong></div>
|
||||
<div class="ml80"><%= ma.course_message.jour.comment %></div>
|
||||
<p><strong>课程:</strong><%= ma.course.name %>(<%= ma.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%=ma.course_message.jour.student_work.homework_common.name %></p>
|
||||
<% unless ma.course_message.jour.student_work.homework_common.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.jour.student_work.homework_common.description.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
@ -577,7 +664,14 @@
|
|||
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style" >
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% if ma.journals_for_message.reply_id == 0 %>
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% else %>
|
||||
<div class="fl"><strong>您的留言:</strong></div>
|
||||
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||
|
||||
|
|
|
@ -284,7 +284,8 @@ zh:
|
|||
label_tags_issue: "问题名称"
|
||||
label_tags_issue_description: 问题描述
|
||||
|
||||
label_tags_project_name: "项目名称:"
|
||||
label_tags_project_name: "项目名称:"
|
||||
label_projects_new_name: "项目名称"
|
||||
label_tags_project_description: "项目描述"
|
||||
|
||||
label_tags_user_mail: "用户邮箱:"
|
||||
|
|
|
@ -60,6 +60,10 @@ zh:
|
|||
label_friend_organization: 圈子模式
|
||||
label_research_group: 研讨模式
|
||||
label_development_team: 开发模式
|
||||
label_type_project: 项目类型
|
||||
label_type_des_development: 开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。
|
||||
label_type_des_research: 研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。
|
||||
label_type_des_friend: 圈子模式:面向好友分享,支持论坛交流、资源分享等。
|
||||
|
||||
label_member: 成员
|
||||
project_module_attachments: 资源
|
||||
|
|
|
@ -369,6 +369,9 @@ $(document).ready(function () {
|
|||
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
|
||||
}
|
||||
|
||||
function quote_issue_journal(){
|
||||
document.getElementById("#issue_notes").focus();
|
||||
}
|
||||
|
||||
/*缺陷完成度决定缺陷状态*/
|
||||
function PrecentChange(obj) {
|
||||
|
@ -502,4 +505,5 @@ function judgeprojectname(){
|
|||
//用户反馈
|
||||
function submitProjectFeedback() {
|
||||
$("#project_feedback_form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -522,7 +522,9 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
|||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
|
||||
.homepageNewsType {width:110px; padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;}
|
||||
.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;}
|
||||
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
||||
.homepageNewsContent {width:365px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageSystenMessageContent {width:291px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
|
@ -978,6 +980,7 @@ img.ui-datepicker-trigger {
|
|||
}
|
||||
/*消息*/
|
||||
.homepageNewsTypeNotRead {width:100px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;}
|
||||
.homepageNewsTypeNotReadHomework {width:170px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;overflow:hidden; height:49px; word-break:break-all; word-wrap:break-word;text-overflow:ellipsis;}
|
||||
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
|
||||
.calendar_div{border: 1px solid #d9d9d9;}
|
||||
/*缺陷更新动态在消息中显示样式*/
|
||||
|
@ -1156,4 +1159,4 @@ a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; c
|
|||
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
||||
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 20px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 20px;}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
.project_content{ width:940px; margin:10px auto;}
|
||||
.project_left{ float:left;}
|
||||
.project_right{ width:670px; float:left;background:#fff; padding:10px;}
|
||||
.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||
|
||||
/*简介*/
|
||||
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d;}
|
||||
|
|
|
@ -858,7 +858,7 @@ div.flash.warning, .conflict {
|
|||
/*弹出框*/
|
||||
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
|
||||
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.white_content02{display:none;position:fixed;top:15%;left:30%;width:450px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
|
||||
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
|
||||
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
|
||||
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||
|
|
Loading…
Reference in New Issue