Merge branch 'szzh' into develop
This commit is contained in:
commit
23b37c5b47
|
@ -236,24 +236,10 @@ update
|
|||
end
|
||||
|
||||
def destroy
|
||||
@root_path=RepositoriesHelper::ROOT_PATH
|
||||
@repo_name=User.current.login.to_s+"_"+@repository.identifier.to_s
|
||||
@repository_name=User.current.login.to_s+"/"+@repository.identifier.to_s+".git"
|
||||
@middle=User.current.login.to_s+"_"+@repository.identifier.to_s+"-write:"
|
||||
@repository.destroy if request.delete?
|
||||
DestroyRepositoryTask.new.destroy(User.current.id, @repository.id)
|
||||
@repository.hidden = true
|
||||
@repository.save
|
||||
redirect_to settings_project_url(@project, :tab => 'repositories')
|
||||
if(@repository.type=="Repository::Git")
|
||||
logger.info "destory the repository value"+"root path"+@root_path+"repo_name"+@repo_name+
|
||||
"repository_name"+@repository_name+"user group"+@middle
|
||||
system "sed -i /"+@repo_name+"/{d} "+@root_path+"htdocs/user.passwd"
|
||||
system "sed -i /"+@middle+"/{d} "+@root_path+"htdocs/group.passwd"
|
||||
system "rm -r "+@root_path+"htdocs/"+@repository_name
|
||||
# if(@sed_user&&@sed_group&&@remove)
|
||||
# else
|
||||
# logger.info "An error occured when destory the repository"+"delete form passwd: \n"+
|
||||
# @sed_user+"delete from group"+@sed_group+"delete from file"+@remove
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -817,12 +817,12 @@ class Mailer < ActionMailer::Base
|
|||
headers[:references] = @references_objects.collect {|o| "<#{self.class.message_id_for(o)}>"}.join(' ')
|
||||
end
|
||||
|
||||
set_language_if_valid @initial_language
|
||||
super headers do |format|
|
||||
format.text
|
||||
format.html unless Setting.plain_text_mail?
|
||||
end
|
||||
|
||||
set_language_if_valid @initial_language
|
||||
end
|
||||
|
||||
def initialize(*args)
|
||||
|
|
|
@ -51,7 +51,7 @@ class Project < ActiveRecord::Base
|
|||
has_many :issue_categories, :dependent => :delete_all, :order => "#{IssueCategory.table_name}.name"
|
||||
has_many :boards, :dependent => :destroy, :order => "position ASC"
|
||||
has_one :repository, :conditions => ["is_default = ?", true]
|
||||
has_many :repositories, :dependent => :destroy
|
||||
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
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#coding=utf-8
|
||||
#
|
||||
|
||||
class DestroyRepositoryTask
|
||||
def destroy(user_id, rep_id)
|
||||
user = User.find(user_id)
|
||||
repository = Repository.find(rep_id)
|
||||
|
||||
Rails.logger.info "start delete repository #{user} #{repository}"
|
||||
@root_path=RepositoriesHelper::ROOT_PATH
|
||||
@repo_name=user.login.to_s+"_"+repository.identifier.to_s
|
||||
@repository_name=user.login.to_s+"/"+repository.identifier.to_s+".git"
|
||||
@middle=user.login.to_s+"_"+repository.identifier.to_s+"-write:"
|
||||
repository.destroy
|
||||
if(repository.type=="Repository::Git")
|
||||
Rails.logger.info "destory the repository value"+"root path"+@root_path+"repo_name"+@repo_name+
|
||||
"repository_name"+@repository_name+"user group"+@middle
|
||||
system "sed -i /"+@repo_name+"/{d} "+@root_path+"htdocs/user.passwd"
|
||||
system "sed -i /"+@middle+"/{d} "+@root_path+"htdocs/group.passwd"
|
||||
system "rm -r "+@root_path+"htdocs/"+@repository_name
|
||||
end
|
||||
end
|
||||
|
||||
handle_asynchronously :destroy,:queue => 'repository'
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
<div class="attachments" style="font-weight:normal;">
|
||||
<div style="font-weight:normal;">
|
||||
<% for attachment in attachments %>
|
||||
<div title="<%= attachment.filename%>" id = "attachment_" style="max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;float: left;">
|
||||
<%= link_to_short_attachment attachment, :class => 'link_file', :download => true, :length => 100 -%>
|
||||
|
@ -13,5 +13,6 @@
|
|||
:target => "_blank"%>
|
||||
</div>
|
||||
<% end %>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -42,9 +42,8 @@
|
|||
<div class="cl"></div>
|
||||
<% unless jour.nil? %>
|
||||
<% unless jour.attachments.empty?%>
|
||||
<% options = {:author => true, :deletable => attach_delete(jour)} %>
|
||||
<%= render :partial => 'attachments/homework_jour_link',
|
||||
:locals => {:attachments => jour.attachments, :options => options} %>
|
||||
:locals => {:attachments => jour.attachments} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
|
@ -79,17 +79,11 @@
|
|||
<label style="float: left;">
|
||||
添加附件 :
|
||||
</label>
|
||||
<% unless @homework.attachments.empty?%>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
|
||||
<% options = {:author => true, :deletable => attach_delete(@homework)} %>
|
||||
<%= render :partial => 'attachments/links',
|
||||
:locals => {:attachments => @homework.attachments, :options => options} %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<div style="float: left;padding-bottom: 15px;">
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @homework}%>
|
||||
</div>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label> 开发项目
|
||||
<img src="/images/bid/pic_question.png" width="16" height="16"
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
|
||||
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
<%= link_to( l(:mail_issue_footer), @user_url) %>
|
||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,4 +5,10 @@
|
|||
--------------------------------------------------------------------------------
|
||||
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
|
||||
<%= link_to( l(:mail_issue_footer), @user_url) %>
|
||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -293,4 +293,10 @@
|
|||
<!--贴吧动态 end-->
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<%= l(mail_option) %>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -48,7 +48,7 @@ module RedmineApp
|
|||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.default_locale = :zh
|
||||
|
||||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
|
|
|
@ -215,11 +215,12 @@ production:
|
|||
# specific configuration options for development environment
|
||||
# that overrides the default ones
|
||||
development:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
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,5 @@
|
|||
class AddHiddenToRepositories < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :repositories, :hidden, :boolean, default: false
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150422034543) do
|
||||
ActiveRecord::Schema.define(:version => 20150428021035) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1058,6 +1058,7 @@ ActiveRecord::Schema.define(:version => 20150422034543) do
|
|||
t.text "extra_info"
|
||||
t.string "identifier"
|
||||
t.boolean "is_default", :default => false
|
||||
t.boolean "hidden", :default => false
|
||||
end
|
||||
|
||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||
|
|
|
@ -186,9 +186,9 @@ END_DESC
|
|||
|
||||
ActionMailer::Base.raise_delivery_errors = true
|
||||
begin
|
||||
Mailer.with_synched_deliveries do
|
||||
Mailer.test_email(user).deliver
|
||||
end
|
||||
# Mailer.with_synched_deliveries do
|
||||
Mailer.test_email(user).deliver!
|
||||
# end
|
||||
puts l(:notice_email_sent, user.mail)
|
||||
rescue Exception => e
|
||||
abort l(:notice_email_error, e.message)
|
||||
|
|
|
@ -260,7 +260,7 @@ K.options = {
|
|||
items : [ 'emoticons',
|
||||
'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
|
||||
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', 'fullscreen',"more"
|
||||
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link',"more"
|
||||
],
|
||||
noDisableItems : ['source', 'fullscreen'],
|
||||
colorTable : [
|
||||
|
@ -4972,13 +4972,13 @@ KEditor.prototype = {
|
|||
'emoticons',
|
||||
'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
|
||||
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', 'fullscreen',"less",
|
||||
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', "less",
|
||||
'/',
|
||||
'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'plainpaste',
|
||||
'undo', 'redo', '|', 'preview', 'print', 'template',
|
||||
'justifyfull', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
|
||||
'superscript', 'clearhtml', 'quickformat', 'selectall', 'fontname',
|
||||
'strikethrough', 'lineheight', '|', 'imagedirectupload', 'hr', 'pagebreak',
|
||||
'anchor', 'unlink'
|
||||
'strikethrough', 'lineheight', 'hr', 'pagebreak',
|
||||
'anchor' , 'unlink'
|
||||
]
|
||||
K.each(fullItems, function(i, name) {
|
||||
if (name == '|') {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 12 KiB |
|
@ -80,7 +80,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
|||
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
||||
|
||||
.ping_con{ margin:5px; border-bottom:1px dashed #CCC; padding-bottom:5px;}
|
||||
.ping_con{ margin:5px; border-bottom:1px dashed #CCC; padding-bottom:5px;word-break: break-all;word-wrap: break-word;}
|
||||
.ping_con ul{ height:30px;}
|
||||
.ping_con ul li{ float:left; color:#656767; font-weight:bold;}
|
||||
.ping_con h2{ font-size:14px; color:#444443; margin-bottom:10px; }
|
||||
|
|
Loading…
Reference in New Issue