Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
Conflicts: app/views/boards/_course_new.html.erb db/schema.rb
This commit is contained in:
commit
34dee33edb
|
@ -475,7 +475,6 @@ class AdminController < ApplicationController
|
|||
else
|
||||
@limit = 15#per_page_option
|
||||
end
|
||||
|
||||
@status = params[:status] || 1
|
||||
scope = User.logged.status(@status)
|
||||
scope = scope.like(params[:name],params[:search_by][:id]) if params[:name].present?
|
||||
|
@ -483,8 +482,7 @@ class AdminController < ApplicationController
|
|||
@user_pages = Paginator.new @user_count, @limit, params['page']
|
||||
@user_base_tag = params[:id] ? 'base_users':'base'
|
||||
|
||||
@users = scope.offset(@user_pages.offset).limit(@user_pages.per_page)
|
||||
|
||||
@users = scope.order(sort_clause).offset(@user_pages.offset).limit(@user_pages.per_page).all
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
@groups = Group.all.sort
|
||||
|
|
|
@ -47,6 +47,8 @@ class AtController < ApplicationController
|
|||
find_topic(id)
|
||||
when 'JournalsForMessage'
|
||||
find_journals_for_message(id)
|
||||
when 'Journal'
|
||||
find_journal(id)
|
||||
when 'Principal'
|
||||
find_principal(id)
|
||||
when 'BlogComment'
|
||||
|
@ -159,6 +161,12 @@ class AtController < ApplicationController
|
|||
|
||||
#Journal
|
||||
def find_journal(id)
|
||||
journal = Journal.find id
|
||||
if journal.journalized_type == 'Issue'
|
||||
issue_id = journal.issue.id
|
||||
find_at_users(journal.journalized_type, issue_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#Document
|
||||
|
|
|
@ -121,7 +121,7 @@ class ForumsController < ApplicationController
|
|||
order = ""
|
||||
@order_str = ""
|
||||
if(params[:reorder_complex])
|
||||
order = " last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}"
|
||||
order = "last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}"
|
||||
@order_str = "reorder_complex="+params[:reorder_complex]
|
||||
elsif(params[:reorder_popu])
|
||||
order = "replies_count #{params[:reorder_popu]}"
|
||||
|
@ -166,16 +166,16 @@ class ForumsController < ApplicationController
|
|||
order = ""
|
||||
@order_str = ""
|
||||
if(params[:reorder_complex])
|
||||
order = " last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}"
|
||||
order = "#{Memo.table_name}.sticky desc, last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}"
|
||||
@order_str = "reorder_complex="+params[:reorder_complex]
|
||||
elsif(params[:reorder_popu])
|
||||
order = "replies_count #{params[:reorder_popu]}"
|
||||
order = "#{Memo.table_name}.sticky desc, replies_count #{params[:reorder_popu]}"
|
||||
@order_str = "reorder_popu="+params[:reorder_popu]
|
||||
elsif(params[:reorder_time])
|
||||
order = "#{Memo.table_name}.updated_at #{params[:reorder_time]}"
|
||||
order = "#{Memo.table_name}.sticky desc, #{Memo.table_name}.updated_at #{params[:reorder_time]}"
|
||||
@order_str = "reorder_time="+params[:reorder_time]
|
||||
else
|
||||
order = "#{Memo.table_name}.updated_at desc"
|
||||
order = "#{Memo.table_name}.sticky desc, #{Memo.table_name}.updated_at desc"
|
||||
@order_str = "reorder_time=desc"
|
||||
end
|
||||
@memo = Memo.new(:forum => @forum)
|
||||
|
|
|
@ -156,7 +156,7 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
eval_start = homework_detail_manual.evaluation_start
|
||||
if eval_start.nil? || (Time.parse(eval_start.to_s) <= @homework.end_time && homework_detail_manual.comment_status <= 1)
|
||||
homework_detail_manual.evaluation_start = @homework.end_time + 7
|
||||
homework_detail_manual.evaluation_start = (@homework.end_time + 7*24*60*60).strftime("%Y-%m-%d")
|
||||
homework_detail_manual.evaluation_end = homework_detail_manual.evaluation_start + 7
|
||||
end
|
||||
end
|
||||
|
|
|
@ -50,6 +50,8 @@ class MemosController < ApplicationController
|
|||
@memo = Memo.new(params[:memo])
|
||||
@memo.forum_id = @forum.id
|
||||
@memo.author_id = User.current.id
|
||||
# 问吧置顶sticky:1 置顶;0不置顶
|
||||
@memo.sticky = params[:memo][:sticky].to_i
|
||||
|
||||
if params[:memo][:parent_id]
|
||||
@memo.root_id = (Memo.find params[:memo][:parent_id]).root_id.nil? ? params[:memo][:parent_id].to_i : (Memo.find params[:memo][:parent_id]).root_id
|
||||
|
@ -189,6 +191,14 @@ class MemosController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#置顶功能
|
||||
def change_sticky
|
||||
@memo.sticky ? @memo.update_attribute(:sticky, false) : @memo.update_attribute(:sticky, true)
|
||||
respond_to do |format|
|
||||
format.html { redirect_to forum_memo_path(@memo.forum, @memo) }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_memo
|
||||
|
|
|
@ -67,6 +67,11 @@ class MessagesController < ApplicationController
|
|||
#offset(@reply_pages.offset).
|
||||
#all
|
||||
#@replies = paginateHelper messages_replies,10
|
||||
# 班级帖子消息设为已读
|
||||
@replies.each do |comment|
|
||||
course_message = CourseMessage.where(:course_message_id => comment.id, :user_id => User.current.id, :viewed => 0)
|
||||
course_message.update_all(:viewed => 1)
|
||||
end
|
||||
@left_nav_type = 2
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
@ -196,13 +201,15 @@ class MessagesController < ApplicationController
|
|||
# @reply.reply_id = params[:id]
|
||||
parent.children << @reply
|
||||
else
|
||||
@quote = params[:quote][:quote]
|
||||
#@quote = params[:quote][:quote]
|
||||
@reply = Message.new
|
||||
@reply.author = User.current
|
||||
@reply.board = @board
|
||||
@reply.subject = @topic.subject
|
||||
@reply.content = params[:content]
|
||||
@reply.safe_attributes = params[:reply]
|
||||
@reply.content = @quote + @reply.content
|
||||
@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
#@reply.content = @quote + @reply.content
|
||||
#@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
@reply.root_id = @topic.id
|
||||
@topic.children << @reply
|
||||
# @reply.reply_id = params[:id]
|
||||
|
|
|
@ -33,7 +33,8 @@ class ProjectsController < ApplicationController
|
|||
:view_homework_attaches,:join_project, :project_home, :training_execute, :training_task_status]
|
||||
before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
|
||||
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
||||
before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar]
|
||||
before_filter :require_admin, :only => [ :copy, :unarchive, :calendar]
|
||||
before_filter :require_admin_or_manager, :only => [ :destroy]
|
||||
before_filter :file
|
||||
|
||||
|
||||
|
@ -799,7 +800,7 @@ class ProjectsController < ApplicationController
|
|||
GITLABTYPE = "Repository::Gitlab"
|
||||
def archive
|
||||
if request.post?
|
||||
if @project.archive && @project.gpid
|
||||
if @project.destroy && @project.gpid
|
||||
# 删除版本库信息
|
||||
begin
|
||||
g = Gitlab.client
|
||||
|
@ -811,6 +812,7 @@ class ProjectsController < ApplicationController
|
|||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
@project.update_column(:gpid, nil)
|
||||
@project.update_column(:forked_from_project_id, nil)
|
||||
else
|
||||
flash[:error] = l(:error_can_not_archive_project)
|
||||
end
|
||||
|
@ -1108,36 +1110,52 @@ class ProjectsController < ApplicationController
|
|||
redirect_to project_url(@project)
|
||||
end
|
||||
|
||||
REP_TYPE = "Repository::Gitlab"
|
||||
# Delete @project
|
||||
def destroy
|
||||
@project_to_destroy = @project
|
||||
@project_to_destroy.destroy
|
||||
ActiveRecord::Base.transaction do
|
||||
g = Gitlab.client
|
||||
g.delete_project(@project.gpid)
|
||||
# 删除Trustie版本库记录
|
||||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
@project.update_column(:gpid, nil)
|
||||
@project.update_column(:forked_from_project_id, nil)
|
||||
@project_to_destroy = @project
|
||||
@project_to_destroy.destroy
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html { redirect_to admin_projects_url }
|
||||
format.api { render_api_ok }
|
||||
if params[:type] == "project"
|
||||
format.html{redirect_to user_path(User.current)}
|
||||
else
|
||||
format.html{redirect_to admin_projects_url(:status => params[:status])}
|
||||
end
|
||||
end
|
||||
# hide project in layout
|
||||
@project = nil
|
||||
end
|
||||
|
||||
REP_TYPE = "Repository::Gitlab"
|
||||
|
||||
# Delete @project's repository
|
||||
def destroy_repository
|
||||
if is_project_manager?(User.current.id, @project.id)
|
||||
@gitlab_repository = Repository.where(:project_id => @project, :type => REP_TYPE).first
|
||||
@is_true = params[:is_true]
|
||||
if @is_true
|
||||
unless @is_true.nil?
|
||||
begin
|
||||
g = Gitlab.client
|
||||
g.delete_project(@project.gpid)
|
||||
@gitlab_repository.destroy
|
||||
@gitlab_repository = nil
|
||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@project.update_attribute(:gpid, nil)
|
||||
d_project = g.delete_project(@project.gpid)
|
||||
if d_project
|
||||
@gitlab_repository.destroy
|
||||
@project.update_attribute(:gpid, nil)
|
||||
@gitlab_repository = nil
|
||||
end
|
||||
rescue Exception => e
|
||||
puts e
|
||||
if @gitlab_repository
|
||||
@gitlab_repository.destroy
|
||||
@project.update_attribute(:gpid, nil)
|
||||
@gitlab_repository = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
|
@ -1299,6 +1317,13 @@ class ProjectsController < ApplicationController
|
|||
return projects
|
||||
end
|
||||
|
||||
#gcmend
|
||||
def require_admin_or_manager
|
||||
return unless require_login
|
||||
if !(User.current.admin? || User.current.manager_of_project?(@project.id))
|
||||
render_403
|
||||
return false
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ class StudentWorkController < ApplicationController
|
|||
student_work.name = params[:title]
|
||||
student_work.description = params[:src]
|
||||
|
||||
if @homework.end_time < Time.now.to_s
|
||||
if !is_test && @homework.end_time < Time.now.to_s
|
||||
student_work.late_penalty = @homework.late_penalty
|
||||
else
|
||||
student_work.late_penalty = 0
|
||||
|
|
|
@ -1436,8 +1436,8 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
homework_detail_manual.evaluation_start = homework.end_time + 7 if homework.end_time
|
||||
homework_detail_manual.evaluation_end = homework.end_time + 14 if homework.end_time
|
||||
homework_detail_manual.evaluation_start = (homework.end_time + 7*24*60*60).strftime("%Y-%m-%d") if homework.end_time
|
||||
homework_detail_manual.evaluation_end = homework_detail_manual.evaluation_start + 7 if homework.end_time
|
||||
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
|
||||
homework_detail_manual.absence_penalty = 0
|
||||
homework.homework_detail_manual = homework_detail_manual
|
||||
|
@ -2089,6 +2089,8 @@ class UsersController < ApplicationController
|
|||
|
||||
def show
|
||||
if User.current == @user
|
||||
# 点击小铃铛,更新点击时间
|
||||
update_onclick_time if params[:click_user_message] == 'true'
|
||||
# 全部设为已读
|
||||
# 自己的主页显示消息
|
||||
messages_all = MessageAll.where(:user_id => @user.id)
|
||||
|
|
|
@ -202,6 +202,7 @@ class VersionsController < ApplicationController
|
|||
@is_setting = params[:is_setting]
|
||||
@is_create = params[:is_create]
|
||||
@is_index = params[:is_index]
|
||||
@version_id = params[:id]
|
||||
end
|
||||
|
||||
def update
|
||||
|
@ -276,10 +277,11 @@ class VersionsController < ApplicationController
|
|||
end
|
||||
|
||||
# 判断里程碑是否重名
|
||||
# 项目内的里程碑不能重名,项目之间的里程碑能重名
|
||||
def judge_version_title
|
||||
begin
|
||||
version = Version.where(:name => params[:version_name], :project_id => @project.id).first
|
||||
if version.blank?
|
||||
if version.blank? || version.id == params[:version_id].to_i
|
||||
result = {:result => true}
|
||||
else
|
||||
result = {:result => false}
|
||||
|
|
|
@ -3,7 +3,7 @@ class BidingProject < ActiveRecord::Base
|
|||
attr_accessible :bid_id, :project_id, :user_id, :description,:reward
|
||||
|
||||
belongs_to :bid
|
||||
belongs_to :project
|
||||
# belongs_to :project
|
||||
belongs_to :user
|
||||
|
||||
DESCRIPTION_LENGTH_LIMIT = 500
|
||||
|
|
|
@ -111,8 +111,9 @@ class HomeworkCommon < ActiveRecord::Base
|
|||
#作业微信通知delay
|
||||
def send_homework_wechat_message_delay
|
||||
self.course.members.each do |m|
|
||||
# if m.user_id != self.user_id
|
||||
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
if m.user_id != self.user_id
|
||||
self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false)
|
||||
end
|
||||
rolesids = []
|
||||
m.roles.each do |role|
|
||||
rolesids << role.id
|
||||
|
|
|
@ -70,8 +70,8 @@ class Project < ActiveRecord::Base
|
|||
has_many :repositories, :dependent => :destroy, conditions: "hidden=false"
|
||||
has_many :changesets, :through => :repository
|
||||
#added by xianbo for delete biding_project
|
||||
has_many :biding_projects, :dependent => :destroy
|
||||
has_many :contesting_projects, :dependent => :destroy
|
||||
# has_many :biding_projects, :dependent => :destroy
|
||||
# has_many :contesting_projects, :dependent => :destroy
|
||||
has_many :softapplications, :through => :projecting_softapplications
|
||||
#ended by xianbo
|
||||
# added by fq
|
||||
|
|
|
@ -929,6 +929,15 @@ class User < Principal
|
|||
end
|
||||
end
|
||||
|
||||
def manager_of_project?(project_id)
|
||||
@result = false
|
||||
mem = Member.where("user_id = ? and project_id = ?", self.id, project_id)
|
||||
unless mem.blank?
|
||||
@result = mem.first.roles.to_s.include?("Manager") ? true : false
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
# 判断是否是竞赛的主办人
|
||||
def admin_of_contest?(contest)
|
||||
if contest.nil?
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#search_course_input").bind('change',function(e){
|
||||
search_courses(e)
|
||||
});
|
||||
function school_submit() {
|
||||
var checkboxs = $("input[name='school_id[]']:checked");
|
||||
if(checkboxs.length == 0) {
|
||||
|
@ -34,22 +37,9 @@
|
|||
url: '<%= url_for(:controller => 'admin', :action => 'all_schools') %>'+'?search='+ e.target.value+'&school_id=<%=edit_id %>',
|
||||
type:'get',
|
||||
data: {is_observe:true},
|
||||
success: function(data){ },
|
||||
success: function(data){ },
|
||||
beforeSend: function(){ $(this).addClass('ajax-loading'); },
|
||||
complete: function(){ $(this).removeClass('ajax-loading'); }
|
||||
});
|
||||
}
|
||||
|
||||
function throttle(method,context,e){
|
||||
clearTimeout(method.tId);
|
||||
method.tId=setTimeout(function(){
|
||||
method.call(context,e);
|
||||
},500);
|
||||
}
|
||||
|
||||
//查询项目
|
||||
$("input[name='search']").on('input', function (e) {
|
||||
throttle(search_courses,window,e);
|
||||
});
|
||||
|
||||
</script>
|
|
@ -24,4 +24,4 @@
|
|||
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div id="new_course_topic">
|
||||
<div class="homepagePostBrief c_grey">
|
||||
<div>
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox w713" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox w713" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<p id="subjectmsg"></p>
|
||||
</div>
|
||||
<div id="topic_editor" style="display: none;">
|
||||
|
|
|
@ -26,8 +26,11 @@
|
|||
<%= link_to image_tag(url_to_avatar(topic.author), :width => 50,:height => 50,:alt => '贴吧图片'), user_path(topic.author) if topic.author%>
|
||||
</div>
|
||||
<div class="postDetailWrap">
|
||||
<div class="postDetailTitle fl">
|
||||
<a href="<%= forum_memo_path(topic.forum, topic) %>" class="f14 linkGrey4 fb"><%=topic.subject%></a>
|
||||
<div class="postDetailTitle" style="display: inline-block;">
|
||||
<a href="<%= forum_memo_path(topic.forum, topic) %>" class="fl f14 linkGrey4 fb" style="max-width: 550px"><%= topic.subject %></a>
|
||||
<% if topic.sticky && !params[:id].blank? %>
|
||||
<span class="fl ml10 red-cir-btn">顶</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailReply fr">
|
||||
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
|
||||
|
|
|
@ -94,10 +94,10 @@
|
|||
</div>
|
||||
|
||||
<div class="navHomepageNews" id="user_messages">
|
||||
<%= link_to "", user_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
|
||||
<%= link_to "", user_path(User.current, :click_user_message => true), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
|
||||
<% new_message_count = User.current.count_new_message.to_i %>
|
||||
<% if new_message_count > 0 %>
|
||||
<div ><%= link_to new_message_count, user_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
|
||||
<div ><%= link_to new_message_count, user_path(User.current, :click_user_message => true), :class => "newsActive", :target => "_Blank" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<div class="shadowbox_news undis" id="user_messages_list">
|
||||
|
|
|
@ -6,7 +6,16 @@
|
|||
<div class="wenba-tiwen-con">
|
||||
<ul >
|
||||
<li class="mb10">
|
||||
<%= f.text_field :subject, :no_label => true, :id => "memo_subject", :maxlength => "50", :style => "width:708px", :onblur => "check_memo_name();", :onfocus => "$('#memo_name_error_tips').hide();", :onmouseover => "this.style.borderColor='#d9d9d9'", :class => "wenba-tiwen-input", :placeholder => "请输入标题" %>
|
||||
<%= f.text_field :subject,
|
||||
:no_label => true,
|
||||
:id => "memo_subject",
|
||||
:maxlength => "50",
|
||||
:style => "width:708px",
|
||||
:onblur => "check_memo_name();",
|
||||
:onfocus => "$('#memo_name_error_tips').hide();",
|
||||
:onmouseover => "this.style.borderColor='#d9d9d9'",
|
||||
:class => "wenba-tiwen-input",
|
||||
:placeholder => "请输入标题" %>
|
||||
<p class="c_red" style="display: none" id="memo_name_error_tips"></p>
|
||||
<script>
|
||||
var textarea1 = document.getElementById('memo_subject');
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
<ul class="homepagePostSettiongText">
|
||||
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
||||
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
||||
<% if @memo.sticky %>
|
||||
<li><a href="<%= change_sticky_forum_memo_path(@memo.forum,@memo) %>" class="postOptionLink">取消置顶</a></li>
|
||||
<% else %>
|
||||
<li><a href="<%= change_sticky_forum_memo_path(@memo.forum,@memo) %>" class="postOptionLink">置顶</a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
|
||||
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum, @memo) %>" data-method="delete" id="del_memo_link" ></a></li>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
@ -165,11 +165,21 @@
|
|||
<em class="talkWrapArrow"></em>
|
||||
<div class="cl"></div>
|
||||
<div class="talkConIpt ml5 mb10" id="reply<%= @topic.id %>">
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'project_board_cancel_message_replay();', :class => "grey_btn fr c_white mt10 mr5 ml10" %>
|
||||
<%= link_to l(:button_submit), "javascript:void(0)", :onclick => 'project_board_submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-left: 50px;" %>
|
||||
<% end %>
|
||||
<div nhname='new_message_<%= @topic.id%>' style="display:none;">
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%#= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'project_board_cancel_message_replay();', :class => "grey_btn fr c_white mt10 mr5 ml10" %>
|
||||
<%#= link_to l(:button_submit), "javascript:void(0)", :onclick => 'project_board_submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-left: 50px;" %>
|
||||
<input type="hidden" name="journal_id" value="<%= @topic.id %>"/>
|
||||
<div nhname='toolbar_container_<%= @topic.id %>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @topic.id%>' name="content"></textarea>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @topic.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @topic.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -40,7 +40,17 @@
|
|||
<li> </li>
|
||||
</ul>
|
||||
<ul class="setting_right ">
|
||||
<li><%= f.text_field :login,:no_label=>true, :required => true, :style => "color:grey", :nh_required => "1", :name => "login", :class => "w210" %></li>
|
||||
<li>
|
||||
<%= f.text_field :login,
|
||||
:no_label => true,
|
||||
:required => true,
|
||||
:style => "color:grey",
|
||||
:disabled => 'disabled',
|
||||
:nh_required => "1",
|
||||
:name => "login",
|
||||
:class => "w210"
|
||||
%>
|
||||
</li>
|
||||
<% if @force %>
|
||||
<li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required => "1",:class=>"w210",:disabled=>'disabled'%></li>
|
||||
<% else %>
|
||||
|
|
|
@ -47,11 +47,6 @@
|
|||
<input class="fl mt8 ml5" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.try(:roles).to_s.include?("Manager") %>
|
||||
<%= link_to(l(:button_delete_project), { :controller => 'projects', :action => 'archive', :id => @project, :status => params[:status], :type =>"project" },
|
||||
:data => {:confirm => l(:text_delete_project_are_you_sure)}, :method => :post, :class => "sy_btn_grey mr5 fl ml15") unless @project.archived? %>
|
||||
<p class="fl c_grey">(友情提示:删除该项目后如果您想恢复该项目,请联系系统管理员!)</p>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" class="sy_btn_blue mr15 fr" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<%= f.text_field :identifier, :disabled => @repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<%= f.text_field :identifier, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.journals_for_message.notes),
|
||||
feedback_path(ma.journals_for_message.jour_id,
|
||||
feedback_path(ma.journals_for_message.reply_id == 0 ? ma.journals_for_message.jour_id : ma.journals_for_message.user_id,
|
||||
:anchor => "user_activity_#{ma.journals_for_message.id}"),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank'%>
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
url:"<%= judge_version_title_project_versions_path(:project_id => @project) %>",
|
||||
type: "GET",
|
||||
data: {
|
||||
version_name: $.trim($("#popub_setting_version_name").val())
|
||||
version_name: $.trim($("#popub_setting_version_name").val()),
|
||||
version_id: <%= version_id %>
|
||||
},
|
||||
success:function(data){
|
||||
if(data.result == true) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var htmlvalue = "<%= escape_javascript(render :partial => 'versions/edit') %>";
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'versions/edit', :locals => {:version_id => @version_id}) %>";
|
||||
pop_box_new(htmlvalue,820,316);
|
||||
var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
||||
$(function() { $('#version_effective_date2').datepicker(datepickerOptions);
|
||||
|
|
|
@ -476,6 +476,9 @@ RedmineApp::Application.routes.draw do
|
|||
collection do
|
||||
get "quote"
|
||||
end
|
||||
member do
|
||||
get "change_sticky"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ a.sortArrowActiveU {background:url(../images/post_image_list.png) -17px -20px no
|
|||
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
|
||||
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
|
||||
.postDetailWrap {width:655px; float:left;}
|
||||
.postDetailTitle {width:570px; max-width:570px; margin-bottom:5px;}
|
||||
.postDetailTitle {max-width:600px; margin-bottom:5px;}
|
||||
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
|
||||
/*.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}*/
|
||||
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
|
|
Loading…
Reference in New Issue