[refs #195] Merge 3.2-master into 195-new_design_for_projects
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.1 KiB |
|
@ -27,15 +27,17 @@ a img { border: none; }
|
|||
.wrap {
|
||||
width: 940px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #3f668c;
|
||||
-webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
// text-align: center;
|
||||
// border: 1px solid #3f668c;
|
||||
// -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
// -moz-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
// box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.5);
|
||||
background: #FFF;
|
||||
min-height: 92%;
|
||||
}
|
||||
|
||||
.hui {text-align: center;}
|
||||
|
||||
.wrap.columns {
|
||||
background: #FFF image-url("page-bg.png") repeat-y;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,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)
|
||||
if @cloned.persisted?
|
||||
flash[:notice] = I18n.t("flash.platform.clone_success")
|
||||
redirect_to @cloned
|
||||
else
|
||||
flash[:error] = @cloned.errors.full_messages.join('. ')
|
||||
end
|
||||
@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
|
||||
@cloned = Platform.new
|
||||
@cloned.name = @platform.name + "_clone"
|
||||
@cloned.description = @platform.description + "_clone"
|
||||
flash[:error] = @cloned.errors.full_messages.join('. ')
|
||||
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]
|
||||
|
@ -20,6 +20,12 @@ class ProductBuildListsController < ApplicationController
|
|||
@product_build_list.save!
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
def destroy
|
||||
@product_build_list.destroy
|
||||
flash[:notice] = t('flash.product.build_list_delete')
|
||||
redirect_to [@platform, @product]
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
|
|
@ -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))
|
||||
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
|
||||
end
|
||||
redirect_to compare_versions_project_wiki_index_path(@project, versions_string)
|
||||
elsif request.get?
|
||||
@versions = params[:versions].split(/\.{2,3}/)
|
||||
if @versions.size < 2
|
||||
redirect_to history_project_wiki_index_path(@project)
|
||||
return
|
||||
@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
|
||||
@diffs = @wiki.repo.diff(@versions.first, @versions.last)
|
||||
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,23 +66,23 @@ 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
|
||||
|
||||
can [:read, :create], PrivateUser, :platform => {:owner_type => 'User', :owner_id => user.id}
|
||||
|
|
|
@ -4,7 +4,7 @@ class Category < ActiveRecord::Base
|
|||
|
||||
validates :name, :presence => true
|
||||
|
||||
scope :default_order, order('categories.name')
|
||||
default_scope order('categories.name')
|
||||
|
||||
has_ancestry
|
||||
end
|
||||
|
|
|
@ -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_]+$/ }
|
||||
|
@ -27,15 +27,16 @@ class Group < ActiveRecord::Base
|
|||
after_create :add_owner_to_members
|
||||
|
||||
include Modules::Models::PersonalRepository
|
||||
# include Modules::Models::Owner
|
||||
# include Modules::Models::Owner
|
||||
|
||||
def self.can_own_project(user)
|
||||
(by_owner(user) | by_admin(user)).collect { |el| [el.name, el.id] }
|
||||
end
|
||||
|
||||
protected
|
||||
def add_owner_to_members
|
||||
Relation.create_with_role(self.owner, self, 'admin')
|
||||
# members << self.owner if !members.exists?(:id => self.owner.id)
|
||||
end
|
||||
|
||||
def add_owner_to_members
|
||||
Relation.create_with_role(self.owner, self, 'admin')
|
||||
# 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
|
||||
|
|
|
@ -18,7 +18,7 @@ class Project < ActiveRecord::Base
|
|||
has_many :collaborators, :through => :relations, :source => :object, :source_type => 'User'
|
||||
has_many :groups, :through => :relations, :source => :object, :source_type => 'Group'
|
||||
|
||||
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?}
|
||||
|
@ -61,14 +61,13 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def build_for(platform, user)
|
||||
def build_for(platform, user)
|
||||
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
|
||||
|
@ -252,9 +251,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,7 +22,8 @@ class Relation < ActiveRecord::Base
|
|||
end
|
||||
|
||||
protected
|
||||
def add_default_role
|
||||
self.role = ROLES.first if role.nil? || role.empty?
|
||||
end
|
||||
|
||||
def add_default_role
|
||||
self.role = ROLES.first if role.nil? || role.empty?
|
||||
end
|
||||
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)
|
||||
|
@ -43,31 +45,21 @@ class Repository < ActiveRecord::Base
|
|||
|
||||
protected
|
||||
|
||||
def xml_rpc_create
|
||||
result = BuildServer.create_repo name, platform.name
|
||||
if result == BuildServer::SUCCESS
|
||||
return true
|
||||
else
|
||||
raise "Failed to create repository #{name} inside platform #{platform.name} with code #{result}."
|
||||
end
|
||||
def xml_rpc_create
|
||||
result = BuildServer.create_repo name, platform.name
|
||||
if result == BuildServer::SUCCESS
|
||||
return true
|
||||
else
|
||||
raise "Failed to create repository #{name} inside platform #{platform.name} with code #{result}."
|
||||
end
|
||||
end
|
||||
|
||||
def xml_rpc_destroy
|
||||
result = BuildServer.delete_repo name, platform.name
|
||||
if result == BuildServer::SUCCESS
|
||||
return true
|
||||
else
|
||||
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
|
||||
def xml_rpc_destroy
|
||||
result = BuildServer.delete_repo name, platform.name
|
||||
if result == BuildServer::SUCCESS
|
||||
return true
|
||||
else
|
||||
raise "Failed to delete repository #{name} inside platform #{platform.name} with code #{result}."
|
||||
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"
|
||||
|
|
|
@ -19,16 +19,22 @@
|
|||
= 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
|
||||
$(function() {
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {lineNumbers: true, mode: '#{@blob.mime_type}', theme: 'eclipse'});
|
||||
});
|
||||
|
||||
/ - content_for :javascripts do
|
||||
/ = javascript_include_tag 'gollum/gollum.placeholder.js', 'blob.editor.js'
|
||||
/
|
||||
/ - content_for :stylesheets do
|
||||
/ = stylesheet_link_tag 'gollum/editor.css'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
= javascript_include_tag "autocomplete-rails.js"
|
||||
|
||||
.group
|
||||
= f.label :title, :class => :label
|
||||
= f.text_field :title, :class => 'text_field'
|
||||
|
@ -20,7 +18,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"), project_path(@project), :class => "text_button_padding link_button"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
|
||||
|
||||
.wat-cf
|
||||
-#= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_path(@platform), :class => "button"
|
||||
= link_to image_tag("web-app-theme/icons/cross.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
|
||||
-#= 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
|
||||
|
|
|
@ -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.status")
|
||||
%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
|
||||
|
|
|
@ -74,13 +74,18 @@
|
|||
.rightlist
|
||||
= f.file_field :srpm, :class => 'file_field'
|
||||
.both
|
||||
.leftlist
|
||||
\
|
||||
.rightlist
|
||||
-#%a.button{:href => "#"} Сохранить
|
||||
= submit_tag t("layout.save"), :class => 'button'
|
||||
.both
|
||||
|
||||
-#.leftlist
|
||||
-# \
|
||||
-#.rightlist
|
||||
-# -#%a.button{:href => "#"} Сохранить
|
||||
-# = submit_tag t("layout.save"), :class => 'button'
|
||||
-#.both
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= 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"
|
||||
|
||||
-#.group
|
||||
-# = f.label :category_id, t("activerecord.attributes.project.category_id"), :class => :label
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
- if @project.is_rpm
|
||||
%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' : ''}
|
||||
|
|
|
@ -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,14 +1,14 @@
|
|||
%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 }"
|
||||
|
||||
|
||||
%p== Support team «ROSA Build System»
|
||||
%p== Support team «ROSA Build System»
|
||||
|
|
|
@ -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
|
||||
= revert_button if can? :write, @project
|
||||
- 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
|
||||
= revert_button if can? :write, @project
|
||||
%li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
|
||||
%br
|
||||
%br
|
||||
|
||||
- if action_name != 'revert'
|
||||
= revert_button if can? :write, @project
|
||||
|
||||
%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"
|
||||
|
@ -61,5 +58,4 @@
|
|||
%li= link_to "help_8", "javascript:void(0);"
|
||||
#gollum-editor-help-wrapper
|
||||
#gollum-editor-help-content
|
||||
%p
|
||||
|
||||
%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
|
||||
%table.wiki{:cellpadding => "0", :cellspacing => "0"}
|
||||
- @versions.each do |v|
|
||||
%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.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
|
||||
.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("wiki.view_commit")}]"
|
||||
- else
|
||||
= "[#{v.id[0..6]}]"
|
||||
|
||||
= form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
|
||||
%fieldset
|
||||
%table
|
||||
%tbody
|
||||
- @versions.each do |v|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td.checkbox
|
||||
= check_box_tag "versions[]", v.id
|
||||
%td.author
|
||||
- user = User.where(:email => v.author.email).first
|
||||
= 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"}
|
||||
%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}:"
|
||||
|
||||
= 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")}]"
|
||||
- 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)
|
||||
%li{:class => (act == :pages) ? 'active' : ''}
|
||||
= link_to t("layout.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)
|
||||
%li{:class => (act == :git) ? 'active' : ''}
|
||||
= link_to t("layout.wiki.git_access"), git_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("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)
|
|
@ -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")
|
|
@ -21,4 +21,4 @@
|
|||
%b
|
||||
= t("activerecord.attributes.project.owner")
|
||||
\:
|
||||
= link_to @project.owner.try(:name), url_for(@project.owner)
|
||||
= link_to @project.owner.try(:name), url_for(@project.owner)
|
|
@ -1,22 +1,21 @@
|
|||
#results
|
||||
- if @results and !@results.empty?
|
||||
%ul
|
||||
- @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")})"
|
||||
-else
|
||||
= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
|
||||
- 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)
|
||||
- else
|
||||
= raw t("layout.wiki.no_pages_in", :ref => @st_ref)
|
||||
%p
|
||||
- if @results.present?
|
||||
- @results.each do |result|
|
||||
- if action_name == 'search'
|
||||
= link_to result[:name], project_wiki_path(@project, CGI.escape(result[:name]))
|
||||
%span.count= "(#{result.count} #{t("wiki.matches")})"
|
||||
-else
|
||||
= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
|
||||
%br
|
||||
- else
|
||||
%p#no-results
|
||||
- @st_ref = capture do
|
||||
%strong= @ref || @query
|
||||
- if action_name == 'search'
|
||||
= raw t("wiki.no_results_for_search", :query => @st_ref)
|
||||
- else
|
||||
= 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'
|
||||
%h3.wiki
|
||||
- if @name
|
||||
= t("wiki.history_for")
|
||||
%strong= @page.name
|
||||
- else
|
||||
= t("wiki.wiki_history")
|
||||
|
||||
.content
|
||||
#wiki-wrapper.inner.compare
|
||||
#head
|
||||
%h1.title
|
||||
- if @name
|
||||
= t("layout.wiki.history_for")
|
||||
%strong= @page.name
|
||||
- else
|
||||
= t("layout.wiki.wiki_history")
|
||||
%br
|
||||
%br
|
||||
|
||||
%ul.actions
|
||||
- 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'
|
||||
.r
|
||||
- if can? :read, @project
|
||||
= 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'
|
||||
|
|