Merge branch '3.2-master' into 194-tracker
Conflicts: app/assets/stylesheets/application.scss app/views/issues/_form.html.haml app/views/platforms/show.html.haml
This commit is contained in:
commit
bc4a157703
|
@ -1,4 +1,4 @@
|
|||
//@import "vendor";
|
||||
@import "vendor";
|
||||
@import "main";
|
||||
@import "custom";
|
||||
@import "blue/style";
|
||||
|
@ -6,4 +6,3 @@
|
|||
//= require main
|
||||
//= require vendor
|
||||
//= require custom
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ class Git::BlobsController < Git::BaseController
|
|||
# @git_repository.after_update_file do |repo, sha|
|
||||
# end
|
||||
|
||||
res = @git_repository.update_file(params[:path], params[:content],
|
||||
:message => params[:message], :actor => current_user, :head => @treeish)
|
||||
res = @git_repository.update_file(params[:path], params[:content].gsub("\r", ''),
|
||||
:message => params[:message].gsub("\r", ''), :actor => current_user, :head => @treeish)
|
||||
if res
|
||||
flash[:notice] = t("flash.blob.successfully_updated", :name => params[:path].encode_to_default)
|
||||
else
|
||||
|
|
|
@ -12,7 +12,7 @@ class PersonalRepositoriesController < ApplicationController
|
|||
else
|
||||
@projects = @repository.projects.recent.paginate :page => params[:project_page], :per_page => 30
|
||||
end
|
||||
@user = @repository.owner
|
||||
@user = @repository.platform.owner
|
||||
@urpmi_commands = @repository.platform.urpmi_list(request.host)
|
||||
end
|
||||
|
||||
|
|
|
@ -8,11 +8,7 @@ class PlatformsController < ApplicationController
|
|||
autocomplete :user, :uname
|
||||
|
||||
def build_all
|
||||
@platform.repositories.each do |repository|
|
||||
repository.projects.each do |project|
|
||||
project.delay.build_for(@platform, current_user)
|
||||
end
|
||||
end
|
||||
@platform.delay.build_all(current_user)
|
||||
|
||||
redirect_to(platform_path(@platform), :notice => t("flash.platform.build_all_success"))
|
||||
end
|
||||
|
@ -109,24 +105,24 @@ class PlatformsController < ApplicationController
|
|||
end
|
||||
|
||||
def clone
|
||||
if request.post?
|
||||
@cloned = @platform.make_clone(:name => params[:platform]['name'], :description => params[:platform]['description'],
|
||||
:owner_id => current_user.id, :owner_type => current_user.class.to_s)
|
||||
@cloned = Platform.new
|
||||
@cloned.name = @platform.name + "_clone"
|
||||
@cloned.description = @platform.description + "_clone"
|
||||
end
|
||||
|
||||
def make_clone
|
||||
@cloned = @platform.full_clone params[:platform].merge(:owner => current_user)
|
||||
if @cloned.persisted?
|
||||
flash[:notice] = I18n.t("flash.platform.clone_success")
|
||||
redirect_to @cloned
|
||||
else
|
||||
flash[:error] = @cloned.errors.full_messages.join('. ')
|
||||
end
|
||||
else
|
||||
@cloned = Platform.new
|
||||
@cloned.name = @platform.name + "_clone"
|
||||
@cloned.description = @platform.description + "_clone"
|
||||
render 'clone'
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@platform.destroy if @platform
|
||||
@platform.delay.destroy if @platform
|
||||
|
||||
flash[:notice] = t("flash.platform.destroyed")
|
||||
redirect_to root_path
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class ProductBuildListsController < ApplicationController
|
||||
before_filter :authenticate_user!, :except => [:status_build]
|
||||
load_and_authorize_resource :platform, :only => [:create]
|
||||
load_and_authorize_resource :product, :through => :platform, :only => [:create]
|
||||
load_and_authorize_resource :product_build_list, :through => :product, :only => [:create]
|
||||
load_and_authorize_resource :platform, :only => [:create, :destroy]
|
||||
load_and_authorize_resource :product, :through => :platform, :only => [:create, :destroy]
|
||||
load_and_authorize_resource :product_build_list, :through => :product, :only => [:create, :destroy]
|
||||
|
||||
before_filter :authenticate_product_builder!, :only => [:status_build]
|
||||
before_filter :find_product_build_list, :only => [:status_build]
|
||||
|
@ -21,6 +21,12 @@ class ProductBuildListsController < ApplicationController
|
|||
render :nothing => true
|
||||
end
|
||||
|
||||
def destroy
|
||||
@product_build_list.destroy
|
||||
flash[:notice] = t('flash.product.build_list_delete')
|
||||
redirect_to [@platform, @product]
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_product_build_list
|
||||
|
|
|
@ -5,7 +5,7 @@ class RegisterRequestsController < ApplicationController
|
|||
before_filter :find_register_request, :only => [:approve, :reject]
|
||||
|
||||
def index
|
||||
@register_requests = @register_requests.unprocessed.paginate(:page => params[:page])
|
||||
@register_requests = @register_requests.send((params[:scope] || 'unprocessed').to_sym).paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -42,7 +42,6 @@ class RepositoriesController < ApplicationController
|
|||
def create
|
||||
@repository = Repository.new(params[:repository])
|
||||
@repository.platform_id = params[:platform_id]
|
||||
@repository.owner = get_owner
|
||||
if @repository.save
|
||||
flash[:notice] = t('flash.repository.saved')
|
||||
redirect_to @repositories_path
|
||||
|
|
|
@ -117,19 +117,25 @@ class WikiController < ApplicationController
|
|||
def compare_wiki
|
||||
if request.post?
|
||||
@versions = params[:versions] || []
|
||||
if @versions.size < 2
|
||||
redirect_to history_project_wiki_index_path(@project)
|
||||
else
|
||||
redirect_to compare_versions_project_wiki_index_path(@project,
|
||||
sprintf('%s...%s', @versions.last, @versions.first))
|
||||
end
|
||||
elsif request.get?
|
||||
@versions = params[:versions].split(/\.{2,3}/)
|
||||
if @versions.size < 2
|
||||
versions_string = case @versions.size
|
||||
when 1 then @versions.first
|
||||
when 2 then sprintf('%s...%s', @versions.last, @versions.first)
|
||||
else begin
|
||||
redirect_to history_project_wiki_index_path(@project)
|
||||
return
|
||||
end
|
||||
@diffs = @wiki.repo.diff(@versions.first, @versions.last)
|
||||
end
|
||||
redirect_to compare_versions_project_wiki_index_path(@project, versions_string)
|
||||
elsif request.get?
|
||||
@versions = params[:versions].split(/\.{2,3}/) || []
|
||||
@diffs = case @versions.size
|
||||
when 1 then @wiki.repo.commit_diff(@versions.first)
|
||||
when 2 then @wiki.repo.diff(@versions.first, @versions.last)
|
||||
else begin
|
||||
redirect_to history_project_wiki_index_path(@project)
|
||||
return
|
||||
end
|
||||
end
|
||||
render :compare
|
||||
else
|
||||
redirect_to project_wiki_path(@project, CGI.escape(@name))
|
||||
|
@ -141,8 +147,9 @@ class WikiController < ApplicationController
|
|||
@page = @wiki.page(@name)
|
||||
sha1 = params[:sha1]
|
||||
sha2 = params[:sha2]
|
||||
sha2 = nil if params[:sha2] == 'prev'
|
||||
|
||||
if @wiki.revert_page(@page, sha1, sha2, {:committer => committer}).commit
|
||||
if c = @wiki.revert_page(@page, sha1, sha2, {:committer => committer}) and c.commit
|
||||
flash[:notice] = t("flash.wiki.revert_success")
|
||||
redirect_to project_wiki_path(@project, CGI.escape(@name))
|
||||
else
|
||||
|
@ -162,14 +169,14 @@ class WikiController < ApplicationController
|
|||
def revert_wiki
|
||||
sha1 = params[:sha1]
|
||||
sha2 = params[:sha2]
|
||||
if @wiki.revert_commit(sha1, sha2, {:committer => committer}).commit
|
||||
sha2 = nil if sha2 == 'prev'
|
||||
if c = @wiki.revert_commit(sha1, sha2, {:committer => committer}) and c.commit
|
||||
flash[:notice] = t("flash.wiki.revert_success")
|
||||
redirect_to project_wiki_index_path(@project)
|
||||
else
|
||||
sha2, sha1 = sha1, "#{sha1}^" if !sha2
|
||||
@versions = [sha1, sha2]
|
||||
diffs = @wiki.repo.diff(@versions.first, @versions.last)
|
||||
@diffs = [diffs.first]
|
||||
@diffs = @wiki.repo.diff(@versions.first, @versions.last)
|
||||
flash[:error] = t("flash.wiki.patch_does_not_apply")
|
||||
render :compare
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module DiffHelper
|
|||
|
||||
res += "<table class='diff inline' cellspacing='0' cellpadding='0'>"
|
||||
res += "<tbody>"
|
||||
res += diff_display.render(Git::Diff::InlineCallback.new)
|
||||
res += diff_display.render(Git::Diff::InlineCallback.new).encode_to_default
|
||||
res += "</tbody>"
|
||||
res += "</table>"
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
module ProjectsHelper
|
||||
def git_repo_url(name)
|
||||
if current_user
|
||||
"http://#{current_user.uname}@#{request.host_with_port}/#{name}.git"
|
||||
"https://#{current_user.uname}@#{request.host_with_port}/#{name}.git"
|
||||
else
|
||||
"http://#{request.host_with_port}/#{name}.git"
|
||||
"https://#{request.host_with_port}/#{name}.git"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,6 +17,8 @@ class Ability
|
|||
cannot :destroy, Subscribe
|
||||
cannot :create, Subscribe
|
||||
cannot :create, RegisterRequest
|
||||
cannot :approve, RegisterRequest, :approved => true
|
||||
cannot :reject, RegisterRequest, :rejected => true
|
||||
else
|
||||
# Shared rights between guests and registered users
|
||||
can :forbidden, Platform
|
||||
|
@ -64,22 +66,22 @@ class Ability
|
|||
can :read, Platform, :owner_type => 'User', :owner_id => user.id
|
||||
can :read, Platform, :owner_type => 'Group', :owner_id => user.group_ids
|
||||
can(:read, Platform, read_relations_for('platforms')) {|platform| local_reader? platform}
|
||||
can(:update, Platform) {|platform| local_admin? platform}
|
||||
can([:update, :build_all], Platform) {|platform| local_admin? platform}
|
||||
can([:freeze, :unfreeze, :destroy], Platform) {|platform| owner? platform}
|
||||
can :autocomplete_user_uname, Platform
|
||||
|
||||
# TODO delegate to platform?
|
||||
can :read, Repository, :platform => {:visibility => 'open'}
|
||||
can :read, Repository, :owner_type => 'User', :owner_id => user.id
|
||||
can :read, Repository, :owner_type => 'Group', :owner_id => user.group_ids
|
||||
can(:read, Repository, read_relations_for('repositories')) {|repository| local_reader? repository}
|
||||
can(:create, Repository) {|repository| local_admin? repository.platform}
|
||||
can([:update, :add_project, :remove_project], Repository) {|repository| local_admin? repository}
|
||||
can([:change_visibility, :settings, :destroy], Repository) {|repository| owner? repository}
|
||||
can :read, Repository, :platform => {:owner_type => 'User', :owner_id => user.id}
|
||||
can :read, Repository, :platform => {:owner_type => 'Group', :owner_id => user.group_ids}
|
||||
can(:read, Repository, read_relations_for('repositories', 'platforms')) {|repository| local_reader? repository.platform}
|
||||
can([:create, :update, :projects_list, :add_project, :remove_project], Repository) {|repository| local_admin? repository.platform}
|
||||
can([:change_visibility, :settings, :destroy], Repository) {|repository| owner? repository.platform}
|
||||
|
||||
can :read, Product, :platform => {:owner_type => 'User', :owner_id => user.id}
|
||||
can :read, Product, :platform => {:owner_type => 'Group', :owner_id => user.group_ids}
|
||||
can(:manage, Product, read_relations_for('products', 'platforms')) {|product| local_admin? product.platform}
|
||||
can(:create, ProductBuildList) {|pbl| pbl.product.can_build? and can?(:update, pbl.product)}
|
||||
can(:destroy, ProductBuildList) {|pbl| can?(:destroy, pbl.product)}
|
||||
|
||||
can [:read, :platforms], Category
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
class Group < ActiveRecord::Base
|
||||
belongs_to :owner, :class_name => 'User'
|
||||
|
||||
has_many :own_projects, :as => :owner, :class_name => 'Project'
|
||||
|
||||
has_many :relations, :as => :object, :dependent => :destroy
|
||||
has_many :objects, :as => :target, :class_name => 'Relation'
|
||||
has_many :targets, :as => :object, :class_name => 'Relation'
|
||||
|
||||
has_many :members, :through => :objects, :source => :object, :source_type => 'User', :autosave => true
|
||||
has_many :projects, :through => :targets, :source => :target, :source_type => 'Project', :autosave => true
|
||||
has_many :platforms, :through => :targets, :source => :target, :source_type => 'Platform', :autosave => true, :dependent => :destroy
|
||||
has_many :repositories, :through => :targets, :source => :target, :source_type => 'Repository', :autosave => true
|
||||
has_many :relations, :as => :object, :dependent => :destroy
|
||||
has_many :platforms, :through => :targets, :source => :target, :source_type => 'Platform', :autosave => true
|
||||
|
||||
has_many :own_projects, :as => :owner, :class_name => 'Project', :dependent => :destroy
|
||||
has_many :own_platforms, :as => :owner, :class_name => 'Platform', :dependent => :destroy
|
||||
|
||||
validates :name, :owner, :presence => true
|
||||
validates :uname, :presence => true, :uniqueness => {:case_sensitive => false}, :format => { :with => /^[a-z0-9_]+$/ }
|
||||
|
@ -24,11 +24,12 @@ class Group < ActiveRecord::Base
|
|||
after_create :add_owner_to_members
|
||||
|
||||
include Modules::Models::PersonalRepository
|
||||
# include Modules::Models::Owner
|
||||
# include Modules::Models::Owner
|
||||
|
||||
protected
|
||||
|
||||
def add_owner_to_members
|
||||
Relation.create_with_role(self.owner, self, 'admin')
|
||||
# members << self.owner if !members.exists?(:id => self.owner.id)
|
||||
# members << self.owner if !members.exists?(:id => self.owner.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,10 +14,11 @@ class Platform < ActiveRecord::Base
|
|||
has_many :members, :through => :objects, :source => :object, :source_type => 'User'
|
||||
has_many :groups, :through => :objects, :source => :object, :source_type => 'Group'
|
||||
|
||||
validates :description, :presence => true, :uniqueness => true
|
||||
validates :description, :presence => true
|
||||
validates :name, :uniqueness => {:case_sensitive => false}, :presence => true, :format => { :with => /^[a-zA-Z0-9_\-]+$/ }
|
||||
validates :distrib_type, :presence => true, :inclusion => {:in => APP_CONFIG['distr_types']}
|
||||
|
||||
before_create :create_directory, :if => lambda {Thread.current[:skip]} # TODO remove this when core will be ready
|
||||
before_create :xml_rpc_create, :unless => lambda {Thread.current[:skip]}
|
||||
before_destroy :xml_rpc_destroy
|
||||
# before_update :check_freezing
|
||||
|
@ -98,27 +99,23 @@ class Platform < ActiveRecord::Base
|
|||
platform_type == 'personal'
|
||||
end
|
||||
|
||||
def full_clone(attrs) # :description, :name, :owner
|
||||
def base_clone(attrs = {}) # :description, :name, :owner
|
||||
clone.tap do |c|
|
||||
c.attributes = attrs
|
||||
c.attributes = attrs # attrs.each {|k,v| c.send("#{k}=", v)}
|
||||
c.updated_at = nil; c.created_at = nil # :id = nil
|
||||
c.parent = self
|
||||
new_attrs = {:platform_id => nil}
|
||||
c.repositories = repositories.map{|r| r.full_clone(new_attrs.merge(:owner_id => attrs[:owner_id], :owner_type => attrs[:owner_type]))}
|
||||
c.products = products.map{|p| p.full_clone(new_attrs)}
|
||||
end
|
||||
end
|
||||
|
||||
# TODO * make it Delayed Job *
|
||||
def make_clone(attrs)
|
||||
p = full_clone(attrs)
|
||||
begin
|
||||
Thread.current[:skip] = true
|
||||
p.save and xml_rpc_clone(attrs[:name])
|
||||
ensure
|
||||
Thread.current[:skip] = false
|
||||
def clone_relations(from = parent)
|
||||
self.repositories = from.repositories.map{|r| r.full_clone(:platform_id => id)}
|
||||
self.products = from.products.map(&:full_clone)
|
||||
end
|
||||
|
||||
def full_clone(attrs = {})
|
||||
base_clone(attrs).tap do |c|
|
||||
with_skip {c.save} and c.clone_relations(self) and c.delay.xml_rpc_clone
|
||||
end
|
||||
p
|
||||
end
|
||||
|
||||
def name
|
||||
|
@ -135,9 +132,13 @@ class Platform < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def create_directory
|
||||
system("sudo mkdir -p -m 0777 #{path}")
|
||||
end
|
||||
|
||||
def mount_directory_for_rsync
|
||||
# umount_directory_for_rsync # TODO ignore errors
|
||||
system("sudo mkdir -p #{mount_path}")
|
||||
system("sudo mkdir -p -m 0777 #{mount_path}")
|
||||
system("sudo mount --bind #{path} #{mount_path}")
|
||||
Arch.all.each do |arch|
|
||||
str = "country=Russian Federation,city=Moscow,latitude=52.18,longitude=48.88,bw=1GB,version=2011,arch=#{arch.name},type=distrib,url=#{public_downloads_url}\n"
|
||||
|
@ -157,6 +158,23 @@ class Platform < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def build_all(user)
|
||||
repositories.find_by_name('main').projects.find_in_batches(:batch_size => 5) do |group|
|
||||
sleep 1
|
||||
group.each do |p|
|
||||
begin
|
||||
p.build_for(self, user)
|
||||
rescue RuntimeError, Exception
|
||||
p.delay.build_for(self, user)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
with_skip {super} # avoid cascade XML RPC requests
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def build_path(dir)
|
||||
|
@ -181,12 +199,12 @@ class Platform < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def xml_rpc_clone(new_name)
|
||||
result = BuildServer.clone_platform new_name, self.name, APP_CONFIG['root_path'] + '/platforms'
|
||||
def xml_rpc_clone(old_name = parent.name, new_name = name)
|
||||
result = BuildServer.clone_platform new_name, old_name, APP_CONFIG['root_path'] + '/platforms'
|
||||
if result == BuildServer::SUCCESS
|
||||
return true
|
||||
else
|
||||
raise "Failed to clone platform #{name} with code #{result}. Path: #{build_path(name)} to platform #{new_name}"
|
||||
raise "Failed to clone platform #{old_name} with code #{result}. Path: #{build_path(old_name)} to platform #{new_name}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -59,9 +59,10 @@ class Product < ActiveRecord::Base
|
|||
EOF
|
||||
end
|
||||
|
||||
def full_clone(attrs) # owner
|
||||
def full_clone(attrs = {})
|
||||
clone.tap do |c| # dup
|
||||
c.attributes = attrs
|
||||
c.platform_id = nil
|
||||
attrs.each {|k,v| c.send("#{k}=", v)}
|
||||
c.updated_at = nil; c.created_at = nil # :id = nil
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,6 +15,10 @@ class ProductBuildList < ActiveRecord::Base
|
|||
|
||||
after_create :xml_rpc_create
|
||||
|
||||
def container_path
|
||||
"/downloads/#{product.platform.name}/product/#{id}/"
|
||||
end
|
||||
|
||||
def human_status
|
||||
I18n.t("layout.product_build_lists.statuses.#{status}")
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ class Project < ActiveRecord::Base
|
|||
has_many :groups, :through => :relations, :source => :object, :source_type => 'Group'
|
||||
has_many :labels
|
||||
|
||||
validates :name, :uniqueness => {:scope => [:owner_id, :owner_type], :case_sensitive => false}, :presence => true, :format => { :with => /^[a-zA-Z0-9_\-\+\.]+$/ }
|
||||
validates :name, :uniqueness => {:scope => [:owner_id, :owner_type], :case_sensitive => false}, :presence => true, :format => {:with => /^[a-zA-Z0-9_\-\+\.]+$/}
|
||||
validates :owner, :presence => true
|
||||
validate { errors.add(:base, :can_have_less_or_equal, :count => MAX_OWN_PROJECTS) if owner.projects.size >= MAX_OWN_PROJECTS }
|
||||
# validate {errors.add(:base, I18n.t('flash.project.save_warning_ssh_key')) if owner.ssh_key.blank?}
|
||||
|
@ -66,10 +66,9 @@ class Project < ActiveRecord::Base
|
|||
build_lists.create do |bl|
|
||||
bl.pl = platform
|
||||
bl.bpl = platform
|
||||
bl.update_type = 'recommended'
|
||||
bl.update_type = 'newpackage'
|
||||
bl.arch = Arch.find_by_name('x86_64') # Return i586 after mass rebuild
|
||||
# FIXME: Need to set "latest_#{platform.name}"
|
||||
bl.project_version = "latest_import_mandriva2011"
|
||||
bl.project_version = "latest_#{platform.name}" # "latest_import_mandriva2011"
|
||||
bl.build_requires = false # already set as db default
|
||||
bl.user = user
|
||||
bl.auto_publish = true # already set as db default
|
||||
|
@ -213,9 +212,20 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def write_hook
|
||||
is_production = ENV['RAILS_ENV'] == 'production'
|
||||
hook = File.join(::Rails.root.to_s, 'tmp', "post-receive-hook")
|
||||
FileUtils.cp(File.join(::Rails.root.to_s, 'bin', "post-receive-hook.partial"), hook)
|
||||
File.open(hook, 'a') do |f|
|
||||
s = "\n /bin/bash -l -c \"cd #{is_production ? '/srv/rosa_build/current' : Rails.root.to_s} && #{is_production ? 'RAILS_ENV=production' : ''} bundle exec rails runner 'Project.delay.process_hook(\"$owner\", \"$reponame\", \"$newrev\", \"$oldrev\", \"$ref\", \"$newrev_type\", \"$oldrev_type\")'\""
|
||||
s << " > /dev/null 2>&1" if is_production
|
||||
s << "\ndone\n"
|
||||
f.write(s)
|
||||
end
|
||||
|
||||
hook_file = File.join(path, 'hooks', 'post-receive')
|
||||
FileUtils.cp(File.join(::Rails.root.to_s, 'lib', 'post-receive-hook'), hook_file)
|
||||
#File.chmod(0775, hook_file) # need?
|
||||
FileUtils.cp(hook, hook_file)
|
||||
FileUtils.rm_rf(hook)
|
||||
|
||||
rescue Exception # FIXME
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ class ProjectToRepository < ActiveRecord::Base
|
|||
delegate :path, :to => :project
|
||||
|
||||
after_create lambda { project.xml_rpc_create(repository) }, :unless => lambda {Thread.current[:skip]}
|
||||
after_destroy lambda { project.xml_rpc_destroy(repository) }
|
||||
after_destroy lambda { project.xml_rpc_destroy(repository) }, :unless => lambda {Thread.current[:skip]}
|
||||
# after_rollback lambda { project.xml_rpc_destroy(repository) rescue true if new_record? }
|
||||
|
||||
validate :one_project_in_platform_repositories
|
||||
|
|
|
@ -22,6 +22,7 @@ class Relation < ActiveRecord::Base
|
|||
end
|
||||
|
||||
protected
|
||||
|
||||
def add_default_role
|
||||
self.role = ROLES.first if role.nil? || role.empty?
|
||||
end
|
||||
|
|
|
@ -1,37 +1,39 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class Repository < ActiveRecord::Base
|
||||
belongs_to :platform
|
||||
belongs_to :owner, :polymorphic => true
|
||||
|
||||
has_many :projects, :through => :project_to_repositories #, :dependent => :destroy
|
||||
has_many :project_to_repositories, :validate => true, :dependent => :destroy
|
||||
has_many :project_to_repositories, :dependent => :destroy, :validate => true
|
||||
has_many :projects, :through => :project_to_repositories
|
||||
|
||||
has_many :relations, :as => :target, :dependent => :destroy
|
||||
has_many :objects, :as => :target, :class_name => 'Relation', :dependent => :destroy
|
||||
has_many :members, :through => :objects, :source => :object, :source_type => 'User'
|
||||
has_many :groups, :through => :objects, :source => :object, :source_type => 'Group'
|
||||
|
||||
validates :description, :uniqueness => {:scope => :platform_id}, :presence => true
|
||||
validates :name, :uniqueness => {:scope => :platform_id, :case_sensitive => false}, :presence => true, :format => { :with => /^[a-z0-9_\-]+$/ }
|
||||
# validates :platform_id, :presence => true # if you uncomment this platform clone will not work
|
||||
validates :description, :presence => true
|
||||
validates :name, :uniqueness => {:scope => :platform_id, :case_sensitive => false}, :presence => true, :format => {:with => /^[a-z0-9_\-]+$/}
|
||||
|
||||
scope :recent, order("name ASC")
|
||||
|
||||
before_create :xml_rpc_create, :unless => lambda {Thread.current[:skip]}
|
||||
before_destroy :xml_rpc_destroy
|
||||
after_create :add_admin_relations
|
||||
before_destroy :xml_rpc_destroy, :unless => lambda {Thread.current[:skip]}
|
||||
|
||||
attr_accessible :description, :name #, :platform_id
|
||||
attr_accessible :description, :name
|
||||
|
||||
def full_clone(attrs) # owner
|
||||
def base_clone(attrs = {})
|
||||
clone.tap do |c| # dup
|
||||
c.attributes = attrs
|
||||
c.platform_id = nil
|
||||
attrs.each {|k,v| c.send("#{k}=", v)}
|
||||
c.updated_at = nil; c.created_at = nil # :id = nil
|
||||
c.projects = projects
|
||||
end
|
||||
end
|
||||
|
||||
include Modules::Models::Owner
|
||||
def clone_relations(from)
|
||||
with_skip do
|
||||
from.projects.find_each {|p| self.projects << p}
|
||||
end
|
||||
end
|
||||
|
||||
def full_clone(attrs = {})
|
||||
base_clone(attrs).tap do |c|
|
||||
with_skip {c.save} and c.delay.clone_relations(self)
|
||||
end
|
||||
end
|
||||
|
||||
class << self
|
||||
def build_stub(platform)
|
||||
|
@ -60,14 +62,4 @@ class Repository < ActiveRecord::Base
|
|||
raise "Failed to delete repository #{name} inside platform #{platform.name} with code #{result}."
|
||||
end
|
||||
end
|
||||
|
||||
def add_admin_relations
|
||||
platform.relations.where(:role => 'admin').each do |rel|
|
||||
if !relations.exists?(:role => 'admin', :object_type => rel.object_type, :object_id => rel.object_id) && rel.object != owner
|
||||
r = relations.build(:role => 'admin', :object_type => rel.object_type)
|
||||
r.object_id = rel.object_id
|
||||
r.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,22 +11,19 @@ class User < ActiveRecord::Base
|
|||
|
||||
has_many :authentications, :dependent => :destroy
|
||||
has_many :build_lists, :dependent => :destroy
|
||||
has_many :subscribes, :foreign_key => :user_id, :dependent => :destroy
|
||||
has_many :comments, :dependent => :destroy
|
||||
|
||||
has_many :relations, :as => :object, :dependent => :destroy
|
||||
has_many :targets, :as => :object, :class_name => 'Relation'
|
||||
|
||||
has_many :own_projects, :as => :owner, :class_name => 'Project', :dependent => :destroy
|
||||
has_many :own_groups, :foreign_key => :owner_id, :class_name => 'Group'
|
||||
has_many :own_platforms, :as => :owner, :class_name => 'Platform', :dependent => :destroy
|
||||
has_many :own_repositories, :as => :owner, :class_name => 'Repository', :dependent => :destroy
|
||||
|
||||
has_many :groups, :through => :targets, :source => :target, :source_type => 'Group', :autosave => true
|
||||
has_many :projects, :through => :targets, :source => :target, :source_type => 'Project', :autosave => true
|
||||
has_many :groups, :through => :targets, :source => :target, :source_type => 'Group', :autosave => true
|
||||
has_many :platforms, :through => :targets, :source => :target, :source_type => 'Platform', :autosave => true
|
||||
has_many :repositories, :through => :targets, :source => :target, :source_type => 'Repository', :autosave => true
|
||||
has_many :subscribes, :foreign_key => :user_id, :dependent => :destroy
|
||||
|
||||
has_many :comments, :dependent => :destroy
|
||||
has_many :own_projects, :as => :owner, :class_name => 'Project', :dependent => :destroy
|
||||
has_many :own_groups, :foreign_key => :owner_id, :class_name => 'Group', :dependent => :destroy
|
||||
has_many :own_platforms, :as => :owner, :class_name => 'Platform', :dependent => :destroy
|
||||
|
||||
include Modules::Models::PersonalRepository
|
||||
|
||||
|
|
|
@ -46,5 +46,5 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{ :type => "submit" }
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => "Save")
|
||||
= image_tag("choose.png", :alt => "Save")
|
||||
= t("layout.search")
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.projects.build_button"))
|
||||
= image_tag("choose.png", :alt => t("layout.projects.build_button"))
|
||||
= t("layout.projects.build_button")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), root_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
- if @build_list.can_publish?
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/tick.png", :alt => t("layout.publish")) + " " + t("layout.publish"), publish_build_list_path(@build_list), :method => "put", :class => "button", :confirm => t("layout.confirm")
|
||||
= link_to image_tag("choose.png", :alt => t("layout.publish")) + " " + t("layout.publish"), publish_build_list_path(@build_list), :method => "put", :class => "button", :confirm => t("layout.confirm")
|
||||
|
||||
.block
|
||||
.content
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), categories_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
= label_tag "group[#{group.id}]", t("layout.collaborators.add")
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), project_collaborators_path(@project), :class => "text_button_padding link_button"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
.content
|
||||
.inner
|
||||
= form_tag add_project_collaborators_path(@project) do
|
||||
= javascript_include_tag 'autocomplete-rails.js'
|
||||
.group
|
||||
%h2.title= t("layout.collaborators.add")
|
||||
= label_tag "member_uname", t("layout.collaborators.input_username")
|
||||
|
@ -22,7 +21,7 @@
|
|||
%br
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.add"))
|
||||
= image_tag("choose.png", :alt => t("layout.add"))
|
||||
= t("layout.add")
|
||||
|
||||
= form_tag project_collaborators_path(@project) do
|
||||
|
@ -67,7 +66,7 @@
|
|||
= group.uname
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), project_path(@project), :class => "text_button_padding link_button"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @commentable_path , :class => "text_button_padding link_button"
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
- edit_path = edit_project_commit_comment_path(project, commentable, comment)
|
||||
- delete_path = project_commit_comment_path(project, commentable, comment)
|
||||
= link_to t("layout.edit"), edit_path if can? :update, comment
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), delete_path, :method => "delete", :class => "button", :confirm => t("layout.comments.confirm_delete") if can? :delete, comment
|
||||
=# link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), delete_path, :method => "delete", :class => "button", :confirm => t("layout.comments.confirm_delete") if can? :delete, comment
|
||||
= link_to t("layout.delete"), delete_path, :method => "delete", :confirm => t("layout.comments.confirm_delete") if can? :delete, comment
|
||||
|
||||
.block
|
||||
.content
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:tyle => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send"))
|
||||
= image_tag("choose.png", :alt => t("devise.confirmations.send"))
|
||||
= t("devise.confirmations.send")
|
||||
%span.text_button_padding
|
||||
= render :partial => "devise/shared/links"
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:tyle => "submit"}
|
||||
= image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button"))
|
||||
= image_tag("code.png", :alt => t("devise.passwords.edit_button"))
|
||||
= t("devise.passwords.edit_button")
|
||||
%span.text_button_padding
|
||||
= render :partial => "devise/shared/links"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:tyle => "submit"}
|
||||
= image_tag "web-app-theme/icons/tick.png", :alt => t("devise.passwords.button")
|
||||
= image_tag "choose.png", :alt => t("devise.passwords.button")
|
||||
= t("devise.passwords.button")
|
||||
%span.text_button_padding
|
||||
= render :partial => "devise/shared/links"
|
|
@ -67,10 +67,10 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up"))
|
||||
= image_tag("choose.png", :alt => t("devise.registrations.signed_up"))
|
||||
= t("layout.save")
|
||||
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("devise.registrations.cancel")) + " " + t("devise.registrations.cancel"), registration_path(resource_name), :method => :delete, :class => "button", :confirm => t("devise.registrations.cancel_confirmation")
|
||||
= link_to image_tag("x.png", :alt => t("devise.registrations.cancel")) + " " + t("devise.registrations.cancel"), registration_path(resource_name), :method => :delete, :class => "button", :confirm => t("devise.registrations.cancel_confirmation")
|
||||
|
||||
%span.text_button_padding
|
||||
= link_to t('layout.back'), :back, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.sign_up_header"))
|
||||
= image_tag("choose.png", :alt => t("devise.registrations.sign_up_header"))
|
||||
= t("devise.registrations.sign_up_header")
|
||||
%span.text_button_padding
|
||||
= render :partial => "devise/shared/links"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
.group.navform.wat-cf
|
||||
.right
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag 'web-app-theme/icons/key.png', :alt => "Save"
|
||||
= image_tag 'code.png', :alt => "Save"
|
||||
= t("layout.login")
|
||||
%span.text_button_padding
|
||||
= render :partial => "devise/shared/links"
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
= text_area_tag :content, @blob.data.encode_to_default, :id => "gollum-editor-body"
|
||||
|
||||
#gollum-editor-edit-summary.singleline
|
||||
= label_tag :message, t("layout.wiki.edit_commit_message"), :class => "jaws"
|
||||
= text_field_tag :message, t("layout.wiki.commit_message_placeholder"), :id => "editor-commit-message-field"
|
||||
= label_tag :message, t("wiki.edit_commit_message"), :class => "jaws"
|
||||
= text_field_tag :message, t("wiki.commit_message_placeholder"), :id => "editor-commit-message-field"
|
||||
|
||||
%span.jaws
|
||||
%br
|
||||
|
||||
= submit_tag t("layout.wiki.save_button"), :id => "gollum-editor-submit", :title => t("layout.wiki.save_changes")
|
||||
= submit_tag t("wiki.save_button"), :id => "gollum-editor-submit", :title => t("wiki.save_changes")
|
||||
= link_to t("layout.cancel"), blob_file_path, :class => 'minibutton', :id => 'gollum-editor-preview'
|
||||
|
||||
:javascript
|
||||
|
@ -19,8 +19,8 @@
|
|||
$.BlobEditor();
|
||||
});
|
||||
|
||||
- content_for :javascripts do
|
||||
= javascript_include_tag 'gollum/gollum.placeholder.js', 'blob.editor.js'
|
||||
|
||||
- content_for :stylesheets do
|
||||
= stylesheet_link_tag 'gollum/editor.css'
|
||||
/ - content_for :javascripts do
|
||||
/ = javascript_include_tag 'gollum/gollum.placeholder.js', 'blob.editor.js'
|
||||
/
|
||||
/ - content_for :stylesheets do
|
||||
/ = stylesheet_link_tag 'gollum/editor.css'
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
%tr{ :class => cycle("even", "odd")}
|
||||
%td.icon
|
||||
- if entry.is_a?(Grit::Blob)
|
||||
= image_tag("git/icons/text_document_16.png")
|
||||
= image_tag("code.png")
|
||||
- else
|
||||
= image_tag("git/icons/folder_16.png")
|
||||
= image_tag("folder.png")
|
||||
%td.tree_element
|
||||
- entry_path = File.join([@path.present? ? @path.encode_to_default : nil, entry.name.encode_to_default].compact)
|
||||
- if entry.is_a?(Grit::Blob)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), users_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
\:
|
||||
= @group.created_at
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_group_path(@group), :class => "button"
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), group_path(@group), :method => "delete", :class => "button", :confirm => t("layout.groups.confirm_delete")
|
||||
= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_group_path(@group), :class => "button"
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), group_path(@group), :method => "delete", :class => "button", :confirm => t("layout.groups.confirm_delete")
|
||||
|
||||
.block
|
||||
.secondary-navigation
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= csrf_meta_tag
|
||||
|
||||
%body
|
||||
.wrap.columns
|
||||
.wrap{:class => content_for?(:sidebar) ? 'columns' : ''}
|
||||
%header
|
||||
.left
|
||||
.middle
|
||||
|
@ -20,9 +20,7 @@
|
|||
.search
|
||||
.pic
|
||||
.field
|
||||
%input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}",
|
||||
:onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}",
|
||||
:type => "text", :value => "#{t "layout.search"}"}
|
||||
%input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}", :onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}", :type => "text", :value => "#{t "layout.search"}"}
|
||||
.user
|
||||
.avatar= image_tag 'ava.png', :alt => 'avatar', :height => "30"
|
||||
.profile
|
||||
|
|
|
@ -28,13 +28,12 @@
|
|||
= user.uname
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), group_path(parent), :class => "text_button_padding link_button"
|
||||
|
||||
= form_tag add_group_members_path(parent) do
|
||||
= javascript_include_tag 'autocomplete-rails.js'
|
||||
.group
|
||||
%h2.title= t("layout.members.add_member")
|
||||
= label_tag "", t("layout.members.input_username")
|
||||
|
@ -42,6 +41,6 @@
|
|||
%br
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.add"))
|
||||
= image_tag("choose.png", :alt => t("layout.add"))
|
||||
= t("layout.add")
|
||||
|
||||
|
|
|
@ -20,23 +20,13 @@
|
|||
= t("activerecord.attributes.repository.platform")
|
||||
\:
|
||||
= link_to @repository.platform.name, url_for(@repository.platform)
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.owner")
|
||||
\:
|
||||
= link_to @repository.owner.name, url_for(@repository.owner)
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.platform.visibility")
|
||||
\:
|
||||
= @repository.platform.visibility
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.platform")
|
||||
\:
|
||||
= link_to @repository.platform.name, platform_path(@platform)
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
|
|
|
@ -6,15 +6,9 @@
|
|||
%li= link_to t("layout.personal_repositories.private_users"), platform_private_users_path(@repository.platform) if @repository.platform.hidden?
|
||||
.content
|
||||
.inner
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.owner")
|
||||
\:
|
||||
= link_to @repository.owner.name, url_for(@repository.owner)
|
||||
|
||||
= render 'shared/urpmi_list', :urpmi_commands => @urpmi_commands
|
||||
.wat-cf
|
||||
=# link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
=# link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
= javascript_include_tag "autocomplete-rails.js"
|
||||
|
||||
- unless ['edit', 'update'].include? controller.action_name
|
||||
.group
|
||||
= f.label :name, :class => :label
|
||||
|
@ -29,7 +27,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @platforms_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%h2.title
|
||||
= t("layout.platforms.clone_header")
|
||||
.inner
|
||||
= form_for @cloned, :url => clone_platform_path(@platform), :html => { :class => :form } do |f|
|
||||
= form_for @cloned, :url => make_clone_platform_path(@platform), :html => { :class => :form } do |f|
|
||||
.group
|
||||
= f.label :name, :class => :label
|
||||
= f.text_field :name, :class => 'text_field'
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.clone")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @platforms_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -1,49 +1,119 @@
|
|||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.repositories.list"), @repositories_path + "#repositories"
|
||||
%li= link_to t("layout.repositories.new"), @new_repository_path
|
||||
%li.active= link_to t("layout.repositories.show"), repository_path(@repository)
|
||||
%li.first= link_to t("layout.platforms.list"), platforms_path
|
||||
%li= link_to t("layout.platforms.new"), new_platform_path if can? :create, Platform
|
||||
%li.active= link_to t("layout.platforms.show"), platform_path
|
||||
%li= link_to t("layout.platforms.private_users"), platform_private_users_path(@platform)
|
||||
.content
|
||||
.inner
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.name")
|
||||
= t("activerecord.attributes.platform.name")
|
||||
\:
|
||||
= @repository.name
|
||||
= @platform.name
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.description")
|
||||
= t("activerecord.attributes.platform.description")
|
||||
\:
|
||||
= @repository.description
|
||||
= @platform.description
|
||||
- if @platform.parent
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.platform")
|
||||
= t("activerecord.attributes.platform.parent")
|
||||
\:
|
||||
= link_to @repository.platform.description, url_for(@repository.platform)
|
||||
- if @platform.parent
|
||||
= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.owner")
|
||||
= t('layout.platforms.location')
|
||||
\:
|
||||
= link_to @repository.owner.try(:name), url_for(@repository.owner)
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete") if can? :destroy, @repository
|
||||
= @platform.path
|
||||
|
||||
%a{ :name => "projects" }
|
||||
%p
|
||||
%b
|
||||
= t('layout.platforms.owner')
|
||||
\:
|
||||
= link_to @platform.owner.try(:name), url_for(@platform.owner)
|
||||
|
||||
%p
|
||||
%b
|
||||
= t('layout.platforms.visibility')
|
||||
\:
|
||||
= @platform.visibility
|
||||
|
||||
%p
|
||||
%b
|
||||
= t('layout.platforms.platform_type')
|
||||
\:
|
||||
= @platform.platform_type
|
||||
|
||||
%p
|
||||
%b
|
||||
= t('layout.platforms.distrib_type')
|
||||
\:
|
||||
= @platform.distrib_type
|
||||
|
||||
|
||||
.wat-cf
|
||||
-#= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_path(@platform), :class => "button"
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_path(@platform), :method => "delete", :class => "button", :confirm => t("layout.platforms.confirm_delete") if can? :delete, @platform
|
||||
- if @platform.released?
|
||||
= link_to t("layout.platforms.unfreeze"), unfreeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_unfreeze"), :method => :post, :class => "button" if can? :unfreeze, @platform
|
||||
- else
|
||||
= link_to t("layout.platforms.freeze"), freeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_freeze"), :method => :post, :class => "button" if can? :freeze, @platform
|
||||
= link_to "Клонировать", clone_platform_path(@platform), :class => "button" if can? :clone, @platform
|
||||
= link_to t("layout.platforms.build_all"), build_all_platform_path(@platform), :confirm => I18n.t("layout.confirm"), :method => :post, :class => "button" if can? :build_all, @platform
|
||||
= link_to t("layout.platforms.edit"), edit_platform_path(@platform), :class => "button" if can? :edit, @platform
|
||||
|
||||
%a{ :name => "repositories" }
|
||||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.projects.list"), repository_path(@repository) + "#projects"
|
||||
%li= link_to t("layout.projects.add"), url_for(:controller => :repositories, :action => :add_project)
|
||||
%li.first.active= link_to t("layout.repositories.list"), platform_path(@platform) + "#repositories"
|
||||
%li= link_to t("layout.repositories.new"), new_platform_repository_path(@platform) if can? :create, Repository.build_stub(@platform)
|
||||
.content
|
||||
%h2.title
|
||||
= t("layout.projects.list_header")
|
||||
= t("layout.repositories.list_header")
|
||||
.inner
|
||||
= render :partial => 'shared/search_form'
|
||||
= render :partial => 'proj_list1', :object => @projects
|
||||
%table.table
|
||||
%tr
|
||||
%th.first= t("activerecord.attributes.repository.description")
|
||||
%th.last
|
||||
- @platform.repositories.recent.each do |repository|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td
|
||||
= link_to repository.description, platform_repository_path(@platform, repository)
|
||||
%td.last
|
||||
= link_to t("layout.show"), platform_repository_path(@platform, repository)
|
||||
|
|
||||
= link_to t("layout.delete"), platform_repository_path(@platform, repository), :method => :delete, :confirm => t("layout.repositories.confirm_delete") if can? :destroy, @platform
|
||||
.actions-bar.wat-cf
|
||||
.actions
|
||||
= will_paginate @projects, :param_name => :project_page
|
||||
|
||||
|
||||
-# content_for :sidebar, render(:partial => 'sidebar')
|
||||
%a{ :name => "producs" }
|
||||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.products.list"), platform_path(@platform) + "#products"
|
||||
%li= link_to t("layout.products.new"), new_platform_product_path(@platform) if can? :create, Product.new(:platform_id => @platform.id)
|
||||
.content
|
||||
%h2.title
|
||||
= t("layout.products.list_header")
|
||||
.inner
|
||||
%table.table
|
||||
%tr
|
||||
%th.first= t("activerecord.attributes.product.name")
|
||||
%th.last
|
||||
- @platform.products.recent.each do |product|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td
|
||||
= link_to product.name, [@platform, product]
|
||||
%td.last
|
||||
= link_to t("layout.edit"), edit_platform_product_path(@platform, product) if can? :update, product
|
||||
|
|
||||
= link_to t("layout.delete"), platform_product_path(@platform, product), :method => :delete, :confirm => t("layout.products.confirm_delete") if can? :destroy, product
|
||||
= (product.can_clone? ? "| #{link_to t("layout.products.clone"), clone_platform_product_path(@platform, product)}" : "").html_safe
|
||||
.actions-bar.wat-cf
|
||||
.actions
|
||||
- content_for :sidebar, render(:partial => 'sidebar')
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- if @urpmi_list
|
||||
= render 'shared/urpmi_list', :urpmi_commands => @urpmi_list
|
||||
.wat-cf
|
||||
=# link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_repository_path(@platform, @repository), :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
=# link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_repository_path(@platform, @repository), :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
%br
|
||||
.inner
|
||||
=t('layout.private_users.warning_message')
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
%tr{:class => cycle("odd", "even")}
|
||||
%td= product_build_list.id
|
||||
%td= link_to product_build_list.product.name, [product_build_list.product.platform, product_build_list.product]
|
||||
%td= link_to nil, product_build_list.container_path
|
||||
%td= product_build_list.human_status
|
||||
%td= link_to t("layout.product_build_lists.delete"), platform_product_product_build_list_path(product_build_list.product.platform, product_build_list.product, product_build_list), :method => "delete", :confirm => t("layout.confirm") if can? :delete, product_build_list
|
||||
%td= product_build_list.notified_at
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), platform_path(@platform), :class => "text_button_padding link_button"
|
||||
|
|
|
@ -26,11 +26,13 @@
|
|||
= t("layout.#{@product.system_wide?}_")
|
||||
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_product_path(@platform, @product), :class => "button"
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), :method => "delete", :class => "button", :confirm => t("layout.products.confirm_delete")
|
||||
- if can? :update, @product
|
||||
= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_product_path(@platform, @product), :class => "button"
|
||||
- if can? :destroy, @product
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), :method => "delete", :class => "button", :confirm => t("layout.products.confirm_delete")
|
||||
- if @product.can_clone?
|
||||
= link_to t("layout.products.clone"), clone_platform_product_path(@platform, @product), :class => "button"
|
||||
- if @product.can_build?
|
||||
- if can?(:create, @product => ProductBuildList)
|
||||
= link_to t("layout.products.build"), platform_product_product_build_lists_path(@platform, @product), :class => "button", :method => 'post', :confirm => t("layout.confirm")
|
||||
|
||||
.block
|
||||
|
@ -40,7 +42,9 @@
|
|||
%tr
|
||||
%th.first= t("activerecord.attributes.product_build_list.id")
|
||||
%th= t("activerecord.attributes.product_build_list.product")
|
||||
%th= t("activerecord.attributes.product_build_list.container_path")
|
||||
%th= t("activerecord.attributes.product_build_list.status")
|
||||
%th= t("layout.product_build_lists.action")
|
||||
%th.last= t("activerecord.attributes.product_build_list.notified_at")
|
||||
= render @product.product_build_lists.default_order
|
||||
/ = will_paginate build_lists
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @projects_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
%li= link_to t("project_menu.commits"), commits_path(@project), {:class => (act == :index && contr == :commits) ? 'active' : ''}
|
||||
%li= link_to t("project_menu.builds"), project_build_lists_path(@project), {:class => (act == :index && contr == :builds) ? 'active' : ''}
|
||||
%li= link_to t("project_menu.tracker"), project_issues_path(@project), {:class => (act == :index && contr == :issues) ? 'active' : ''}
|
||||
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => (act == :index && contr == :wiki) ? 'active' : ''}
|
||||
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => contr == :wiki ? 'active' : ''}
|
||||
%li= link_to t("project_menu.readme"), "#" #pending
|
||||
%li= link_to t("project_menu.settings"), edit_project_path(@project), {:class => (act == :edit && contr == :projects) ? 'active' : ''}
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
\:
|
||||
= git_repo_url @project.git_repo_name
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_project_path(@project), :class => "button" if can? :update, @project
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), project_path(@project), :method => "delete", :class => "button", :confirm => t("layout.projects.confirm_delete") if can? :destroy, @project
|
||||
= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_project_path(@project), :class => "button" if can? :update, @project
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), project_path(@project), :method => "delete", :class => "button", :confirm => t("layout.projects.confirm_delete") if can? :destroy, @project
|
||||
= link_to "Fork", fork_project_path(@project), :class => "button", :method => "post", :confirm => t("layout.confirm") if can? :fork, @project
|
||||
|
||||
%a{ :name => "build_lists"}
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
%li= link_to t("layout.users.new"), new_user_path
|
||||
%li.active= link_to t("layout.users.register_requests"), register_requests_path
|
||||
.content
|
||||
%div{:style => 'float: right; margin: 20px'}
|
||||
= link_to t("layout.register_request.approved"), register_requests_path(:scope => :approved)
|
||||
\|
|
||||
= link_to t("layout.register_request.rejected"), register_requests_path(:scope => :rejected)
|
||||
%h2.title
|
||||
= t("layout.register_request.list_header")
|
||||
.inner
|
||||
|
@ -23,7 +27,8 @@
|
|||
%tr{:class => cycle("odd", "even")}
|
||||
%td= check_box_tag 'request_ids[]', request.id
|
||||
%td= request.name
|
||||
%td= request.email
|
||||
- @user = User.find_by_email(request.email) if request.approved
|
||||
%td= link_to_if @user, request.email, @user
|
||||
%td= request.interest
|
||||
%td= request.more
|
||||
%td= request.created_at
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @repositories_path + "#repositories", :class => "text_button_padding link_button"
|
||||
|
|
|
@ -21,13 +21,8 @@
|
|||
= t("activerecord.attributes.repository.platform")
|
||||
\:
|
||||
= link_to @repository.platform.description, url_for(@repository.platform)
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.owner")
|
||||
\:
|
||||
= link_to @repository.owner.uname, url_for(@repository.owner)
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
|
|
|
@ -21,13 +21,8 @@
|
|||
= t("activerecord.attributes.repository.platform")
|
||||
\:
|
||||
= link_to @repository.platform.description, url_for(@repository.platform)
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.owner")
|
||||
\:
|
||||
= link_to @repository.owner.try(:name), url_for(@repository.owner)
|
||||
.wat-cf
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete") if can? :destroy, @repository
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete") if can? :destroy, @repository
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), user_settings_notifier_path(@user), :class => "text_button_padding link_button"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p== Hello, #{@user.name}.
|
||||
|
||||
|
||||
%p You have been assigned to issue #{ link_to @issue.title, [@issue.project, @issue] }
|
||||
%p You have been assigned to issue #{ link_to @issue.title, project_issue_url(@issue.project, @issue) }
|
||||
|
||||
|
||||
%p== Support team «ROSA Build System»
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p== Здравствуйте, #{@user.name}.
|
||||
|
||||
|
||||
%p Вам была назначена задача #{ link_to @issue.title, [@issue.project, @issue] }
|
||||
%p Вам была назначена задача #{ link_to @issue.title, project_issue_url(@issue.project, @issue) }
|
||||
|
||||
|
||||
%p== Команда поддержки «ROSA Build System»
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
%p== Hello, #{@user.name}.
|
||||
|
||||
- if @comment.commentable.class == Issue
|
||||
- link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable]
|
||||
- link = link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable)
|
||||
- object = 'issue'
|
||||
- elsif @comment.commentable.class == Grit::Commit
|
||||
- link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id)
|
||||
- link = link_to @comment.commentable.message, commit_url(@comment.project, @comment.commentable_id)
|
||||
- object = 'commit'
|
||||
%p #{ link_to @comment.user.uname, user_path(@comment.user)} added new comment to #{object} #{link}.
|
||||
%p #{ link_to @comment.user.uname, user_url(@comment.user)} added new comment to #{object} #{link}.
|
||||
|
||||
%p "#{ @comment.body }"
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
%p== Здравствуйте, #{@user.name}.
|
||||
|
||||
- if @comment.commentable.class == Issue
|
||||
- link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable]
|
||||
- link = link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable)
|
||||
- object = 'задаче'
|
||||
- elsif @comment.commentable.class == Grit::Commit
|
||||
- link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id)
|
||||
- link = link_to @comment.commentable.message, commit_url(@comment.project, @comment.commentable_id)
|
||||
- object = 'коммиту'
|
||||
%p #{ link_to @comment.user.uname, user_path(@comment.user)} добавил комментарий к #{object} #{link}.
|
||||
%p #{ link_to @comment.user.uname, user_url(@comment.user)} добавил комментарий к #{object} #{link}.
|
||||
|
||||
%p "#{ @comment.body }"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p== Hello, #{@user.name}.
|
||||
|
||||
|
||||
%p Your comment into issue #{ link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] } has been answered.
|
||||
- #TODO hmm... this need to be refactored.
|
||||
%p Your comment into issue #{ link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable) } has been answered.
|
||||
|
||||
%p "#{ @comment.body }"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p== Hello, #{@user.name}.
|
||||
|
||||
|
||||
%p To project #{ link_to @issue.project.name, project_path(@issue.project) } has been added an issue #{ link_to @issue.title, [@issue.project, @issue] }
|
||||
%p To project #{ link_to @issue.project.name, project_url(@issue.project) } has been added an issue #{ link_to @issue.title, project_issue_url(@issue.project, @issue) }
|
||||
|
||||
|
||||
%p== Support team «ROSA Build System»
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p== Здравствуйте, #{@user.name}.
|
||||
|
||||
|
||||
%p К проекту #{ link_to @issue.project.name, project_path(@issue.project) } была добавлена задача #{ link_to @issue.title, [@issue.project, @issue] }
|
||||
%p К проекту #{ link_to @issue.project.name, project_url(@issue.project) } была добавлена задача #{ link_to @issue.title, project_issue_url(@issue.project, @issue) }
|
||||
|
||||
|
||||
%p== Команда поддержки «ROSA Build System»
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{ :type => "submit" }
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => "Save")
|
||||
= image_tag("choose.png", :alt => "Save")
|
||||
= t("layout.search")
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), users_path, :class => "text_button_padding link_button"
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
= @user.created_at
|
||||
.wat-cf
|
||||
- if can? :edit, @user
|
||||
= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button"
|
||||
= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button"
|
||||
- if can? :destroy, @user
|
||||
= link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete")
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete")
|
||||
|
||||
.block
|
||||
.secondary-navigation
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
- revert_button = capture do
|
||||
= link_to t("layout.wiki.revert_page#{action_name == 'revert' ? '' : 's'}"), '#', :class => "gollum-revert-button"
|
||||
= link_to t("wiki.revert_page#{action_name == 'revert' ? '' : 's'}"), '#', :class => "gollum-revert-button button width100"
|
||||
|
||||
#compare-content
|
||||
- if action_name != 'revert'
|
||||
%ul.actions
|
||||
%li.minibutton
|
||||
= form_tag revert_path(@project, @versions[0][0..6], @versions[1][0..6], @name),
|
||||
:name => "gollum-revert", :id => "gollum-revert-form" do
|
||||
- if action_name != 'revert'
|
||||
= form_tag revert_path(@project, @versions.first[0..6], (@versions.size == 1) ? 'prev' : @versions.last[0..6], @name), :name => "gollum-revert", :id => "gollum-revert-form" do
|
||||
= revert_button if can? :write, @project
|
||||
|
||||
%br
|
||||
%br
|
||||
|
||||
= render :partial => 'diff_data', :collection => @diffs, :as => :diff
|
||||
.spacer
|
||||
|
||||
#gollum-footer
|
||||
%ul.actions
|
||||
- if action_name != 'revert'
|
||||
%li.minibutton
|
||||
%br
|
||||
%br
|
||||
|
||||
- if action_name != 'revert'
|
||||
= revert_button if can? :write, @project
|
||||
%li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
|
||||
|
||||
%br
|
||||
%br
|
||||
|
||||
= link_to t("wiki.back_to_top"), '#wiki'
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
.blob_header
|
||||
.size= h(diff.deleted_file ? diff.a_path : diff.b_path)
|
||||
- puts 'in view'
|
||||
- puts diff.a_path
|
||||
- puts diff.b_path
|
||||
.size= h(diff.deleted_file ? diff.a_path : diff.b_path).encode_to_default
|
||||
.clear
|
||||
|
||||
.diff_data.highlight
|
||||
= render_diff(diff)
|
||||
.diff_data.highlight= render_diff(diff)
|
|
@ -3,41 +3,38 @@
|
|||
%fieldset#gollum-editor-fields
|
||||
- if @new
|
||||
#gollum-editor-title-field.singleline
|
||||
= label_tag :page, t("layout.wiki.page_title"), :class => 'jaws'
|
||||
= label_tag :page, t("wiki.page_title"), :class => 'jaws'
|
||||
= text_field_tag :page, @name, :id => "gollum-editor-page-title"
|
||||
- else
|
||||
= hidden_field_tag :page, @name, :id => "gollum-editor-page-title"
|
||||
|
||||
= render :partial => 'editor_toolbar'
|
||||
= render 'editor_toolbar'
|
||||
|
||||
= text_area_tag :content, @content, :id => "gollum-editor-body", :'data-markup-lang' => format
|
||||
|
||||
- if has_footer?
|
||||
#gollum-editor-edit-footer.collapsed
|
||||
= link_to "#", :class => "button" do
|
||||
%span= t("layout.wiki.expand_collapse")
|
||||
%h4
|
||||
Footer
|
||||
%span= t("wiki.expand_collapse")
|
||||
%h4= t("wiki.footer")
|
||||
= text_area_tag :footer, footer.text_data
|
||||
|
||||
- if has_sidebar?
|
||||
#gollum-editor-edit-sidebar.collapsed
|
||||
= link_to "#", :class => "button" do
|
||||
%span= t("layout.wiki.expand_collapse")
|
||||
%h4
|
||||
Sidebar
|
||||
%span= t("wiki.expand_collapse")
|
||||
%h4= t("wiki.sidebar")
|
||||
= text_area_tag :sidebar, sidebar.text_data
|
||||
|
||||
#gollum-editor-edit-summary.singleline
|
||||
= label_tag :message, t("layout.wiki.edit_commit_message"), :class => "jaws"
|
||||
= text_field_tag :message, t("layout.wiki.commit_message_placeholder"), :id => "gollum-editor-message-field"
|
||||
= label_tag :message, t("wiki.edit_commit_message"), :class => "jaws"
|
||||
= text_field_tag :message, t("wiki.commit_message_placeholder"), :id => "gollum-editor-message-field"
|
||||
|
||||
%span.jaws
|
||||
%br
|
||||
|
||||
= submit_tag t("layout.wiki.save_button"), :id => "gollum-editor-submit", :title => t("layout.wiki.save_changes")
|
||||
= link_to t("layout.wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview",
|
||||
:class => "minibutton", :title => t("layout.wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
|
||||
= submit_tag t("wiki.save_button"), :id => "gollum-editor-submit", :title => t("wiki.save_changes")
|
||||
= link_to t("wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview", :class => "minibutton", :title => t("wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
|
||||
|
||||
/ - content_for :javascripts do
|
||||
/ = javascript_include_tag 'gollum/editor/gollum.editor.js'
|
||||
|
|
|
@ -1,51 +1,48 @@
|
|||
#gollum-editor-function-bar
|
||||
#gollum-editor-function-buttons
|
||||
= link_to "#", :id => "function-bold", :class => "function-button", :title => t("layout.wiki.editor.bold") do
|
||||
%span= t("layout.wiki.editor.bold")
|
||||
= link_to "#", :id => "function-italic", :class => "function-button", :title => t("layout.wiki.editor.italic") do
|
||||
%span= t("layout.wiki.editor.italic")
|
||||
= link_to "#", :id => "function-code", :class => "function-button", :title => t("layout.wiki.editor.code") do
|
||||
%span= t("layout.wiki.editor.code")
|
||||
= link_to "#", :id => "function-bold", :class => "function-button", :title => t("wiki.editor.bold") do
|
||||
%span= t("wiki.editor.bold")
|
||||
= link_to "#", :id => "function-italic", :class => "function-button", :title => t("wiki.editor.italic") do
|
||||
%span= t("wiki.editor.italic")
|
||||
= link_to "#", :id => "function-code", :class => "function-button", :title => t("wiki.editor.code") do
|
||||
%span= t("wiki.editor.code")
|
||||
|
||||
%span.function-divider
|
||||
|
||||
%span.function-divider
|
||||
|
||||
= link_to "#", :id => "function-ul", :class => "function-button", :title => t("layout.wiki.editor.unordered_list") do
|
||||
%span= t("layout.wiki.editor.unordered_list")
|
||||
= link_to "#", :id => "function-ol", :class => "function-button", :title => t("layout.wiki.editor.ordered_list") do
|
||||
%span= t("layout.wiki.editor.ordered_list")
|
||||
= link_to "#", :id => "function-blockquote", :class => "function-button", :title => t("layout.wiki.editor.blockquote") do
|
||||
%span= t("layout.wiki.editor.blockquote")
|
||||
= link_to "#", :id => "function-hr", :class => "function-button", :title => t("layout.wiki.editor.horizontal_rule") do
|
||||
%span= t("layout.wiki.editor.horizontal_rule")
|
||||
= link_to "#", :id => "function-ul", :class => "function-button", :title => t("wiki.editor.unordered_list") do
|
||||
%span= t("wiki.editor.unordered_list")
|
||||
= link_to "#", :id => "function-ol", :class => "function-button", :title => t("wiki.editor.ordered_list") do
|
||||
%span= t("wiki.editor.ordered_list")
|
||||
= link_to "#", :id => "function-blockquote", :class => "function-button", :title => t("wiki.editor.blockquote") do
|
||||
%span= t("wiki.editor.blockquote")
|
||||
= link_to "#", :id => "function-hr", :class => "function-button", :title => t("wiki.editor.horizontal_rule") do
|
||||
%span= t("wiki.editor.horizontal_rule")
|
||||
|
||||
%span.function-divider
|
||||
|
||||
%span.function-divider
|
||||
|
||||
= link_to "#", :id => "function-h1", :class => "function-button", :title => t("layout.wiki.editor.h1") do
|
||||
%span= t("layout.wiki.editor.h1")
|
||||
= link_to "#", :id => "function-h2", :class => "function-button", :title => t("layout.wiki.editor.h2") do
|
||||
%span= t("layout.wiki.editor.h2")
|
||||
= link_to "#", :id => "function-h3", :class => "function-button", :title => t("layout.wiki.editor.h3") do
|
||||
%span= t("layout.wiki.editor.h3")
|
||||
= link_to "#", :id => "function-h1", :class => "function-button", :title => t("wiki.editor.h1") do
|
||||
%span= t("wiki.editor.h1")
|
||||
= link_to "#", :id => "function-h2", :class => "function-button", :title => t("wiki.editor.h2") do
|
||||
%span= t("wiki.editor.h2")
|
||||
= link_to "#", :id => "function-h3", :class => "function-button", :title => t("wiki.editor.h3") do
|
||||
%span= t("wiki.editor.h3")
|
||||
|
||||
%span.function-divider
|
||||
|
||||
%span.function-divider
|
||||
|
||||
= link_to "#", :id => "function-link", :class => "function-button", :title => t("layout.wiki.editor.link") do
|
||||
%span= t("layout.wiki.editor.link")
|
||||
= link_to "#", :id => "function-image", :class => "function-button", :title => t("layout.wiki.editor.image") do
|
||||
%span= t("layout.wiki.editor.image")
|
||||
= link_to "#", :id => "function-link", :class => "function-button", :title => t("wiki.editor.link") do
|
||||
%span= t("wiki.editor.link")
|
||||
= link_to "#", :id => "function-image", :class => "function-button", :title => t("wiki.editor.image") do
|
||||
%span= t("wiki.editor.image")
|
||||
|
||||
%span.function-divider
|
||||
|
||||
%span.function-divider
|
||||
|
||||
= link_to "#", :id => "function-help", :class => "function-button", :title => t("layout.wiki.editor.help") do
|
||||
%span= t("layout.wiki.editor.help")
|
||||
= link_to "#", :id => "function-help", :class => "function-button", :title => t("wiki.editor.help") do
|
||||
%span= t("wiki.editor.help")
|
||||
|
||||
#gollum-editor-format-selector
|
||||
= select_tag :format, options_for_select(wiki_formats, format), :id => "wiki_format"
|
||||
= label_tag :format, t("layout.wiki.editor.format")
|
||||
= label_tag :format, t("wiki.editor.format")
|
||||
|
||||
#gollum-editor-help.jaws
|
||||
%ul#gollum-editor-help-parent
|
||||
%li= link_to "help_1", "javascript:void(0);", :class => "selected"
|
||||
|
@ -62,4 +59,3 @@
|
|||
#gollum-editor-help-wrapper
|
||||
#gollum-editor-help-content
|
||||
%p
|
||||
|
||||
|
|
|
@ -1,23 +1,18 @@
|
|||
.url-box
|
||||
%ul.clone-urls
|
||||
%li.http-clone-url.selected
|
||||
= link_to t("layout.wiki.clones.http"), git_repo_url(@project.wiki_repo_name),
|
||||
:'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
|
||||
%input.url-field{:type => 'text', :spellcheck => 'false'}
|
||||
%p.url-description
|
||||
%strong
|
||||
access
|
||||
.name
|
||||
= link_to t("wiki.clones.http"), git_repo_url(@project.wiki_repo_name), :'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
|
||||
#url-field{:style => 'display: inline'}
|
||||
.role
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
var link = $('li.http-clone-url a').first();
|
||||
var link = $('.name a').first();
|
||||
|
||||
$('.url-box input.url-field').attr('value', link.attr('href'));
|
||||
$('.url-box p.url-description strong').text(link.attr('data-permissions'));
|
||||
$('.name #url-field').text(link.attr('href'));
|
||||
$('.role').text(link.attr('data-permissions'));
|
||||
|
||||
$('li.http-clone-url a').live('click', function(e) {
|
||||
$('.name a').live('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.url-box input.url-field').attr('value', $(this).attr('href'));
|
||||
$('.url-box p.url-description strong').text($(this).attr('data-permissions'));
|
||||
$('.name #url-field').text($(this).attr('href'));
|
||||
$('.role').text($(this).attr('data-permissions'));
|
||||
});
|
||||
});
|
|
@ -1,17 +1,11 @@
|
|||
#template
|
||||
%p
|
||||
Your wiki data can be cloned from a git repository for offline access.
|
||||
You have several options for editing it at this point:
|
||||
%p
|
||||
Your wiki data can be cloned from a git repository for offline access. You have several options for editing it at this point:
|
||||
%br
|
||||
%ol
|
||||
%li
|
||||
With your favorite text editor or IDE.
|
||||
%li With your favorite text editor or IDE.
|
||||
%li
|
||||
With the built-in web interface, included with the
|
||||
= link_to 'Gollum', "https://github.com/github/gollum"
|
||||
Ruby API.
|
||||
%li
|
||||
With the Gollum Ruby API.
|
||||
%p
|
||||
When you're done, you can simply push your changes back to our system to
|
||||
see them reflected on the site. The wiki repositories obey the same
|
||||
access rules as the source repository that they belong to.
|
||||
%li With the Gollum Ruby API.
|
||||
When you're done, you can simply push your changes back to our system to see them reflected on the site. The wiki repositories obey the same access rules as the source repository that they belong to.
|
|
@ -1,18 +1,11 @@
|
|||
#template
|
||||
%p
|
||||
Все данные вашей Wiki могут быть клонированы из Git-репозитория для
|
||||
доступа без интернета. В этом случае вы можете редактировать страницы
|
||||
следующими способами:
|
||||
%p
|
||||
Все данные вашей Wiki могут быть клонированы из Git-репозитория для доступа без интернета. В этом случае вы можете редактировать страницы следующими способами:
|
||||
%br
|
||||
%ol
|
||||
%li
|
||||
Вашим любимым текстовым редактором или IDE.
|
||||
%li Вашим любимым текстовым редактором или IDE.
|
||||
%li
|
||||
С помощью встроенного Web-интерфейса, включенного в
|
||||
= link_to 'Gollum', "https://github.com/github/gollum"
|
||||
Ruby API.
|
||||
%li
|
||||
С помощью Gollum Ruby API.
|
||||
%p
|
||||
Когда изменения будут завершены, просто запуште их обратно в нашу систему
|
||||
чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми
|
||||
же правами, что и к проекту, с которым она связана.
|
||||
%li С помощью Gollum Ruby API.
|
||||
Когда изменения будут завершены, просто запуште их обратно в нашу систему чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми же правами, что и к проекту, с которым она связана.
|
|
@ -1,36 +1,41 @@
|
|||
#wiki-history
|
||||
%ul.actions
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.compare_revisions"), "javascript:void(0);",
|
||||
:class => "action-compare-revision"
|
||||
|
||||
= form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
|
||||
%fieldset
|
||||
%table
|
||||
%tbody
|
||||
= form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
|
||||
%table.wiki{:cellpadding => "0", :cellspacing => "0"}
|
||||
- @versions.each do |v|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td.checkbox
|
||||
= check_box_tag "versions[]", v.id
|
||||
%td.author
|
||||
%tr.history
|
||||
%td.td1
|
||||
%span#niceCheckbox1.niceCheck-main{:onclick => "changeCheck(this)"}
|
||||
/ = check_box_tag "versions[]", v.id, :html => {:class => 'history_cbx'}
|
||||
%input{:type => 'checkbox', :id => 'versions_', :name => 'versions[]', :value => v.id, :class => 'history_cbx'}
|
||||
%td.td2
|
||||
- user = User.where(:email => v.author.email).first
|
||||
.avatar
|
||||
%a{:href => "#"}
|
||||
= link_to user_path_by_user(user) do
|
||||
%img{:src => gravatar_url(v.author.email),
|
||||
:alt => "avatar: #{v.author.name.encode_to_default}",
|
||||
:class => "mini-gravatar"}
|
||||
%img.mini-gravatar{:src => gravatar_url(v.author.email), :alt => "avatar: #{v.author.name.encode_to_default}"}
|
||||
%span.username= user.present? ? user.uname : v.author.name.encode_to_default
|
||||
%td.commit-name
|
||||
%span.time-elapsed= "#{l v.committed_date.to_date, :format => :long}:"
|
||||
|
||||
.name
|
||||
.both
|
||||
%td.td3
|
||||
%span.wiki-gray= "#{l v.committed_date.to_date, :format => :long}:"
|
||||
= v.message.encode_to_default
|
||||
- if @name
|
||||
= raw "[#{link_to v.id[0..6], versioned_project_wiki_path(@project, escaped_name, v.id), :title => t("layout.wiki.view_commit")}]"
|
||||
= raw "[#{link_to v.id[0..6], versioned_project_wiki_path(@project, escaped_name, v.id), :title => t("wiki.view_commit")}]"
|
||||
- else
|
||||
= "[#{v.id[0..6]}]"
|
||||
|
||||
#gollum-footer
|
||||
%ul.actions
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.compare_revisions"), "javascript:void(0);", :class => "action-compare-revision"
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.back_to_top"), "#wiki", :class => "action-back-to-top"
|
||||
:javascript
|
||||
$('.niceCheck-main').click(function() {
|
||||
var count = 0;
|
||||
$('input.history_cbx').each(function(i,el) {
|
||||
if ($(el).attr('checked')) {
|
||||
count = count + 1;
|
||||
}
|
||||
});
|
||||
if (count > 2) {
|
||||
var cbx = $( $(this).find('input.history_cbx')[0] );
|
||||
if ( cbx.attr('checked') ) {
|
||||
$(this).css('background-position', '0pt 0px');
|
||||
cbx.removeAttr('checked');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
- act = action_name.intern
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
|
||||
= link_to t("layout.wiki.home"), project_wiki_index_path(@project)
|
||||
.sub-menu
|
||||
.left= @project.name
|
||||
%nav
|
||||
%ul
|
||||
%li{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
|
||||
= link_to t("wiki.home"), project_wiki_index_path(@project)
|
||||
%li{:class => (act == :pages) ? 'active' : ''}
|
||||
= link_to t("layout.wiki.pages"), pages_project_wiki_index_path(@project)
|
||||
= link_to t("wiki.pages"), pages_project_wiki_index_path(@project)
|
||||
%li{:class => (act == :wiki_history or act == :compare_wiki) ? 'active' : ''}
|
||||
= link_to t("layout.wiki.wiki_history"), history_project_wiki_index_path(@project)
|
||||
= link_to t("wiki.wiki_history"), history_project_wiki_index_path(@project)
|
||||
%li{:class => (act == :git) ? 'active' : ''}
|
||||
= link_to t("layout.wiki.git_access"), git_project_wiki_index_path(@project)
|
||||
= link_to t("wiki.git_access"), git_project_wiki_index_path(@project)
|
|
@ -1,23 +1,19 @@
|
|||
#wiki-content
|
||||
.wrap{:class => "#{has_footer? ? 'has-footer' : ''} #{has_sidebar? ? 'has-rightbar' : ''}"}
|
||||
#wiki-body{:class => "gollum-#{format}-content"}
|
||||
#template
|
||||
= raw @content
|
||||
#template= raw @content
|
||||
- if has_sidebar?
|
||||
#wiki-rightbar{:class => "gollum-#{sidebar_format}-content"}
|
||||
= raw sidebar_content
|
||||
#wiki-rightbar{:class => "gollum-#{sidebar_format}-content"}= raw sidebar_content
|
||||
- if has_footer?
|
||||
#wiki-footer{:class => "gollum-#{footer_format}-content"}
|
||||
#footer-content
|
||||
= raw footer_content
|
||||
#footer-content= raw footer_content
|
||||
#gollum-footer
|
||||
%p#last-edit
|
||||
= t("layout.wiki.last_edited_by")
|
||||
%b
|
||||
= user_link_by_user User.where(:email => author_email).first
|
||||
= t("wiki.last_edited_by")
|
||||
%b= user_link_by_user User.where(:email => author_email).first
|
||||
= time_ago_in_words date.to_time - 4.hours, true
|
||||
= t("layout.time.ago")
|
||||
- unless action_name == 'preview' or cannot? :write, @project
|
||||
%p#delete-link
|
||||
= link_to project_wiki_path(@project, escaped_name), :method => :delete, :confirm => t("layout.confirm") do
|
||||
%span= t("layout.wiki.delete_page")
|
||||
= link_to project_wiki_path(@project, escaped_name), :method => :delete, :confirm => t("layout.confirm"), :class => 'button width100' do
|
||||
%span= t("wiki.delete_page")
|
|
@ -1,22 +1,21 @@
|
|||
#results
|
||||
- if @results and !@results.empty?
|
||||
%ul
|
||||
%p
|
||||
- if @results.present?
|
||||
- @results.each do |result|
|
||||
%li
|
||||
- if action_name == 'search'
|
||||
= link_to result[:name], project_wiki_path(@project, CGI.escape(result[:name]))
|
||||
%span.count= "(#{result.count} #{t("layout.wiki.matches")})"
|
||||
%span.count= "(#{result.count} #{t("wiki.matches")})"
|
||||
-else
|
||||
= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
|
||||
- else
|
||||
%br
|
||||
- else
|
||||
%p#no-results
|
||||
- @st_ref = capture do
|
||||
%strong= @ref || @query
|
||||
- if action_name == 'search'
|
||||
= raw t("layout.wiki.no_results_for_search", :query => @st_ref)
|
||||
= raw t("wiki.no_results_for_search", :query => @st_ref)
|
||||
- else
|
||||
= raw t("layout.wiki.no_pages_in", :ref => @st_ref)
|
||||
= raw t("wiki.no_pages_in", :ref => @st_ref)
|
||||
|
||||
#footer
|
||||
%ul.actions
|
||||
%li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
|
||||
/ #footer
|
||||
/ %ul.actions
|
||||
/ %li.minibutton= link_to t("wiki.back_to_top"), '#wiki'
|
|
@ -1,6 +1,6 @@
|
|||
#gollum-searchbar
|
||||
= form_tag search_project_wiki_index_path(@project), :method => :get, :id => "gollum-search-form" do
|
||||
#gollum-searchbar-fauxtext
|
||||
= text_field_tag :q, t("layout.wiki.search_and_hellip"), :id => "search-query", :autocomplete => "on"
|
||||
= link_to "#", :id => "search-submit", :title => t("layout.wiki.search_popup") do
|
||||
%span= t("layout.wiki.search")
|
||||
= text_field_tag :q, t("wiki.search_and_hellip"), :id => "search-query", :autocomplete => "on"
|
||||
= link_to "#", :id => "search-submit", :title => t("wiki.search_popup") do
|
||||
%span= t("wiki.search")
|
|
@ -0,0 +1,14 @@
|
|||
- act = action_name.intern
|
||||
%aside
|
||||
.admin-preferences
|
||||
%ul
|
||||
%li{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
|
||||
= link_to t("wiki.home"), project_wiki_index_path(@project)
|
||||
%li{:class => (act == :pages) ? 'active' : ''}
|
||||
= link_to t("wiki.pages"), pages_project_wiki_index_path(@project)
|
||||
%li{:class => (act == :wiki_history or act == :compare_wiki) ? 'active' : ''}
|
||||
= link_to t("wiki.wiki_history"), history_project_wiki_index_path(@project)
|
||||
%li{:class => (act == :git) ? 'active' : ''}
|
||||
= link_to t("wiki.git_access"), git_project_wiki_index_path(@project)
|
||||
%br
|
||||
= render 'searchbar'
|
|
@ -1,29 +1,22 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
= render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner.compare
|
||||
#head
|
||||
%h1.title
|
||||
%h3.wiki
|
||||
- if @name
|
||||
= t("layout.wiki.history_for")
|
||||
= t("wiki.history_for")
|
||||
%strong= @page.name
|
||||
- else
|
||||
= t("layout.wiki.wiki_history")
|
||||
= t("wiki.wiki_history")
|
||||
|
||||
%ul.actions
|
||||
%br
|
||||
%br
|
||||
|
||||
.r
|
||||
- if can? :read, @project
|
||||
%li.minibutton= link_to t("layout.wiki.back_to_history"),
|
||||
@name ? history_project_wiki_path(@project, escaped_name) : history_project_wiki_index_path(@project)
|
||||
= render :partial => 'searchbar'
|
||||
= link_to t("wiki.back_to_history"), @name ? history_project_wiki_path(@project, escaped_name) : history_project_wiki_index_path(@project), :class => 'button width100'
|
||||
|
||||
#wiki-content
|
||||
= render :partial => "compare"
|
||||
#wiki-content= render "compare"
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,33 +1,27 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
= render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner
|
||||
#head
|
||||
%h1.title
|
||||
= t("layout.wiki.editing_page")
|
||||
%h3.wiki
|
||||
= t("wiki.editing_page")
|
||||
%strong= @page.name
|
||||
- if can? :read, @project
|
||||
.r= link_to t("wiki.view_page"), view_path(@project, escaped_name), :class => 'action-view-page button width100'
|
||||
.r= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'aciton-view-history button width100'
|
||||
|
||||
%ul.actions
|
||||
- if can? :read, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.view_page"), view_path(@project, escaped_name),
|
||||
:class => 'action-view-page'
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name),
|
||||
:class => 'aciton-view-history'
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
||||
#wiki-content
|
||||
= render :partial => "editor"
|
||||
#wiki-content= render "editor"
|
||||
|
||||
:javascript
|
||||
jQuery(document).ready(function() {
|
||||
$.GollumEditor();
|
||||
});
|
||||
|
||||
:css
|
||||
#gollum-editor { width: 100%; }
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
.desription-top
|
||||
.img= image_tag("code.png")
|
||||
= render "git_access"
|
||||
.both
|
||||
= render "git_access_message"
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner.compare
|
||||
#head
|
||||
%h1.title
|
||||
= t("layout.wiki.wiki_git_access")
|
||||
|
||||
#wiki-content
|
||||
= render :partial => "git_access"
|
||||
%br
|
||||
= render :partial => "git_access_message"
|
||||
.both
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
|
||||
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,38 +1,11 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner.history
|
||||
#head
|
||||
%h1.title
|
||||
- if @name
|
||||
= t("layout.wiki.history_for")
|
||||
%strong= @page.name
|
||||
- else
|
||||
= t("layout.wiki.wiki_history")
|
||||
|
||||
%ul.actions
|
||||
- if @name
|
||||
- if can? :read, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.view_page"), view_path(@project, escaped_name),
|
||||
:class => 'action-view-page'
|
||||
- if can? :write, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.edit_page"), edit_project_wiki_path(@project, escaped_name),
|
||||
:class => 'aciton-edit-page'
|
||||
- else
|
||||
- if can? :read, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.view_page"), project_wiki_index_path(@project)
|
||||
= render :partial => 'searchbar'
|
||||
|
||||
#wiki-content
|
||||
= render :partial => "history"
|
||||
.r= link_to t("wiki.compare_revisions"), "javascript:void(0);", :class => "action-compare-revision button width100"
|
||||
.both
|
||||
= render 'history'
|
||||
.both
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
= render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner
|
||||
#head
|
||||
%h1.title
|
||||
= t("layout.wiki.create_page")
|
||||
%h3.wiki
|
||||
= t("wiki.create_page")
|
||||
%strong= @name
|
||||
%br
|
||||
|
||||
#wiki-content
|
||||
= render :partial => "editor"
|
||||
#wiki-content= render "editor"
|
||||
|
||||
:javascript
|
||||
jQuery(document).ready(function() {
|
||||
$.GollumEditor({ NewFile: true });
|
||||
});
|
||||
|
||||
:css
|
||||
#gollum-editor { width: 100%; }
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,25 +1,11 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
.inner
|
||||
#wiki-wrapper.results
|
||||
#head
|
||||
- @st_ref = capture do
|
||||
%strong= @ref
|
||||
%h1.title= raw t("layout.wiki.all_pages_in")
|
||||
%ul.actions
|
||||
- if can? :read, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.home"), project_wiki_index_path(@project),
|
||||
:class => 'action-edit-page'
|
||||
= render :partial => 'searchbar'
|
||||
|
||||
= render :partial => "results"
|
||||
- if can? :write, @project
|
||||
.r= link_to t("wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project), :id => 'minibutton-new-page', :class => 'button width100'
|
||||
.both
|
||||
= render "results"
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,25 +1,15 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
.inner
|
||||
#wiki-wrapper.results
|
||||
#head
|
||||
- @st_query = capture do
|
||||
- @st_query = capture do
|
||||
%strong= @query
|
||||
%h1.title= raw t("layout.wiki.search_results_for", :query => @st_query)
|
||||
%ul.actions
|
||||
%h1.title= raw t("wiki.search_results_for", :query => @st_query)
|
||||
%ul.actions
|
||||
- if can? :read, @project
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.home"), project_wiki_index_path(@project),
|
||||
:class => 'action-edit-page'
|
||||
= render :partial => 'searchbar'
|
||||
%li.minibutton= link_to t("wiki.home"), project_wiki_index_path(@project), :class => 'action-edit-page'
|
||||
|
||||
= render :partial => "results"
|
||||
= render "results"
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
|
|
@ -1,30 +1,29 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
= render :partial => 'navigation'
|
||||
|
||||
.content
|
||||
.inner
|
||||
#wiki-wrapper.page
|
||||
#head
|
||||
%h1.title
|
||||
%h3.wiki
|
||||
= @page.name
|
||||
= "(#{t("layout.wiki.preview")})" if action_name == 'preview'
|
||||
- unless action_name == 'preview'
|
||||
%ul.actions
|
||||
- if can? :write, @project
|
||||
%li.minibutton.jaws
|
||||
= link_to t("layout.wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project),
|
||||
:id => 'minibutton-new-page'
|
||||
= "(#{t("wiki.preview")})" if action_name == 'preview'
|
||||
- unless action_name == 'preview'
|
||||
.r
|
||||
= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'button width100'
|
||||
.r
|
||||
- if @editable
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "action-edit-page"
|
||||
%li.minibutton= link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name)
|
||||
= render :partial => 'searchbar'
|
||||
= link_to t("wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "button width100"
|
||||
.r
|
||||
- if can? :write, @project
|
||||
= link_to t("wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project), :id => 'minibutton-new-page', :class => 'button width100'
|
||||
|
||||
= render :partial => "page"
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
.both
|
||||
/ = render 'searchbar'
|
||||
= render "page"
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
||||
- render 'sidebar'
|
||||
|
||||
:css
|
||||
#wiki-content .wrap { width: 100% }
|
||||
|
|
|
@ -10,6 +10,3 @@ while read oldrev newrev ref
|
|||
do
|
||||
newrev_type=$(git cat-file -t $newrev 2> /dev/null)
|
||||
oldrev_type=$(git cat-file -t "$oldrev" 2> /dev/null)
|
||||
|
||||
/bin/bash -l -c "cd /srv/rosa_build/current && bundle exec rails runner 'Project.delay.process_hook(\"$owner\", \"$reponame\", \"$newrev\", \"$oldrev\", \"$ref\", \"$newrev_type\", \"$oldrev_type\")'"
|
||||
done
|
|
@ -62,9 +62,11 @@ namespace :deploy do
|
|||
end
|
||||
end
|
||||
|
||||
after "deploy:update_code", "deploy:symlink_all", "deploy:migrate"
|
||||
after "deploy:restart","bluepill:stop", "delayed_job:restart", "deploy:cleanup", "bluepill:start"
|
||||
after "deploy:finalize_update", "deploy:symlink_all"
|
||||
after "deploy:update_code", "deploy:migrate"
|
||||
after "deploy:setup", "deploy:symlink_pids"
|
||||
after "deploy:restart", "bluepill:start" # "bluepill:processes:restart_dj" # "bluepill:restart"
|
||||
after "deploy:restart", "deploy:cleanup"
|
||||
|
||||
require 'cape'
|
||||
namespace :rake_tasks do
|
||||
|
|
|
@ -37,7 +37,7 @@ Rosa::Application.configure do
|
|||
|
||||
# Disable delivery errors, bad email addresses will be ignored
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.default_url_options = { :host => 'rosa-build.rosalab.ru' }
|
||||
config.action_mailer.default_url_options = { :host => 'abf.rosalinux.ru' }
|
||||
|
||||
# Enable threaded mode
|
||||
# config.threadsafe!
|
||||
|
@ -57,6 +57,9 @@ Rosa::Application.configure do
|
|||
|
||||
# Generate digests for assets URLs
|
||||
config.assets.digest = true
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||
config.assets.precompile += %w()
|
||||
end
|
||||
|
||||
# require 'stub_xml_rpc'
|
||||
|
|
|
@ -62,7 +62,7 @@ en:
|
|||
|
||||
downloads:
|
||||
title: Downloads statistic
|
||||
message: Automatically updated every 5 minutes
|
||||
message: Automatically updated every 24 hours
|
||||
refresh_btn: Refresh
|
||||
|
||||
auto_build_lists:
|
||||
|
@ -149,63 +149,6 @@ en:
|
|||
confirm_clone: To clone?
|
||||
clone: To clone
|
||||
|
||||
wiki:
|
||||
new_page: New Page
|
||||
edit_page: Edit Page
|
||||
delete_page: Delete this Page
|
||||
page_history: Page History
|
||||
create_page: Create page
|
||||
wiki_git_access: Git Access
|
||||
page_title: Page header
|
||||
expand_collapse: Expand
|
||||
last_edited_by: Last edited by
|
||||
home: Home
|
||||
pages: Pages
|
||||
wiki_history: Wiki History
|
||||
git_access: Git Access
|
||||
search_and_hellip: Search & Hellip
|
||||
search: Search
|
||||
search_popup: Search this Wiki
|
||||
commit_message_placeholder: Write a small message here explaining this change. (Optional)
|
||||
edit_commit_message: Edit commit message
|
||||
preview_title: Preview Page in new window
|
||||
save_changes: Save current changes
|
||||
save_button: Save Page
|
||||
view_page: View Page
|
||||
view_commit: View version
|
||||
compare_revisions: Compare versions
|
||||
back_to_top: Back to Top
|
||||
no_pages_in: No pages in %{ref}.
|
||||
no_results_for_search: Nothing found for %{query}.
|
||||
matches: matches
|
||||
back_to_history: Back to History
|
||||
history_for: History for
|
||||
editing_page: Editing
|
||||
create_page: Create Page
|
||||
revert_page: Revert Page
|
||||
revert_pages: Revert Pages
|
||||
all_pages_in: "All pages:"
|
||||
search_results_for: "Search results for %{query}:"
|
||||
preview: Preview
|
||||
|
||||
clones:
|
||||
http: HTTP
|
||||
|
||||
editor:
|
||||
bold: Bold
|
||||
italic: Italic
|
||||
code: Code
|
||||
unordered_list: Unordered list
|
||||
ordered_list: Ordered list
|
||||
blockquote: Blockquote
|
||||
horizontal_rule: Horizontal rule
|
||||
h1: First level header
|
||||
h2: Second level header
|
||||
h3: Third level header
|
||||
link: Link
|
||||
image: Image
|
||||
help: Help
|
||||
|
||||
event_logs:
|
||||
list: List
|
||||
list_header: Event log
|
||||
|
@ -446,7 +389,7 @@ en:
|
|||
list_header: Event log
|
||||
|
||||
repositories:
|
||||
empty: Empty repository
|
||||
empty: "Repository is empty. You need to wait some time if you have forked project or imported package"
|
||||
source: Source
|
||||
commits: Commits
|
||||
commit_diff_too_big: Sorry, commit too big!
|
||||
|
@ -455,6 +398,8 @@ en:
|
|||
project_versions: Versions
|
||||
|
||||
product_build_lists:
|
||||
delete: Delete
|
||||
action: Action
|
||||
statuses:
|
||||
'0': 'build'
|
||||
'1': 'build error'
|
||||
|
@ -593,6 +538,7 @@ en:
|
|||
save_error: Product saves error
|
||||
build_started: Product build started
|
||||
destroyed: Product deleted
|
||||
build_list_delete: Product build list deleted
|
||||
|
||||
platform:
|
||||
saved: Platform saved
|
||||
|
@ -824,6 +770,7 @@ en:
|
|||
product_build_list:
|
||||
id: Id
|
||||
product: Product
|
||||
container_path: Container
|
||||
status: Status
|
||||
notified_at: Notified at
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ ru:
|
|||
|
||||
downloads:
|
||||
title: Статистика закачек пакетов
|
||||
message: Обновляется автоматически каждые 5 минут
|
||||
message: Обновляется автоматически каждые 24 часа
|
||||
refresh_btn: Обновить
|
||||
|
||||
auto_build_lists:
|
||||
|
@ -149,63 +149,6 @@ ru:
|
|||
confirm_clone: Клонировать?
|
||||
clone: Клонировать
|
||||
|
||||
wiki:
|
||||
new_page: Новая
|
||||
edit_page: Изменить
|
||||
delete_page: Удалить страницу
|
||||
page_history: История
|
||||
create_page: Создать страницу
|
||||
wiki_git_access: Доступ к Wiki через Git
|
||||
page_title: Заголовок страницы
|
||||
expand_collapse: Развернуть
|
||||
last_edited_by: Последним редактировал
|
||||
home: Главная
|
||||
pages: Все страницы
|
||||
wiki_history: История Wiki
|
||||
git_access: Доступ через Git
|
||||
search_and_hellip: Ключевые слова
|
||||
search: Искать
|
||||
search_popup: Искать в этой Wiki
|
||||
commit_message_placeholder: Введите сопровождающее сообщение (опционально)
|
||||
edit_commit_message: Редактировать сопровождающее сообщение
|
||||
preview_title: Посмотреть в новом окне
|
||||
save_changes: Сохранить текущие изменения
|
||||
save_button: Сохранить
|
||||
view_page: Показать
|
||||
view_commit: Показать версию
|
||||
compare_revisions: Сравнить версии
|
||||
back_to_top: Наверх
|
||||
no_pages_in: В %{ref} нет страниц для отображения.
|
||||
no_results_for_search: По запросу %{query} ничего не найдено.
|
||||
matches: Совпадений
|
||||
back_to_history: Назад к истории
|
||||
history_for: История для
|
||||
editing_page: Редактирование страницы
|
||||
create_page: Создать страницу
|
||||
revert_page: Откатить изменения
|
||||
revert_pages: Откатить изменения
|
||||
all_pages_in: "Все страницы:"
|
||||
search_results_for: "Результаты поиска для %{query}:"
|
||||
preview: Предпросмотр
|
||||
|
||||
clones:
|
||||
http: HTTP
|
||||
|
||||
editor:
|
||||
bold: Жирный
|
||||
italic: Курсив
|
||||
code: Исходный код
|
||||
unordered_list: Маркированный список
|
||||
ordered_list: Нумерованный список
|
||||
blockquote: Цитата
|
||||
horizontal_rule: Горизонтальная черта
|
||||
h1: Заголовок первого уровня
|
||||
h2: Заголовок второго уровня
|
||||
h3: Заголовок третьего уровня
|
||||
link: Ссылка
|
||||
image: Изображение
|
||||
help: Помощь
|
||||
|
||||
event_logs:
|
||||
list: Список
|
||||
list_header: Лог событий
|
||||
|
@ -330,7 +273,7 @@ ru:
|
|||
|
||||
git:
|
||||
repositories:
|
||||
empty: Пустой репозиторий
|
||||
empty: "Репозиторий пуст. Если вы клонировали(Fork) проект или импортировали пакет, данные скоро появятся"
|
||||
source: Source
|
||||
commits: Commits
|
||||
commit_diff_too_big: Извините, коммит слишком большой!
|
||||
|
@ -339,6 +282,8 @@ ru:
|
|||
project_versions: Версии
|
||||
|
||||
product_build_lists:
|
||||
delete: Удалить
|
||||
action: Действие
|
||||
statuses:
|
||||
'0': 'собран'
|
||||
'1': 'ошибка сборки'
|
||||
|
@ -482,6 +427,7 @@ ru:
|
|||
save_error: Не удалось сохранить изменения
|
||||
build_started: Запущена сборка продукта
|
||||
destroyed: Продукт удален
|
||||
build_list_delete: Сборочный лист продукта удален
|
||||
|
||||
platform:
|
||||
saved: Платформа успешно добавлена
|
||||
|
@ -703,6 +649,7 @@ ru:
|
|||
product_build_list:
|
||||
id: Id
|
||||
product: Продукт
|
||||
container_path: Контейнер
|
||||
status: Статус
|
||||
notified_at: Информация получена
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
en:
|
||||
wiki:
|
||||
new_page: New Page
|
||||
edit_page: Edit Page
|
||||
delete_page: Delete this Page
|
||||
page_history: Page History
|
||||
create_page: Create page
|
||||
wiki_git_access: Git Access
|
||||
page_title: Page header
|
||||
expand_collapse: Expand
|
||||
last_edited_by: Last edited by
|
||||
home: Home
|
||||
pages: Pages
|
||||
wiki_history: Wiki History
|
||||
git_access: Git Access
|
||||
search_and_hellip: Search & Hellip
|
||||
search: Search
|
||||
search_popup: Search this Wiki
|
||||
commit_message_placeholder: Write a small message here explaining this change. (Optional)
|
||||
edit_commit_message: Edit commit message
|
||||
preview_title: Preview Page in new window
|
||||
save_changes: Save current changes
|
||||
save_button: Save Page
|
||||
view_page: View Page
|
||||
view_commit: View version
|
||||
compare_revisions: Compare versions
|
||||
back_to_top: Back to Top
|
||||
no_pages_in: No pages in %{ref}.
|
||||
no_results_for_search: Nothing found for %{query}.
|
||||
matches: matches
|
||||
back_to_history: Back to History
|
||||
history_for: History for
|
||||
editing_page: Editing
|
||||
create_page: Create Page
|
||||
revert_page: Revert Page
|
||||
revert_pages: Revert Pages
|
||||
all_pages_in: "All pages:"
|
||||
search_results_for: "Search results for %{query}:"
|
||||
preview: Preview
|
||||
footer: Footer
|
||||
sidebar: Sidebar
|
||||
|
||||
clones:
|
||||
http: HTTP
|
||||
|
||||
editor:
|
||||
bold: Bold
|
||||
italic: Italic
|
||||
code: Code
|
||||
unordered_list: Unordered list
|
||||
ordered_list: Ordered list
|
||||
blockquote: Blockquote
|
||||
horizontal_rule: Horizontal rule
|
||||
h1: First level header
|
||||
h2: Second level header
|
||||
h3: Third level header
|
||||
link: Link
|
||||
image: Image
|
||||
help: Help
|
||||
|
||||
seed:
|
||||
welcome_content: |
|
||||
# Welcome to **Wiki** #
|
||||
|
||||
Edit this page and create new ones.
|
|
@ -0,0 +1,65 @@
|
|||
ru:
|
||||
wiki:
|
||||
new_page: Новая
|
||||
edit_page: Изменить
|
||||
delete_page: Удалить страницу
|
||||
page_history: История
|
||||
create_page: Создать страницу
|
||||
wiki_git_access: Доступ к Wiki через Git
|
||||
page_title: Заголовок страницы
|
||||
expand_collapse: Развернуть
|
||||
last_edited_by: Последним редактировал
|
||||
home: Главная
|
||||
pages: Все страницы
|
||||
wiki_history: История Wiki
|
||||
git_access: Доступ через Git
|
||||
search_and_hellip: Ключевые слова
|
||||
search: Искать
|
||||
search_popup: Искать в этой Wiki
|
||||
commit_message_placeholder: Введите сопровождающее сообщение (опционально)
|
||||
edit_commit_message: Редактировать сопровождающее сообщение
|
||||
preview_title: Посмотреть в новом окне
|
||||
save_changes: Сохранить текущие изменения
|
||||
save_button: Сохранить
|
||||
view_page: Показать
|
||||
view_commit: Показать версию
|
||||
compare_revisions: Сравнить версии
|
||||
back_to_top: Наверх
|
||||
no_pages_in: В %{ref} нет страниц для отображения.
|
||||
no_results_for_search: По запросу %{query} ничего не найдено.
|
||||
matches: Совпадений
|
||||
back_to_history: Назад к истории
|
||||
history_for: История для
|
||||
editing_page: Редактирование страницы
|
||||
create_page: Создать страницу
|
||||
revert_page: Откатить изменения
|
||||
revert_pages: Откатить изменения
|
||||
all_pages_in: "Все страницы:"
|
||||
search_results_for: "Результаты поиска для %{query}:"
|
||||
preview: Предпросмотр
|
||||
footer: Подвал
|
||||
sidebar: Сайдбар
|
||||
|
||||
clones:
|
||||
http: HTTP
|
||||
|
||||
editor:
|
||||
bold: Жирный
|
||||
italic: Курсив
|
||||
code: Исходный код
|
||||
unordered_list: Маркированный список
|
||||
ordered_list: Нумерованный список
|
||||
blockquote: Цитата
|
||||
horizontal_rule: Горизонтальная черта
|
||||
h1: Заголовок первого уровня
|
||||
h2: Заголовок второго уровня
|
||||
h3: Заголовок третьего уровня
|
||||
link: Ссылка
|
||||
image: Изображение
|
||||
help: Помощь
|
||||
|
||||
seed:
|
||||
welcome_content: |
|
||||
# Добро пожаловать в **Wiki** #
|
||||
|
||||
Отредактируйте эту страницу и создайте новые.
|
|
@ -1,7 +0,0 @@
|
|||
en:
|
||||
wiki:
|
||||
seed:
|
||||
welcome_content: |
|
||||
# Welcome to **Wiki** #
|
||||
|
||||
Edit this page and create new ones.
|
|
@ -1,7 +0,0 @@
|
|||
ru:
|
||||
wiki:
|
||||
seed:
|
||||
welcome_content: |
|
||||
# Добро пожаловать в **Wiki** #
|
||||
|
||||
Отредактируйте эту страницу и создайте новые.
|
|
@ -11,6 +11,7 @@ Bluepill.application(app_name) do |app|
|
|||
|
||||
process.start_command = "/usr/bin/env RAILS_ENV=production script/delayed_job start"
|
||||
process.stop_command = "/usr/bin/env RAILS_ENV=production script/delayed_job stop"
|
||||
process.restart_command = "/usr/bin/env RAILS_ENV=production script/delayed_job restart"
|
||||
process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'delayed_job.pid')
|
||||
end
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ Rosa::Application.routes.draw do
|
|||
post 'freeze'
|
||||
post 'unfreeze'
|
||||
get 'clone'
|
||||
post 'clone'
|
||||
post 'make_clone'
|
||||
post 'build_all'
|
||||
end
|
||||
|
||||
|
@ -86,7 +86,7 @@ Rosa::Application.routes.draw do
|
|||
# get :clone
|
||||
# get :build
|
||||
# end
|
||||
resources :product_build_lists, :only => [:create]
|
||||
resources :product_build_lists, :only => [:create, :destroy]
|
||||
end
|
||||
|
||||
resources :repositories
|
||||
|
@ -101,7 +101,8 @@ Rosa::Application.routes.draw do
|
|||
match '_access' => 'wiki#git', :as => :git, :via => :get
|
||||
match '_revert/:sha1/:sha2' => 'wiki#revert_wiki', :as => :revert, :via => [:get, :post]
|
||||
match '_compare' => 'wiki#compare_wiki', :as => :compare, :via => :post
|
||||
match '_compare/*versions' => 'wiki#compare_wiki', :as => :compare_versions, :via => :get
|
||||
#match '_compare/:versions' => 'wiki#compare_wiki', :versions => /.*/, :as => :compare_versions, :via => :get
|
||||
match '_compare/:versions' => 'wiki#compare_wiki', :versions => /([a-f0-9\^]{6,40})(\.\.\.[a-f0-9\^]{6,40})/, :as => :compare_versions, :via => :get
|
||||
post :preview
|
||||
get :search
|
||||
get :pages
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# runner "Download.parse_and_remove_nginx_log"
|
||||
#end
|
||||
|
||||
every 5.minutes do
|
||||
every 1.day, :at => '5:00' do
|
||||
#rake "sudo_test:projects"
|
||||
runner "Download.rotate_nginx_log"
|
||||
runner "Download.parse_and_remove_nginx_log"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue