Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
commit
680c7e75cf
@ -1,6 +1,36 @@
|
||||
class CooperatesController < ApplicationController
|
||||
before_filter :require_login
|
||||
before_filter :find_partner, only: [:partner_list]
|
||||
before_filter :is_admin, only: [:partner_list]
|
||||
|
||||
def show
|
||||
def partner_list
|
||||
search = params[:search]
|
||||
@schools = School.where(customer_id: @partner.customer_ids)
|
||||
@all_count = @schools.size
|
||||
|
||||
unless search.blank?
|
||||
@schools = @schools.where("name like ?", "%#{search}%")
|
||||
end
|
||||
@search_count = @schools.size
|
||||
@schools = paginateHelper @schools, 15
|
||||
@schools = @schools.includes(:courses, users: :user_extensions)
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html{render :layout => "base_edu"}
|
||||
end
|
||||
end
|
||||
|
||||
def find_partner
|
||||
@partner = Partner.find_by_id(params[:id])
|
||||
render_404 if @partner.nil?
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
def is_admin
|
||||
unless User.current.admin? || (User.current.partner.present? && User.current.partner == @partner)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,29 @@
|
||||
class PartnersController < ApplicationController
|
||||
layout 'base_management'
|
||||
|
||||
def index
|
||||
@menu_type = 6
|
||||
@sub_type = 3
|
||||
|
||||
@partners = Partner.includes(:school)
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
end
|
||||
|
||||
def edit
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class Customer < ActiveRecord::Base
|
||||
default_scope :order => 'customers.created_at desc'
|
||||
belongs_to :partner
|
||||
has_one :school
|
||||
has_many :users
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
class Partner < ActiveRecord::Base
|
||||
# attr_accessible :name, :active
|
||||
attr_accessor :active
|
||||
|
||||
has_one :school
|
||||
has_many :customers
|
||||
has_many :users
|
||||
end
|
@ -1 +1,5 @@
|
||||
notice_box_redirect("<%= signin_path %>", "登录密码已重置,请重新登录");
|
||||
<% if @status.present? %>
|
||||
notice_box("验证码有误,请重新输入");
|
||||
<% else %>
|
||||
notice_box_redirect("<%= signin_path %>", "登录密码已重置,请重新登录");
|
||||
<% end %>
|
@ -0,0 +1,42 @@
|
||||
<div id="Auth_main">
|
||||
<div class="educontent mb30 mt20">
|
||||
|
||||
<div class="clearfix padding20-30 bor-bottom-greyE edu-back-white">
|
||||
<span class="fl font-12 mt5">
|
||||
<span class="color-orange-tip mr3" id="search_partner_count"><%= @obj_count %></span>
|
||||
<span class="color-grey-9">个检索结果(<span id="all_major_count"><%= @all_count %></span> 单位)</span>
|
||||
</span>
|
||||
<div class="fr" id="pollingPanel">
|
||||
<input type="text" name="search" maxlength="20" placeholder="请输入单位名称搜索" />
|
||||
<a href="javascript:void(0)" onclick="submit_search_major()"><i class="iconfont icon-sousuo font-16 color-grey-9"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ListTableLine ListTableLines" id="partner_school_list">
|
||||
<%= render :partial => "partner_item" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$("#pollingPanel").on("keydown", "input[name='search']", function(e){
|
||||
// 兼容FF和IE和Opera
|
||||
var theEvent = e || window.event;
|
||||
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code == 13) {
|
||||
//回车执行查询
|
||||
submit_search_major()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function submit_search_major(){
|
||||
$.get('/cooperates/<%= @partner.id %>/partner_list',
|
||||
{ search: $("input[name='search']").val().trim()});
|
||||
}
|
||||
|
||||
</script>
|
@ -0,0 +1,2 @@
|
||||
$("#partner_school_list").html("<%= j(render :partial => "partner_item") %>");
|
||||
$("#search_partner_count").html("<%= @obj_count %>");
|
@ -1 +1 @@
|
||||
$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
|
||||
$("#intelligence_course_list").html("<%= j(render :partial => "courses/courseList") %>");
|
||||
|
@ -0,0 +1,100 @@
|
||||
<div class="task-popup" style="width: 572px;">
|
||||
<div class="task-popup-title clearfix">添加客户</div>
|
||||
<div class="task_popup_con">
|
||||
<div class="clearfix mb5 df">
|
||||
<div class="flex1">
|
||||
<%= render partial: "managements/customers_search_form" %>
|
||||
</div>
|
||||
<a href="javascript:void(0);" onclick="$('#partners_search_form').submit()" class="white-btn mt6 edu-blueback-btn fl ml15 mt55">搜索</a>
|
||||
</div>
|
||||
<div class="mb4 clearfix">
|
||||
<p class="pl10 color-grey-6 clearfix">
|
||||
<span class="fl ml25">单位</span>
|
||||
<span class="fr with30">地区</span>
|
||||
</p>
|
||||
<div class="edu-back-skyblue clearfix pl10 over280" id="search_customers_list">
|
||||
<%= render :partial => "partners_list" %>
|
||||
</div>
|
||||
<p class="clearfix" style="height: 20px;"><span class="fl lineh-20 none color-red" id="checkNotice"></span></p>
|
||||
</div>
|
||||
|
||||
<li class="clearfix mt10 edu-txt-center">
|
||||
<a href="javascript:void(0);" class="task-btn mr10" onclick="hideModal()">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange ml20" onclick="submit_add_partner()">确定</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var ci = 1; //设置当前页数
|
||||
var msg_list_loading = false;
|
||||
$(function() {
|
||||
$(function() {
|
||||
var totalpage = <%= @total_pages.to_i %>; //总页数,防止超过总页数继续滚动
|
||||
var winH = $(window).height(); //页面可视区域高度
|
||||
|
||||
$("#search_customers_list").scroll(function() {
|
||||
if (ci < totalpage) { // 当滚动的页数小于总页数的时候,继续加载
|
||||
var pageH = $(document.body).height();
|
||||
|
||||
var scrollT = $(window).scrollTop(); //滚动条top
|
||||
var aa = (pageH - winH - scrollT) / winH;
|
||||
console.log(aa);
|
||||
if ( !msg_list_loading ){
|
||||
if (aa < 0.01 ) {
|
||||
get_schools(ci+1)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function get_schools(page) {
|
||||
var msg_list = $('#search_customers_list');
|
||||
if (msg_list.height() + msg_list[0].scrollTop >= msg_list[0].scrollHeight - 60) {
|
||||
msg_list_loading = true;
|
||||
$.getJSON("<%= all_path %>?partner_id=<%= @partner.id %>&page="+page+"&search="+$("#partner_name_search").val()+"&province="+$("#partner_province").val(), function(schools) {
|
||||
if (schools) {
|
||||
msg_list_loading = false;
|
||||
var s_html = "";
|
||||
$.each(schools,function (index,array) {
|
||||
s_html = s_html+ "<p class='clearfix mt5'>" +
|
||||
" <span class='fl with70'>" +
|
||||
" <span>" +
|
||||
" <input type='checkbox' name='school[]' value='"+array["school"]["id"]+"' id='school_"+array["school"]["id"]+"' class='magic-checkbox'>" +
|
||||
" <label for='school_"+array["school"]["id"]+"'>"+array["school"]["name"]+"</label>" +
|
||||
" </span>\n" +
|
||||
" </span>\n" +
|
||||
" <span class='fl with30'>"+array["school"]["province"]+"</span>" +
|
||||
" </p>"
|
||||
});
|
||||
$("#search_customers_list").append(s_html);
|
||||
ci ++;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function submit_add_partner(){
|
||||
if($("input[name='school[]']:checked").length==0){
|
||||
$("#checkNotice").html("请选择需要添加的内容").removeClass("none");
|
||||
return;
|
||||
}else{
|
||||
var checked_array = [];
|
||||
$("input[name='school[]']:checked").each(function () {
|
||||
checked_array.push($(this).val())
|
||||
});
|
||||
$.ajax({
|
||||
url: "/managements/add_customers",
|
||||
type: 'POST',
|
||||
data: {school_ids: checked_array, partner_id: <%= @partner.id %>},
|
||||
success: function (e) {
|
||||
if(e.status === 1){
|
||||
hideModal();
|
||||
window.location.href = "<%= partners_managements_path(partner: @partner.id) %>";
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
@ -0,0 +1,19 @@
|
||||
<%= form_for "", :url => {:controller=> 'managements', :action => 'customers_list', :partner_id => @partner.id}, :html => {:id => 'partners_search_form'}, :method => "get", :remote => true do |f| %>
|
||||
<div class="df">
|
||||
<span class="fl lineh-35">地区:</span>
|
||||
<select placeholder="请选择地区" name="province" id="partner_province" class="flex1"></select>
|
||||
</div>
|
||||
<div class="df mt15">
|
||||
<span class="fl lineh-35">单位:</span>
|
||||
<input type="text" class="input-flex-35" name="search" placeholder="请输入单位关键字" id="partner_name_search"/>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
unitDownOption();
|
||||
showprovince("partner_province");
|
||||
})
|
||||
|
||||
</script>
|
@ -0,0 +1,20 @@
|
||||
<li class="clearfix tableHead">
|
||||
<span>序号</span>
|
||||
<span>客户名称</span>
|
||||
<span><a href="<%= customers_list_managements_path(:partner_id => @current_partner.try(:id)) %>"
|
||||
data-remote="true" class="color-blue">+添加</a></span>
|
||||
<span>添加时间</span>
|
||||
</li>
|
||||
<% @current_partner.try(:customers).try(:each_with_index) do |customer, index| %>
|
||||
<li>
|
||||
<span><%= index + 1 %></span>
|
||||
<span class="task-hide"><%= customer.school.name %></span>
|
||||
<span>
|
||||
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= delete_customers_managements_path(customer: customer.id) %>',
|
||||
'确定要删除该客户吗')" class="color-grey-9">删除</a>
|
||||
</span>
|
||||
<span>
|
||||
<%= format_time customer.created_at %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
@ -0,0 +1,5 @@
|
||||
<% @partners.each_with_index do |partner,index| %>
|
||||
<li>
|
||||
<%= link_to "#{partner.name}", partners_managements_path(:partner => partner), :class => "#{partner.id == @current_partner.id ? 'active' : ''}" %>
|
||||
</li>
|
||||
<% end %>
|
@ -0,0 +1,25 @@
|
||||
<% if @current_partner.present? %>
|
||||
<div class="with75 fl pl20">
|
||||
<div class="edu-back-white">
|
||||
<div>
|
||||
<div class="padding10-20">
|
||||
<p class="mb20"><span class="mr30 color-grey-9">添加时间</span><span class="color-grey-6"><%= format_time @current_partner.try(:created_at) %></span></p>
|
||||
<div class="clearfix">
|
||||
<span class="mr45 color-grey-9 fl">管理员</span>
|
||||
<ul class="manageList">
|
||||
<li>
|
||||
<%= link_to '+', add_partner_member_box_managements_path(:partner => @current_partner.try(:id)), :remote => true, :class => "addManage" %>
|
||||
</li>
|
||||
<div id="partner_member_list" class="fl">
|
||||
<%= render :partial => "partner_member_list", :locals => {partner: @current_partner} %>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableList" id="partner_customer_list">
|
||||
<%= render :partial => "partner_customer_list" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
@ -0,0 +1,10 @@
|
||||
<% partner.users.each do |user| %>
|
||||
<li>
|
||||
<%= image_tag(url_to_avatar(user)) %>
|
||||
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= delete_partner_member_managements_path(partner: partner.id,
|
||||
partner_member: user.id) %>', '确定要删除该管理员吗')" class="removeImg">
|
||||
<i class="iconfont icon-htmal5icon19 color-grey-9"></i>
|
||||
</a>
|
||||
<span class="task-hide managementName"><%= user.show_real_name %></span>
|
||||
</li>
|
||||
<% end %>
|
@ -0,0 +1,11 @@
|
||||
<% @members.each do |member| %>
|
||||
<p class="clearfix">
|
||||
<span class="fl edu-txt-w90">
|
||||
<input type="checkbox" name="partner_member[]" value="<%= member.id %>" id="user_<%= member.id %>" class="magic-checkbox">
|
||||
<label for="user_<%= member.id %>"><%= member.show_real_name %></label>
|
||||
</span>
|
||||
<span class="fl edu-txt-w90 mt5 edu-txt-center color-grey-6 pointer"><%= member.identity %></span>
|
||||
<span class="fl task-hide edu-txt-w200 mt5 edu-txt-left color-grey-9"><%= member.school_name %> </span>
|
||||
<span class="fl edu-txt-w100 mt5 edu-txt-center color-grey-9"><%= member.phone %></span>
|
||||
</p>
|
||||
<% end %>
|
@ -0,0 +1,19 @@
|
||||
<%= form_for "", :url => {:controller=> 'managements', :action => 'all_partners', :type => @type}, :html => {:id => 'partners_search_form'}, :method => "get", :remote => true do |f| %>
|
||||
<div class="df">
|
||||
<span class="fl lineh-35">地区:</span>
|
||||
<select placeholder="请选择地区" name="province" id="partner_province" class="flex1"></select>
|
||||
</div>
|
||||
<div class="df mt15">
|
||||
<span class="fl lineh-35">单位:</span>
|
||||
<input type="text" class="input-flex-35" name="search" placeholder="请输入单位关键字" id="partner_name_search"/>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
unitDownOption();
|
||||
showprovince("partner_province");
|
||||
})
|
||||
|
||||
</script>
|
@ -0,0 +1,11 @@
|
||||
<% @schools.each do |school| %>
|
||||
<p class='clearfix mt5'>
|
||||
<span class='fl with70'>
|
||||
<span>
|
||||
<input type='checkbox' name='school[]' value='<%= school.id %>' id='school_<%= school.id %>' class='magic-checkbox'>
|
||||
<label for='school_<%= school.id %>'><%= school.name %></label>
|
||||
</span>
|
||||
</span>
|
||||
<span class='fl with30'><%= school.province %></span>
|
||||
</p>
|
||||
<% end %>
|
@ -0,0 +1 @@
|
||||
$("#partner_member_list").html("<%= j(render :partial => "partner_member_list", :locals => {partner: @partner}) %>")
|
@ -0,0 +1,6 @@
|
||||
<% if params[:search] %>
|
||||
$("#member_search_user_list").html("<%= j(render :partial => "partner_member_search_list") %>")
|
||||
<% else %>
|
||||
var html="<%= escape_javascript(render :partial => "managements/partner_addManage") %>";
|
||||
pop_box_new(html,572,500);
|
||||
<% end %>
|
@ -0,0 +1,6 @@
|
||||
<% if params[:search] %>
|
||||
$("#search_user_list").html("<%= j(render :partial => "partners_list") %>")
|
||||
<% else %>
|
||||
var html="<%= escape_javascript(render :partial => "managements/partner_addUnit",locals: {all_path: all_partners_managements_path}) %>";
|
||||
pop_box_new(html,572,500);
|
||||
<% end %>
|
@ -0,0 +1,6 @@
|
||||
<% if params[:search] %>
|
||||
$("#search_customers_list").html("<%= j(render :partial => "partners_list") %>")
|
||||
<% else %>
|
||||
var html="<%= escape_javascript(render :partial => "managements/customer_addUnit",locals: {all_path: customers_list_managements_path}) %>";
|
||||
pop_box_new(html,572,500);
|
||||
<% end %>
|
@ -0,0 +1 @@
|
||||
$("#partner_customer_list").html("<%= j(render :partial => "partner_customer_list") %>")
|
@ -0,0 +1 @@
|
||||
$("#partner_member_list").html("<%= j(render :partial => "partner_member_list", :locals => {partner: @partner}) %>")
|
@ -0,0 +1,32 @@
|
||||
<div class="mt20">
|
||||
<div class="clearfix edu-back-white padding20-30">
|
||||
<input class="fl task-form-20 task-height-30" placeholder="输入合作伙伴名称进行搜索" id="partner_search">
|
||||
<a href="javascript:void(0)" class="fl task-btn task-btn-orange ml10" onclick="submit_search_partner()">搜索</a>
|
||||
<a href="javascript:void(0)" class="fl task-btn ml10" onclick="$('#partner_search').val('')">清除</a>
|
||||
</div>
|
||||
<div class="clearfix mt20">
|
||||
<div class="with25 fl edu-back-white">
|
||||
<%= link_to "+添加",all_partners_managements_path,remote:true,class:"color-blue addOperation" %>
|
||||
<ul class="partnerList" id="partner_list">
|
||||
<%= render :partial => "partner_list" %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="partner_main_div">
|
||||
<%= render :partial => "partner_main_div" %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$(".partnerList li").on("click","a",function(){
|
||||
$(".partnerList li a").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
})
|
||||
|
||||
function submit_search_partner(){
|
||||
$.get("/managements/partners?search="+$("#partner_search").val());
|
||||
}
|
||||
</script>
|
@ -0,0 +1,2 @@
|
||||
$("#partner_list").html("<%= j(render :partial => "partner_list") %>");
|
||||
$("#partner_main_div").html("<%= j(render :partial => "partner_main_div") %>");
|
@ -1,2 +1,2 @@
|
||||
$("#management_shixun_feedback_list").html("<%= j(render :partial => 'shixun_feedback_list') %>");
|
||||
$("#shixun_search").attr("href", "<%= shixun_feedback_message_managements_path(:search => @search, :format => "xls") %>")
|
||||
$("#shixun_search").attr("href", "<%= shixun_feedback_message_managements_path(:search => @search, :beginTime => @beginTime, :endTime => @endTime,:format => "xls") %>")
|
@ -1,86 +0,0 @@
|
||||
<div id="Auth_main">
|
||||
<div class="educontent clearfix edu-back-white bor-bottom-greyE">
|
||||
<div class="padding20-30">
|
||||
<!-- <p class="mb20"><span class="font-18 mr20">管理员</span><span class="font-12 color-grey-9"></span></p>-->
|
||||
<!-- <ul class="clearfix managerPanels">-->
|
||||
|
||||
<!-- <a class="fl relative">-->
|
||||
<!-- <img alt="头像" class="radius" height="48" src="https://www.educoder.net/images/avatars/User/6?1543479003" width="48" />-->
|
||||
<!-- <i class="iconfont icon-shanchudiao userimg color-grey-9" ></i>-->
|
||||
<!-- <span class="color-black">达达老师</span>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- <a class="fl relative">-->
|
||||
<!-- <i class="iconfont icon-tianjiafangda useradd color-grey-9"></i>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- </ul>-->
|
||||
|
||||
<!-- <ul class="clearfix managerPanels">-->
|
||||
<!-- <a class="fl font-16 padding5-20 block mr30 navItem active color-blue"><span class="fl">实训回复</span></a>-->
|
||||
<!-- </ul>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="educontent mb30">
|
||||
|
||||
<div class="clearfix padding20-30 bor-bottom-greyE edu-back-white">
|
||||
<span class="fl font-12 mt5">
|
||||
<span class="color-orange-tip mr3" id="search_major_count"><%= @obj_count %></span>
|
||||
<span class="color-grey-9">个检索结果(<span id="all_major_count"><%= @major_count %></span> 单位)</span>
|
||||
</span>
|
||||
<div class="fr" id="pollingPanel">
|
||||
<input type="text" name="search" placeholder="请输入单位名称搜索" />
|
||||
<a href="javascript:void(0)" onclick="submit_search_major()"><i class="iconfont icon-sousuo font-16 color-grey-9"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ListTableLine ListTableLines" id="school_major_list">
|
||||
<%= render :partial => "department_list" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$(".MajorName i").click(function(){
|
||||
$(this).parents(".MajorName").remove();
|
||||
});
|
||||
|
||||
$("#school_major_list").on("click", ".addMajorManager", function(){
|
||||
if($("#major_managers_"+$(this).attr("data-major-id")).children("span").length < 5){
|
||||
var html="<%= escape_javascript(render :partial => "ecs/authList_addUnit") %>";
|
||||
pop_box_new(html,572,500);
|
||||
$("#object_id").val($(this).attr("data-major-id"));
|
||||
$("#object_type").val('major');
|
||||
$("input[name='school']").val('<%= @school.name %>');
|
||||
} else {
|
||||
notice_box("只能配置5个专业管理员");
|
||||
}
|
||||
});
|
||||
|
||||
$("#pollingPanel").on("keydown", "input[name='search']", function(e){
|
||||
// 兼容FF和IE和Opera
|
||||
var theEvent = e || window.event;
|
||||
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code == 13) {
|
||||
//回车执行查询
|
||||
submit_search_major()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function submit_search_major(){
|
||||
$.get('/ecs/department?school_id=<%= @school.id %>',
|
||||
{ search: $("input[name='search']").val().trim()});
|
||||
}
|
||||
|
||||
</script>
|
@ -1,235 +0,0 @@
|
||||
# = Redmine configuration file
|
||||
#
|
||||
# Each environment has it's own configuration options. If you are only
|
||||
# running in production, only the production block needs to be configured.
|
||||
# Environment specific configuration options override the default ones.
|
||||
#
|
||||
# Note that this file needs to be a valid YAML file.
|
||||
# DO NOT USE TABS! Use 2 spaces instead of tabs for identation.
|
||||
#
|
||||
# == Outgoing email settings (email_delivery setting)
|
||||
#
|
||||
# === Common configurations
|
||||
#
|
||||
# ==== Sendmail command
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :sendmail
|
||||
#
|
||||
# ==== Simple SMTP server at localhost
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.163.com
|
||||
# port: 25
|
||||
#
|
||||
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# authentication: :login
|
||||
# domain: 'foo.com'
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
# ==== SMTP server at example.com using PLAIN authentication
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# authentication: :plain
|
||||
# domain: 'example.com'
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
# ==== SMTP server at using TLS (GMail)
|
||||
#
|
||||
# This might require some additional configuration. See the guides at:
|
||||
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
|
||||
#
|
||||
# production:
|
||||
# email_delivery:
|
||||
# delivery_method: :smtp
|
||||
# smtp_settings:
|
||||
# enable_starttls_auto: true
|
||||
# address: smtp.gmail.com
|
||||
# port: 587
|
||||
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
|
||||
# authentication: :plain
|
||||
# user_name: senluowanxiangt@gmail.com
|
||||
# password: 1913TXBja
|
||||
#
|
||||
#
|
||||
# === More configuration options
|
||||
#
|
||||
# See the "Configuration options" at the following website for a list of the
|
||||
# full options allowed:
|
||||
#
|
||||
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
|
||||
|
||||
|
||||
|
||||
default:
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
# Your Redmine instance needs to have write permission on this
|
||||
# directory.
|
||||
# Examples:
|
||||
# attachments_storage_path: /var/redmine/files
|
||||
# attachments_storage_path: D:/redmine/files
|
||||
attachments_storage_path:
|
||||
|
||||
# Configuration of the autologin cookie.
|
||||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||
# autologin_cookie_path: the cookie path (default: /)
|
||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||
autologin_cookie_name: "autologin_trustie"
|
||||
autologin_cookie_path:
|
||||
autologin_cookie_secure:
|
||||
|
||||
# Configuration of SCM executable command.
|
||||
#
|
||||
# Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
|
||||
# On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
|
||||
#
|
||||
# On Windows + JRuby 1.6.2, path which contains spaces does not work.
|
||||
# For example, "C:\Program Files\TortoiseHg\hg.exe".
|
||||
# If you want to this feature, you need to install to the path which does not contains spaces.
|
||||
# For example, "C:\TortoiseHg\hg.exe".
|
||||
#
|
||||
# Examples:
|
||||
# scm_subversion_command: svn # (default: svn)
|
||||
# scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
|
||||
# scm_git_command: /usr/local/bin/git # (default: git)
|
||||
# scm_cvs_command: cvs # (default: cvs)
|
||||
# scm_bazaar_command: bzr.exe # (default: bzr)
|
||||
# scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
|
||||
#
|
||||
scm_subversion_command:
|
||||
scm_mercurial_command:
|
||||
scm_git_command:
|
||||
scm_cvs_command:
|
||||
scm_bazaar_command:
|
||||
scm_darcs_command:
|
||||
|
||||
# Absolute path to the SCM commands errors (stderr) log file.
|
||||
# The default is to log in the 'log' directory of your Redmine instance.
|
||||
# Example:
|
||||
# scm_stderr_log_file: /var/log/redmine_scm_stderr.log
|
||||
scm_stderr_log_file:
|
||||
|
||||
# Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
|
||||
# If you don't want to enable data encryption, just leave it blank.
|
||||
# WARNING: losing/changing this key will make encrypted data unreadable.
|
||||
#
|
||||
# If you want to encrypt existing passwords in your database:
|
||||
# * set the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
#
|
||||
# If you have encrypted data and want to change this key, you have to:
|
||||
# * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
|
||||
# * change the cipher key here in your configuration file
|
||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||
database_cipher_key:
|
||||
|
||||
# Set this to false to disable plugins' assets mirroring on startup.
|
||||
# You can use `rake redmine:plugins:assets` to manually mirror assets
|
||||
# to public/plugin_assets when you install/upgrade a Redmine plugin.
|
||||
#
|
||||
#mirror_plugins_assets_on_startup: false
|
||||
|
||||
# Your secret key for verifying cookie session data integrity. If you
|
||||
# change this key, all old sessions will become invalid! Make sure the
|
||||
# secret is at least 30 characters and all random, no regular words or
|
||||
# you'll be exposed to dictionary attacks.
|
||||
#
|
||||
# If you have a load-balancing Redmine cluster, you have to use the
|
||||
# same secret token on each machine.
|
||||
#secret_token: 'change it to a long random string'
|
||||
|
||||
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
|
||||
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
||||
imagemagick_convert_command: '/home/pdl/redmine-2.3.2-0/common/bin/convert'
|
||||
|
||||
# Configuration of RMagcik font.
|
||||
#
|
||||
# Redmine uses RMagcik in order to export gantt png.
|
||||
# You don't need this setting if you don't install RMagcik.
|
||||
#
|
||||
# In CJK (Chinese, Japanese and Korean),
|
||||
# in order to show CJK characters correctly,
|
||||
# you need to set this configuration.
|
||||
#
|
||||
# Because there is no standard font across platforms in CJK,
|
||||
# you need to set a font installed in your server.
|
||||
#
|
||||
# This setting is not necessary in non CJK.
|
||||
#
|
||||
# Examples for Japanese:
|
||||
# Windows:
|
||||
# rmagick_font_path: C:\windows\fonts\msgothic.ttc
|
||||
# Linux:
|
||||
# rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
#
|
||||
rmagick_font_path:
|
||||
|
||||
# Maximum number of simultaneous AJAX uploads
|
||||
#max_concurrent_ajax_uploads: 2
|
||||
#pic_types: "bmp,jpeg,jpg,png,gif"
|
||||
|
||||
repository_root_path: '/tmp/htdocs'
|
||||
judge_server: 'http://judge.trustie.net/'
|
||||
|
||||
# Git's url
|
||||
gitlab_address: 'http://gitfast.trustie.net'
|
||||
|
||||
# specific configuration options for production environment
|
||||
# that overrides the default ones
|
||||
production:
|
||||
# CJK support
|
||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
judge_server: 'http://192.168.80.21:8080/'
|
||||
repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs'
|
||||
cookie_domain: ".trustie.net"
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
|
||||
# specific configuration options for development environment
|
||||
# that overrides the default ones
|
||||
development:
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
@ -0,0 +1,9 @@
|
||||
class CreatePartners < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :partners do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,10 @@
|
||||
class CreateCustomers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :customers do |t|
|
||||
t.references :partner
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :customers, :partner_id
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
class AddPartnerIdAndCustomerIdToSchools < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :schools, :partner_id, :integer
|
||||
add_index :schools, :partner_id
|
||||
add_column :schools, :customer_id, :integer
|
||||
add_index :schools, :customer_id
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddPartnerIdToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :partner_id, :integer
|
||||
add_index :users, :partner_id
|
||||
end
|
||||
end
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Run the given task for all appraisals" fullCmd="appraisal" taksId="appraisal" /><RakeGroup description="" fullCmd="" taksId="appraisal"><RakeTask description="DEPRECATED: Remove all generated gemfiles from gemfiles/ folder" fullCmd="appraisal:cleanup" taksId="cleanup" /><RakeTask description="DEPRECATED: Generate a Gemfile for each appraisal" fullCmd="appraisal:gemfiles" taksId="gemfiles" /><RakeTask description="DEPRECATED: Resolve and install dependencies for each appraisal" fullCmd="appraisal:install" taksId="install" /><RakeTask description="" fullCmd="appraisal:all" taksId="all" /></RakeGroup><RakeTask description="Run tests for bench" fullCmd="bench" taksId="bench" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Remove RDoc HTML files" fullCmd="clobber_rdoc" taksId="clobber_rdoc" /><RakeTask description="Build RDoc HTML files" fullCmd="rdoc" taksId="rdoc" /><RakeTask description="Rebuild RDoc HTML files" fullCmd="rerdoc" taksId="rerdoc" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="html" taksId="html" /><RakeTask description="" fullCmd="html/index.html" taksId="html/index.html" /><RakeTask description="" fullCmd="file" taksId="file" /><RakeTask description="" fullCmd="test_all" taksId="test_all" /></RakeGroup></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build gitlab-3.2.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install gitlab-3.2.0.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v3.2.0 and build and push gitlab-3.2.0.gem to Rubygems" fullCmd="release" taksId="release" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /></RakeGroup></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build gitlab-3.2.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install gitlab-3.2.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install gitlab-3.2.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v3.2.0 and build and push gitlab-3.2.0.gem to rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||
You are allowed to:
|
||||
1. Remove rake task
|
||||
2. Add existing rake tasks
|
||||
To add existing rake tasks automatically delete this file and reload the project.
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
||||
|
Loading…
Reference in new issue