Merge branch 'master' into 128-account-activation
This commit is contained in:
commit
8b31c6373f
2
Gemfile
2
Gemfile
|
@ -21,7 +21,7 @@ gem 'rails-xmlrpc', '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.
|
|||
|
||||
# gem 'rugged', '~> 0.16.0'
|
||||
gem 'grack', :git => 'git://github.com/rdblue/grack.git', :require => 'git_http'
|
||||
gem "grit", :git => 'git://github.com/chipiga/grit.git'
|
||||
gem "grit", :git => 'git://github.com/chipiga/grit.git' #, :path => '~/Sites/code/grit'
|
||||
gem 'charlock_holmes', '~> 0.6.8' #, :git => 'git://github.com/brianmario/charlock_holmes.git', :branch => 'bundle-icu'
|
||||
|
||||
# Wiki
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 63 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
|
@ -24,3 +24,15 @@ function deleteAdminMember() {
|
|||
$('form#members_form').attr('action', delete_url);
|
||||
$('form#members_form').submit();
|
||||
}
|
||||
|
||||
function saveAdminGroup() {
|
||||
$('#groups_method').attr('value', 'post');
|
||||
$('form#groups_form').submit();
|
||||
}
|
||||
|
||||
function deleteAdminGroup() {
|
||||
$('#groups_method').attr('value', 'delete');
|
||||
var delete_url = $('form#groups_form').attr('delete_url');
|
||||
$('form#groups_form').attr('action', delete_url);
|
||||
$('form#groups_form').submit();
|
||||
}
|
||||
|
|
|
@ -621,3 +621,32 @@ div.right.bigpadding div.command_select div.rightlist textarea {
|
|||
div.rightlist textarea.resizable {
|
||||
resize: both;
|
||||
}
|
||||
|
||||
table.tablesorter.list-users th.th1 {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
table.tablesorter.list-users th.th2 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
table.tablesorter.list-users th.th3 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
table.tablesorter.list-users th.th4 {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
div.admin-role {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
article a.right_floated {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* TODO think, how to do it more beautiful */
|
||||
ul.ui-autocomplete {
|
||||
z-index: 999 !important;
|
||||
}
|
||||
|
|
|
@ -404,6 +404,10 @@ article h4 {
|
|||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
article h4.nomargin {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
article p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -651,8 +655,10 @@ a.button.width81 {
|
|||
width: 79px;
|
||||
padding: 4px 0px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Footer */
|
||||
|
||||
footer {
|
||||
|
@ -1498,7 +1504,7 @@ table.tablesorter.project div.pic {
|
|||
}
|
||||
|
||||
a.files-see {
|
||||
color: #565657;
|
||||
color: #292929;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
@ -1683,31 +1689,31 @@ table.tablesorter.tracker td.td0{
|
|||
}
|
||||
|
||||
table.tablesorter.tracker td.td3{
|
||||
width: 120px;
|
||||
min-width: 110px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
table.tablesorter.tracker td.td3 div.code {
|
||||
height: 19px;
|
||||
height: 23px;
|
||||
width: 15px;
|
||||
background: #FFF;
|
||||
color: #009fe3;
|
||||
border: 1px solid #83d1f2;
|
||||
font-size: 16px;
|
||||
padding: 1px 0px 0px 5px;
|
||||
padding: 5px 0px 0px 5px;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table.tablesorter.tracker td.td3 div.avatar {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-right: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table.tablesorter.tracker td.td3 div.answers {
|
||||
height: 20px;
|
||||
height: 28px;
|
||||
background: #FFF;
|
||||
color: #009fe3;
|
||||
border: 1px solid #83d1f2;
|
||||
|
@ -1719,11 +1725,12 @@ table.tablesorter.tracker td.td3 div.answers {
|
|||
table.tablesorter.tracker td.td3 div.answers div.pic {
|
||||
float: left;
|
||||
margin: 2px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
table.tablesorter.tracker td.td3 div.answers div.count {
|
||||
float: left;
|
||||
margin: 0px 5px 0px 2px;
|
||||
margin: 4px 5px 0px 2px;
|
||||
}
|
||||
|
||||
table.tablesorter.tracker div.smalltext {
|
||||
|
@ -1739,9 +1746,14 @@ div.label.selected.tracker {
|
|||
clear: both;
|
||||
cursor: default;
|
||||
margin-left: 0px;
|
||||
padding: 5px;
|
||||
float: right;
|
||||
margin-top: -6px;
|
||||
padding: 0px 0px 0px 2px;
|
||||
float: left;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
div.right div.left.nomargin {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.label.selected.tracker:hover {
|
||||
|
@ -1949,14 +1961,6 @@ table tbody tr.success td {
|
|||
background: #e3edb7;
|
||||
}
|
||||
|
||||
table.tablesorter.width565 {
|
||||
width: 565px;
|
||||
}
|
||||
|
||||
table.tablesorter thead th {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/* Create group */
|
||||
|
||||
div.right-error {
|
||||
|
@ -2157,7 +2161,7 @@ div.pagination a {
|
|||
/*404*/
|
||||
|
||||
article div.all.error404 {
|
||||
background: image-url("404.png") no-repeat 59% 0;
|
||||
background: image-url("404.png") no-repeat 49% 0;
|
||||
height: 500px;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -2199,6 +2203,98 @@ article div.all.error404 p.search {
|
|||
width: 230px;
|
||||
}
|
||||
|
||||
/*500*/
|
||||
|
||||
article div.all.error500 {
|
||||
background: image-url("500.png") no-repeat 49% 0;
|
||||
height: 500px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article div.all.error500 h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 135px;
|
||||
font-size: 48px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
article div.all.error500 h1 span {
|
||||
color: #4496d0;
|
||||
}
|
||||
|
||||
article div.all.error500 h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 5px;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
margin-left: 298px;
|
||||
}
|
||||
|
||||
article div.all.error500 p {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
article div.all.error500 p.pages {
|
||||
margin-top: 55px;
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
article div.all.error500 p.search {
|
||||
margin-top: 80px;
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
/*503*/
|
||||
|
||||
article div.all.error503 {
|
||||
background: image-url("503.png") no-repeat 50% 0;
|
||||
height: 500px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article div.all.error503 h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 395px;
|
||||
font-size: 38px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
article div.all.error503 h1 span {
|
||||
color: #4496d0;
|
||||
}
|
||||
|
||||
article div.all.error503 h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 25px;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
margin-left: 215px;
|
||||
}
|
||||
|
||||
article div.all.error503 {
|
||||
min-height: 630px;
|
||||
}
|
||||
|
||||
article div.all.error503 h2 span {
|
||||
color: #4496d0;
|
||||
}
|
||||
|
||||
div.wrap.tmargin30 {
|
||||
margin-top: 30px;
|
||||
min-height: 91%;
|
||||
}
|
||||
|
||||
/*search*/
|
||||
|
||||
input.button.width100 {
|
||||
|
@ -2237,8 +2333,81 @@ div.tmargin10 {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.tmargin10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
a.lmargin7 {
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
a.lmargin5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/*My projects*/
|
||||
|
||||
table.tablesorter tr.search td {
|
||||
background: #dcecfa;
|
||||
}
|
||||
|
||||
table.tablesorter tr.search td input[type="text"] {
|
||||
height: 16px;
|
||||
width: 830px;
|
||||
border: 1px solid #cdcdcd;
|
||||
border-radius: 4px;
|
||||
padding: 5px;
|
||||
font-family: Tahoma, Geneva, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
||||
table.tablesorter.width565 {
|
||||
width: 565px;
|
||||
}
|
||||
|
||||
article h3 a {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/*Wiki*/
|
||||
|
||||
div#wiki-content div.wrap {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border: none;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background: #FFF;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div#wiki-content div#wiki-body {
|
||||
float: left;
|
||||
width: 410px;
|
||||
margin: 0px 0px 20px;
|
||||
}
|
||||
|
||||
div#wiki-content div#wiki-rightbar {
|
||||
float: right;
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
div#wiki-content div#wiki-footer {
|
||||
clear: both;
|
||||
margin: 20px 0px;
|
||||
}
|
||||
|
||||
div#wiki-content div#wiki-rightbar, div#wiki-content div#wiki-footer {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #DDDDDD;
|
||||
border-radius: 3px;
|
||||
line-height: 1.5em;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
div#gollum-footer {
|
||||
color: #727272;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class ActivityFeedsController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class Admin::UsersController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
@filter = params[:filter] || 'all'
|
||||
end
|
||||
|
||||
def new
|
||||
end
|
||||
|
||||
def create
|
||||
@user.role = params[:role]
|
||||
if @user.save
|
||||
flash[:notice] = t('flash.user.saved')
|
||||
redirect_to users_path
|
||||
else
|
||||
flash[:error] = t('flash.user.save_error')
|
||||
flash[:warning] = @user.errors.full_messages.join('. ')
|
||||
render :action => :new
|
||||
end
|
||||
end
|
||||
|
||||
def profile
|
||||
end
|
||||
|
||||
def update
|
||||
@user.role = params[:role]
|
||||
if @user.update_without_password(params[:user])
|
||||
if @user.avatar && params[:delete_avatar] == '1'
|
||||
@user.avatar = nil
|
||||
@user.save
|
||||
end
|
||||
flash[:notice] = t('flash.user.saved')
|
||||
redirect_to users_path#edit_user_path(@user)
|
||||
else
|
||||
flash[:error] = t('flash.user.save_error')
|
||||
flash[:warning] = @user.errors.full_messages.join('. ')
|
||||
render(:action => :profile)
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@user.destroy
|
||||
flash[:notice] = t("flash.user.destroyed")
|
||||
redirect_to users_path
|
||||
end
|
||||
|
||||
def list
|
||||
colName = ['users.name', 'users.uname', 'users.email']
|
||||
sort_col = params[:iSortCol_0] || 0
|
||||
sort_dir = params[:sSortDir_0]=="asc" ? 'asc' : 'desc'
|
||||
order = "#{colName[sort_col.to_i]} #{sort_dir}"
|
||||
|
||||
@users = @users.paginate(:page => (params[:iDisplayStart].to_i/params[:iDisplayLength].to_i).to_i + 1, :per_page => params[:iDisplayLength])
|
||||
@total_users = @users.count
|
||||
if !params[:sSearch].blank? && search = "%#{params[:sSearch]}%"
|
||||
@users = @users.where('users.name ILIKE ? or users.uname ILIKE ? or users.email ILIKE ?', search, search, search)
|
||||
end
|
||||
@filter = params[:filter] || 'all'
|
||||
@users = @users.send(@filter) if ['real', 'admin', 'banned'].include? @filter
|
||||
@total_user = @users.count
|
||||
@users = @users.order(order)
|
||||
|
||||
render :partial =>'users_ajax', :layout => false
|
||||
end
|
||||
end
|
|
@ -12,7 +12,7 @@ class ApplicationController < ActionController::Base
|
|||
helper_method :get_owner
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
redirect_to forbidden_url, :alert => t('flash.exception_message')#:alert => exception.message
|
||||
redirect_to forbidden_url, :alert => t("flash.exception_message")
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
@ -45,6 +45,7 @@ class BuildListsController < ApplicationController
|
|||
@build_list.commit_hash = @project.git_repository.commits(@build_list.project_version.match(/^latest_(.+)/).to_a.last || @build_list.project_version).first.id if @build_list.project_version
|
||||
@build_list.bpl = bpl; @build_list.arch = arch; @build_list.user = current_user
|
||||
@build_list.include_repos = @build_list.include_repos.select { |ir| @build_list.bpl.repository_ids.include? ir.to_i }
|
||||
@build_list.priority = 100 # User builds more priority than mass rebuild with zero priority
|
||||
flash_options = {:project_version => @build_list.project_version, :arch => arch.name, :bpl => bpl.name, :pl => @build_list.pl}
|
||||
if @build_list.save
|
||||
notices << t("flash.build_list.saved", flash_options)
|
||||
|
@ -60,7 +61,7 @@ class BuildListsController < ApplicationController
|
|||
render :action => :new
|
||||
else
|
||||
flash[:notice] = notices.join('<br>').html_safe
|
||||
redirect_to @project
|
||||
redirect_to project_build_lists_path(@project)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class CollaboratorsController < ApplicationController
|
|||
relation.update_attribute(:role, role)
|
||||
else
|
||||
relation = @project.relations.build(:object_id => user_id, :object_type => 'User', :role => role)
|
||||
relation.save!
|
||||
relation.save
|
||||
end
|
||||
} if params['user']
|
||||
|
||||
|
@ -47,7 +47,7 @@ class CollaboratorsController < ApplicationController
|
|||
relation.update_attribute(:role, role)
|
||||
else
|
||||
relation = @project.relations.build(:object_id => user_id, :object_type => 'Group', :role => role)
|
||||
relation.save!
|
||||
relation.save
|
||||
end
|
||||
} if params['group']
|
||||
|
||||
|
@ -62,7 +62,7 @@ class CollaboratorsController < ApplicationController
|
|||
|
||||
def remove
|
||||
all_user_ids = []
|
||||
all_groups_ids = []
|
||||
all_group_ids = []
|
||||
|
||||
params['user_remove'].keys.each { |user_id|
|
||||
all_user_ids << user_id if params['user_remove'][user_id] == ["1"]
|
||||
|
@ -75,12 +75,12 @@ class CollaboratorsController < ApplicationController
|
|||
u = User.find(user_id)
|
||||
Relation.by_object(u).by_target(@project).each {|r| r.destroy}
|
||||
end
|
||||
all_groups_ids.each do |group_id|
|
||||
all_group_ids.each do |group_id|
|
||||
g = Group.find(group_id)
|
||||
Relation.by_object(g).by_target(@project).each {|r| r.destroy}
|
||||
end
|
||||
|
||||
redirect_to edit_project_collaborators_path(@project)
|
||||
redirect_to edit_project_collaborators_path(@project) + "##{params['user_remove'].present? ? 'users' : 'groups'}"
|
||||
end
|
||||
|
||||
def add
|
||||
|
@ -114,7 +114,8 @@ class CollaboratorsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
redirect_to(edit_project_collaborators_path(@project))
|
||||
# if add an anchor, adding will be more pleasant, but flash message wouldn't be shown.
|
||||
redirect_to edit_project_collaborators_path(@project) # + "##{(params['member_id'].present?) ? 'users' : 'groups'}"
|
||||
end
|
||||
|
||||
protected
|
||||
|
@ -124,11 +125,11 @@ class CollaboratorsController < ApplicationController
|
|||
end
|
||||
|
||||
def find_users
|
||||
@users = @project.collaborators#User.all
|
||||
@users = @project.collaborators.order('uname')#User.all
|
||||
end
|
||||
|
||||
def find_groups
|
||||
@groups = @project.groups#Group.all
|
||||
@groups = @project.groups.order('uname')#Group.all
|
||||
end
|
||||
|
||||
def authorize_collaborators
|
||||
|
|
|
@ -37,7 +37,7 @@ class Git::BlobsController < Git::BaseController
|
|||
end
|
||||
|
||||
def blame
|
||||
@blame = Grit::Blob.blame(@git_repository.repo, @commit.try(:id), @path)
|
||||
@blame = Grit::Blob.blame(@git_repository.repo, @commit.id, @path)
|
||||
end
|
||||
|
||||
def raw
|
||||
|
@ -55,10 +55,10 @@ class Git::BlobsController < Git::BaseController
|
|||
def set_path_blob
|
||||
@path = params[:path]
|
||||
@blob = @tree / @path
|
||||
@commit = @git_repository.log(@treeish, @path, :max_count => 1).first
|
||||
end
|
||||
|
||||
def find_tree
|
||||
@tree = @git_repository.tree(@treeish)
|
||||
@commit = @git_repository.log(@treeish, @path, :max_count => 1).first # TODO WTF nil ?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,6 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def index
|
||||
@projects = current_user.projects.paginate(:page => params[:page])
|
||||
#@projects = @projects.search(params[:query]).search_order if params[:query]
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -2,57 +2,27 @@
|
|||
class UsersController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
|
||||
load_and_authorize_resource
|
||||
load_and_authorize_resource :only => :show
|
||||
before_filter :set_current_user, :only => [:profile, :update, :private]
|
||||
autocomplete :user, :uname
|
||||
|
||||
def index
|
||||
@user = User.scoped
|
||||
if !params[:filter].blank? && !params[:filter][:email].blank?
|
||||
@users = @users.where(:email => params[:filter][:email])
|
||||
@email = params[:filter][:email]
|
||||
end
|
||||
@users = @users.paginate(:page => params[:user_page])
|
||||
@action_url = users_path
|
||||
end
|
||||
|
||||
def show
|
||||
@groups = @user.groups.uniq
|
||||
@platforms = @user.platforms.paginate(:page => params[:platform_page], :per_page => 10)
|
||||
@projects = @user.projects.paginate(:page => params[:project_page], :per_page => 10)
|
||||
end
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
end
|
||||
|
||||
def profile
|
||||
@user ||= current_user
|
||||
end
|
||||
|
||||
def create
|
||||
@user = User.new params[:user]
|
||||
if @user.save
|
||||
flash[:notice] = t('flash.user.saved')
|
||||
redirect_to users_path
|
||||
else
|
||||
flash[:error] = t('flash.user.save_error')
|
||||
render :action => :new
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if params[:user][:role] && current_user.admin?
|
||||
@user.role = params[:user][:role]
|
||||
params[:user].delete(:role)
|
||||
end
|
||||
@user ||= current_user
|
||||
if @user.update_without_password(params[:user])
|
||||
if @user.avatar && params[:delete_avatar] == '1'
|
||||
@user.avatar = nil
|
||||
@user.save
|
||||
end
|
||||
flash[:notice] = t('flash.user.saved')
|
||||
redirect_to @user == current_user ? edit_profile_path : edit_user_path(@user)
|
||||
redirect_to edit_profile_path
|
||||
else
|
||||
flash[:error] = t('flash.user.save_error')
|
||||
flash[:warning] = @user.errors.full_messages.join('. ')
|
||||
|
@ -73,10 +43,10 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@user.destroy
|
||||
flash[:notice] = t("flash.user.destroyed")
|
||||
redirect_to users_path
|
||||
protected
|
||||
|
||||
def set_current_user
|
||||
@user = current_user
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
module ActivityFeedsHelper
|
||||
def render_activity_feed(activity_feed)
|
||||
render :partial => activity_feed.partial, :locals => activity_feed.data.merge(:activity_feed => activity_feed)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
module BuildListsHelper
|
||||
def build_list_status_color(status)
|
||||
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? status
|
||||
|
|
|
@ -14,12 +14,9 @@ class Ability
|
|||
|
||||
# Shared rights between guests and registered users
|
||||
can :forbidden, Platform
|
||||
# TODO remove because auth callbacks skipped
|
||||
can :auto_build, Project
|
||||
can [:publish_build, :status_build, :pre_build, :post_build, :circle_build, :new_bbdt], BuildList
|
||||
|
||||
if user.guest? # Guest rights
|
||||
can :create, User
|
||||
can [:create, :show_message], RegisterRequest
|
||||
else # Registered user rights
|
||||
if user.admin?
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class ActivityFeed < ActiveRecord::Base
|
||||
|
||||
CODE = ['git_delete_branch_notification', 'git_new_push_notification', 'new_comment_commit_notification']
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class ActivityFeedObserver < ActiveRecord::Observer
|
||||
observe :issue, :comment, :user, :build_list
|
||||
|
||||
|
@ -70,7 +71,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
|
|||
|
||||
when 'GitHook'
|
||||
change_type = record.change_type
|
||||
branch_name = record.refname.match(/\/([\w\d]+)$/)[1]
|
||||
branch_name = record.refname.split('/').last
|
||||
|
||||
last_commits = record.project.git_repository.repo.log(branch_name, nil).first(3)
|
||||
first_commiter = User.find_by_email(last_commits[0].author.email) unless last_commits.blank?
|
||||
|
|
|
@ -56,7 +56,7 @@ class BuildList::Filter
|
|||
:project_name => nil
|
||||
}))
|
||||
|
||||
@options[:ownership] = @options[:ownership].presence || 'owned'
|
||||
@options[:ownership] = @options[:ownership].presence || (@project ? 'index' : 'owned')
|
||||
@options[:status] = @options[:status].present? ? @options[:status].to_i : nil
|
||||
@options[:created_at_start] = build_date_from_params(:created_at_start, @options)
|
||||
@options[:created_at_end] = build_date_from_params(:created_at_end, @options)
|
||||
|
|
|
@ -25,7 +25,7 @@ class Group < ActiveRecord::Base
|
|||
attr_accessible :description
|
||||
attr_readonly :own_projects_count
|
||||
|
||||
delegate :ssh_key, :email, :to => :owner
|
||||
delegate :email, :to => :owner
|
||||
|
||||
after_create :add_owner_to_members
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class Label < ActiveRecord::Base
|
||||
has_many :labelings, :dependent => :destroy
|
||||
has_many :issues, :through => :labelings
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class Labeling < ActiveRecord::Base
|
||||
belongs_to :issue
|
||||
belongs_to :label
|
||||
|
|
|
@ -153,13 +153,15 @@ class Platform < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def build_all(user)
|
||||
repositories.find_by_name('main').projects.find_in_batches(:batch_size => 5) do |group|
|
||||
repositories.find_by_name('main').projects.find_in_batches(:batch_size => 2) do |group|
|
||||
sleep 1
|
||||
group.each do |p|
|
||||
%w(i586 x86_64).each do |arch|
|
||||
begin
|
||||
p.build_for(self, user)
|
||||
p.build_for(self, user, arch)
|
||||
rescue RuntimeError, Exception
|
||||
p.delay.build_for(self, user)
|
||||
p.delay.build_for(self, user, arch)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -65,7 +65,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def build_for(platform, user, arch = 'x86_64') # Return i586 after mass rebuild
|
||||
def build_for(platform, user, arch = 'i586') # Return i586 after mass rebuild
|
||||
arch = Arch.find_by_name(arch) if arch.acts_like?(:string)
|
||||
build_lists.create do |bl|
|
||||
bl.pl = platform
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class User < ActiveRecord::Base
|
||||
ROLES = ['admin']
|
||||
ROLES = ['', 'admin', 'banned']
|
||||
LANGUAGES_FOR_SELECT = [['Russian', 'ru'], ['English', 'en']]
|
||||
LANGUAGES = LANGUAGES_FOR_SELECT.map(&:last)
|
||||
MAX_AVATAR_SIZE = 5.megabyte
|
||||
|
@ -42,14 +42,16 @@ class User < ActiveRecord::Base
|
|||
validates :role, :inclusion => {:in => ROLES}, :allow_blank => true
|
||||
validates :language, :inclusion => {:in => LANGUAGES}, :allow_blank => true
|
||||
|
||||
attr_accessible :email, :password, :password_confirmation, :current_password, :remember_me, :login, :name, :ssh_key, :uname, :language,
|
||||
attr_accessible :email, :password, :password_confirmation, :current_password, :remember_me, :login, :name, :uname, :language,
|
||||
:site, :company, :professional_experience, :location, :avatar
|
||||
attr_readonly :uname, :own_projects_count
|
||||
attr_readonly :uname
|
||||
attr_accessor :login
|
||||
|
||||
scope :search_order, order("CHAR_LENGTH(uname) ASC")
|
||||
scope :search, lambda {|q| where("uname ILIKE ?", "%#{q}%")}
|
||||
scope :banned, where(:role => 'banned')
|
||||
scope :admin, where(:role => 'admin')
|
||||
scope :real, where(:role => ['', nil])
|
||||
|
||||
after_create lambda { self.create_notifier }
|
||||
|
||||
|
@ -65,6 +67,10 @@ class User < ActiveRecord::Base
|
|||
new_record?
|
||||
end
|
||||
|
||||
def access_locked?
|
||||
role == 'banned'
|
||||
end
|
||||
|
||||
def fullname
|
||||
return "#{uname} (#{name})"
|
||||
end
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
- content_for :sidebar do
|
||||
.bordered
|
||||
- if can? :create, User.new
|
||||
= link_to t("layout.users.new"), new_user_path, :class => 'button'
|
||||
%h3= t("layout.users.filter_header")
|
||||
%table
|
||||
- t('layout.users.users_filter').each_key do |base|
|
||||
%tr
|
||||
%td.width18=radio_button_tag :myradio, base, @filter.to_sym == base, {:id => 'users_filter', :class => 'niceRadio', :name => 'filter'}
|
||||
%td.width135=t("layout.users.users_filter.#{base}")
|
||||
.both
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"sEcho": <%=h params[:sEcho].to_i || -1 %>,
|
||||
"iTotalRecords": <%= @total_users %>,
|
||||
"iTotalDisplayRecords": <%= @total_user %>,
|
||||
"aaData": [
|
||||
<% @users.each do |user| %>
|
||||
[
|
||||
"<%= user.name %>",
|
||||
"<%= user.uname %>",
|
||||
"<%= user.email %>",
|
||||
"<span style='<%=user.access_locked? ? 'background: #FEDEDE' : ''%>'><%= user.role %></span>",
|
||||
"<%= j raw [(link_to t('layout.show'), user_path(user) if can? :read, user),
|
||||
(link_to t('layout.edit'), edit_user_path(user) if can? :edit, user),
|
||||
(link_to t('layout.delete'), delete_user_path(user), :method => :delete, :confirm => t('layout.users.confirm_delete') if can? :destroy, user)
|
||||
].compact.join(' | ') %>"
|
||||
]<%= user == @users.last ? '' : ',' %>
|
||||
<% end %>
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
%h3.fix= t("layout.users.list_header")
|
||||
|
||||
- columns = [{:type => 'html'}, {:type => 'html'}, {:type => 'html'}, {:type => 'html', :sortable => false, :searchable => false}, {:type => nil, :sortable => false, :searchable => false, :class => 'buttons'}]
|
||||
= raw datatable(columns, {:sort_by => "[0, 'asc']", :processing => t("layout.processing"), :search_label => t("layout.search.header"),
|
||||
:pagination_labels => {:previous => t("datatables.previous_label"), :next => t("datatables.next_label")},
|
||||
:empty_label => t("datatables.empty_label"),
|
||||
:info_label => t("datatables.info_label"),
|
||||
:info_empty_label => t("datatables.info_empty_label"),
|
||||
:filtered_label => t("datatables.filtered_label"),
|
||||
:table_dom_id => 'datatable',
|
||||
:auto_width => 'false',
|
||||
:ajax_source => "#{url_for :controller => 'admin/users', :action => :list}",
|
||||
:additional_data => {:filter => "' + $('#users_filter[type=\"radio\"]:checked').val() + '"} })
|
||||
|
||||
%table#datatable.tablesorter.list-users{:cellspacing => 0, :cellpadding => 0}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.user.name")
|
||||
%th.th2= t("activerecord.attributes.user.uname")
|
||||
%th.th3= t("activerecord.attributes.user.email")
|
||||
%th.th4= t("activerecord.attributes.user.role")
|
||||
%th.last
|
||||
%tbody
|
||||
%br
|
||||
|
||||
= render :partial => 'admin/users/sidebar'
|
||||
= render 'admin/submenu'
|
||||
|
||||
:javascript
|
||||
$('#users_filter[type="radio"]').live('change', function(){
|
||||
$('#datatable').dataTable().fnDraw();
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
.block
|
||||
.content
|
||||
%h2.title= t("layout.users.new_header")
|
||||
.inner
|
||||
= form_for @user, :url => create_user_path, :html => { :class => :form } do |f|
|
||||
= render :partial => "users/form", :locals => {:f => f}
|
||||
|
||||
- content_for :sidebar do
|
||||
.bordered.nopadding
|
||||
|
||||
= render 'admin/submenu'
|
|
@ -0,0 +1,16 @@
|
|||
%h3.fix.bpadding10= @user.uname
|
||||
|
||||
= form_for @user, :url => update_user_path(@user), :html => { :class => :form } do |f|
|
||||
= render :partial => "users/form", :locals => {:f => f}
|
||||
|
||||
.notify
|
||||
%p= t('layout.users.public_data_edit_warning')
|
||||
.notify
|
||||
%p= t('layout.users.avatar_notice')
|
||||
|
||||
:javascript
|
||||
$('article .right').addClass('middlepadding');
|
||||
|
||||
= render 'admin/submenu'
|
||||
- content_for :sidebar do
|
||||
.bordered.nopadding
|
|
@ -24,6 +24,7 @@
|
|||
.lefter= f.radio_button :ownership, 'owned', :class => 'niceRadio', :id => 'myradio1'
|
||||
.lefter= t("layout.build_lists.ownership.owned")
|
||||
.both
|
||||
- unless @project
|
||||
.table
|
||||
.lefter= f.radio_button :ownership, 'related', :class => 'niceRadio', :id => 'myradio2'
|
||||
.lefter= t("layout.build_lists.ownership.related")
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
= render :partial => 'projects/sidebar'
|
||||
= render :partial => 'projects/submenu'
|
||||
|
||||
%a{:name => 'users'}
|
||||
%h3= t("layout.users.list_header")
|
||||
|
||||
= form_tag add_project_collaborators_path(@project) do
|
||||
.admin-search
|
||||
= autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_users_path, :id_element => '#member_id_field'
|
||||
.admin-role
|
||||
.lineForm
|
||||
= select_tag 'role', options_for_collaborators_roles_select
|
||||
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
|
||||
= submit_tag t("layout.add"), :class => 'button'
|
||||
.both
|
||||
|
||||
= form_tag project_collaborators_path(@project), :id => 'members_form', :delete_url => remove_project_collaborators_path(@project) do
|
||||
= hidden_field_tag "_method", "post"
|
||||
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
|
||||
|
@ -12,8 +26,8 @@
|
|||
%th{:colspan => "3"}
|
||||
= t("layout.collaborators.roles")
|
||||
%tbody
|
||||
- @users.each do |user|
|
||||
%tr#admin-table-members-row1
|
||||
- @users.each_with_index do |user, num|
|
||||
%tr{:id => "admin-table-members-row#{num}"}
|
||||
%td
|
||||
%span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "}
|
||||
= check_box_tag "user_remove[#{user.id}][]"
|
||||
|
@ -25,31 +39,54 @@
|
|||
%td
|
||||
.radio
|
||||
= radio_button_tag "user[#{user.id}]", role, ((@project.relations.exists? :object_id => user.id, :object_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio'
|
||||
-# f.radio_button "group[#{role}][#{group.id}]", '1', ((@project.relations.exists? :object_id => group.id, :object_type => 'Group', :role => role) ? :checked : nil)
|
||||
-#%span.niceRadio.radioChecked
|
||||
-# %input#myradio1{:checked => "checked", :name => "myradio", :tabindex => "1", :type => "radio", :value => "on"}/
|
||||
.forradio= t("layout.collaborators.role_names.#{ role }")
|
||||
= link_to_function t("layout.delete"), "deleteAdminMember();", :class => 'button'
|
||||
= link_to_function t("layout.delete_selected"), "deleteAdminMember();", :class => 'button'
|
||||
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button right_floated'
|
||||
.both
|
||||
.hr.top
|
||||
|
||||
= form_tag add_project_collaborators_path(@project) do
|
||||
.admin-search
|
||||
= autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_users_path, :id_element => '#member_id_field'
|
||||
.admin-role
|
||||
.lineForm
|
||||
= select_tag 'role', options_for_collaborators_roles_select
|
||||
.both
|
||||
-#.admin-search
|
||||
-# = label_tag "group_uname", t("layout.collaborators.input_groupname")
|
||||
-# = autocomplete_field_tag 'group_id', params[:group_id], autocomplete_group_uname_groups_path, :id_element => '#group_id_field'
|
||||
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
|
||||
=# hidden_field_tag 'group_id', nil, :id => 'group_id_field'
|
||||
%br
|
||||
= submit_tag t("layout.add"), :class => 'button'
|
||||
|
||||
.hr.bottom
|
||||
.both
|
||||
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button'
|
||||
|
||||
- content_for :sidebar, render('projects/sidebar')
|
||||
%a{:name => 'groups'}
|
||||
%h3= t("layout.groups.list_header")
|
||||
|
||||
= form_tag add_project_collaborators_path(@project) do
|
||||
.admin-search
|
||||
= autocomplete_field_tag 'group_id', params[:group_id], autocomplete_group_uname_groups_path, :id_element => '#group_id_field'
|
||||
.admin-role
|
||||
.lineForm
|
||||
= select_tag 'role', options_for_collaborators_roles_select, :id => 'group_role'
|
||||
= hidden_field_tag 'group_id', nil, :id => 'group_id_field'
|
||||
= submit_tag t("layout.add"), :class => 'button'
|
||||
.both
|
||||
|
||||
= form_tag project_collaborators_path(@project), :id => 'groups_form', :delete_url => remove_project_collaborators_path(@project) do
|
||||
= hidden_field_tag "_method", "post", :id => 'groups_method'
|
||||
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
\
|
||||
%th
|
||||
= t("layout.collaborators.members")
|
||||
%th{:colspan => "3"}
|
||||
= t("layout.collaborators.roles")
|
||||
%tbody
|
||||
- @groups.each_with_index do |group, num|
|
||||
%tr{:id => "admin-table-members-row#{num + @users.size + 1}"}
|
||||
%td
|
||||
%span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "}
|
||||
= check_box_tag "group_remove[#{group.id}][]"
|
||||
%td
|
||||
.forimg= link_to "#{group.uname}", group_path(group)
|
||||
- Relation::ROLES.each_with_index do |role, i|
|
||||
%td
|
||||
.radio
|
||||
= radio_button_tag "group[#{group.id}]", role, ((@project.relations.exists? :object_id => group.id, :object_type => 'Group', :role => role) ? :checked : nil), :class => 'niceRadio'
|
||||
.forradio= t("layout.collaborators.role_names.#{ role }")
|
||||
= link_to_function t("layout.delete_selected"), "deleteAdminGroup();", :class => 'button'
|
||||
= link_to_function t("layout.save"), "saveAdminGroup();", :class => 'button right_floated'
|
||||
.both
|
||||
.both
|
||||
|
||||
|
|
|
@ -7,15 +7,17 @@
|
|||
.logo
|
||||
/ Page
|
||||
%article
|
||||
- is_error = (flash.try(:first).try(:first) == :alert && flash.try(:first).try(:last) == t('devise.failure.invalid')) # Trash
|
||||
- if flash.try(:first).try(:first) == :alert && [t('devise.failure.invalid'), t('devise.failure.locked')].include?(flash.try(:first).try(:last))
|
||||
- error = flash.first.last
|
||||
- error ||= false
|
||||
- login = t('devise.sessions.login'); password = t('devise.sessions.password')
|
||||
=hidden_field_tag :login_default, login
|
||||
=hidden_field_tag :password_default, password
|
||||
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f|
|
||||
%h1= title t("layout.sessions.sign_in_header")
|
||||
= f.text_field :login, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :value => login
|
||||
= f.text_field :login, :class => "registartion-input #{error ? "registartion-input-error" : ''}", :value => login
|
||||
%br/
|
||||
= f.password_field :password, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :value => password
|
||||
= f.password_field :password, :class => "registartion-input #{error ? "registartion-input-error" : ''}", :value => password
|
||||
%br/
|
||||
.registration
|
||||
.remember
|
||||
|
@ -30,4 +32,4 @@
|
|||
.forgot
|
||||
.password
|
||||
%p= link_to t("layout.devise.shared_links.forgot_password"), new_password_path(resource_name)
|
||||
=showDeviseHintError(:login_error, is_error ? t('devise.failure.invalid') : false)
|
||||
=showDeviseHintError(:login_error, error)
|
||||
|
|
|
@ -18,4 +18,4 @@
|
|||
.actions-bar.wat-cf
|
||||
.actions= will_paginate
|
||||
|
||||
= render 'admins/submenu'
|
||||
= render 'admin/submenu'
|
||||
|
|
|
@ -19,5 +19,8 @@
|
|||
|
||||
:javascript
|
||||
$(function() {
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {lineNumbers: true, mode: '#{@blob.raw_mime_type.content_type}', theme: 'eclipse'});
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
||||
lineNumbers: true,
|
||||
mode: '#{@blob.raw_mime_type.content_type}'
|
||||
});
|
||||
});
|
|
@ -22,4 +22,4 @@
|
|||
- render_way = choose_render_way(@blob)
|
||||
.file
|
||||
.top= render 'top', :render_way => render_way
|
||||
.blame_data= render 'blame_table'
|
||||
.blame_data= render 'blame_table' if @blame.first.first.present?
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%aside
|
||||
.admin-preferences
|
||||
%ul
|
||||
- if can? :edit, @project
|
||||
- if can? :edit, @group
|
||||
%li{:class => (act == :edit && contr == :groups) ? 'active' : ''}
|
||||
= link_to t("layout.groups.edit"), edit_group_path(@group)
|
||||
- if can? :manage_members, @group
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
=issue.created_at.to_s(:long)
|
||||
=t("layout.by") if issue.creator
|
||||
=link_to(issue.creator.uname, user_path(issue.creator)) if issue.creator
|
||||
.label.selected.tracker
|
||||
-issue.labels.each do |label|
|
||||
.left.nomargin
|
||||
.label.selected.tracker.left
|
||||
.labeltext.selected{:style => "background: ##{label.color};"}=label.name
|
||||
.both
|
||||
%td.td3
|
||||
.avatar
|
||||
=link_to image_tag(avatar_url(issue.user), :alt => 'avatar'), user_path(issue.user) if issue.user
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%ul
|
||||
- (collection = t which_menu).each do |base, title|
|
||||
- if can? :index, base.to_s.classify.constantize
|
||||
%li= link_to title, send(:"#{base}_path"), :class => [].tap{|c| c << 'active' if params[:controller] == base.to_s}.join(' ')
|
||||
%li= link_to title, send(:"#{base}_path"), :class => controller_name == base.to_s ? 'active' : ''
|
||||
- if current_user.admin? && which_menu == 'top_menu'
|
||||
%li= link_to 'Admin', users_path, :class => t('admins_menu').has_key?(params[:controller].to_sym) ? 'active' : ''
|
||||
%li= link_to t('admins_menu_header'), users_path, :class => t('admins_menu').has_key?(controller_name.to_sym) ? 'active' : ''
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
%td= product_build_list.id
|
||||
%td= product_build_list.human_status
|
||||
%td= link_to nil, product_build_list.container_path
|
||||
%td= link_to image_tag('x.png'), 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? :destroy, product_build_list
|
||||
%td= l(product_build_list.notified_at, :format => :long)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%h3= "#{t("layout.products.about")} #{@product.name}"
|
||||
%h3 #{t("layout.products.about")} #{@product.name}
|
||||
|
||||
%p= @product.description
|
||||
|
||||
|
@ -20,59 +20,9 @@
|
|||
%table#myTable.tablesorter.platform-product-main{:cellspacing => "0", :cellpadding => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.product_build_list.id")
|
||||
%th.th2= t("activerecord.attributes.product_build_list.status")
|
||||
%th.th3= t("layout.product_build_lists.action")
|
||||
%th.th4= t("activerecord.attributes.product_build_list.notified_at")
|
||||
%tbody
|
||||
= render @product.product_build_lists.default_order
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to @platform.name, platform_path(@platform) + "#products"
|
||||
%li.active= link_to @product.name, platform_product_path(@platform, @product)
|
||||
|
||||
.content
|
||||
.inner
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.product.name")
|
||||
\:
|
||||
= @product.name
|
||||
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.product.is_template")
|
||||
\:
|
||||
= t("layout.#{@product.is_template?}_")
|
||||
|
||||
- content_for :commented do
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.product.system_wide")
|
||||
\:
|
||||
= t("layout.#{@product.system_wide?}_")
|
||||
|
||||
.wat-cf
|
||||
- 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 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
|
||||
.content
|
||||
.inner
|
||||
%table.table
|
||||
%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.id")
|
||||
%th= t("activerecord.attributes.product_build_list.status")
|
||||
%th= t("activerecord.attributes.product_build_list.container_path")
|
||||
%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
|
||||
%th= t("activerecord.attributes.product_build_list.notified_at")
|
||||
%tbody= render @product.product_build_lists.default_order
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
- content_for :sidebar do
|
||||
|
||||
- act = action_name.to_sym
|
||||
- contr = controller_name.to_sym
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
- content_for :submenu do
|
||||
- act = action_name.to_sym; contr = controller_name.to_sym
|
||||
.left= @project.name
|
||||
.left
|
||||
.table-sort-left=image_tag visibility_icon(@project.visibility)
|
||||
.table-sort-right=@project.name
|
||||
%nav
|
||||
%ul
|
||||
%li= link_to t("project_menu.project"), project_path(@project), :class => (act.in?([:show, :edit]) && contr.in?([:trees, :blobs]) ? 'active' : nil)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
= render :partial => 'projects/submenu'
|
||||
= render :partial => 'projects/sidebar'
|
||||
|
||||
= form_for @project, :html => { :class => :form, :multipart => true } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
|
@ -8,4 +9,3 @@
|
|||
.rightside= link_to t("layout.delete"), project_path(@project), :method => :delete, :confirm => t("layout.projects.confirm_delete"), :class => 'button' if can? :destroy, @project
|
||||
.both
|
||||
|
||||
- content_for :sidebar, render('sidebar')
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
= render :partial => 'projects/submenu'
|
||||
= render :partial => 'projects/sidebar'
|
||||
|
||||
= form_for @project, :url => sections_project_path(@project), :method => :post, :html => { :class => :form, :multipart => true } do |f|
|
||||
.leftside.w25
|
||||
|
@ -18,8 +19,6 @@
|
|||
.padd25= submit_tag t("layout.save"), :class => 'button'
|
||||
.both
|
||||
|
||||
- content_for :sidebar, render('sidebar')
|
||||
|
||||
:javascript
|
||||
// TODO: Replace this temporary hack by something more true
|
||||
$('.right').addClass('bigpadding');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% @projects.each do |project| %>
|
||||
[
|
||||
"<%=j link_to("#{project.owner.respond_to?(:uname) ? project.owner.uname : project.owner.name} / #{project.name}", project) %>",
|
||||
"<%= truncate(project.description || '', :length => 60).gsub("\n", ' ') %>",
|
||||
"<%= truncate(project.description || '', :length => 60).gsub("\n", ' ').gsub("\r", ' ') %>",
|
||||
"<%=j link_to t("layout.add"), url_for(:controller => :repositories, :action => :add_project, :project_id => project.id) %>"
|
||||
]<%= project == @projects.last ? '' : ',' %>
|
||||
<% end %>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
j(link_to("#{project.owner.respond_to?(:uname) ? project.owner.uname : project.owner.name} / #{project.name}", project)) +
|
||||
"</div>").html_safe
|
||||
%>",
|
||||
"<%= truncate(project.description || '', :length => 60).gsub("\n", ' ') %>",
|
||||
"<%= truncate(project.description || '', :length => 60).gsub("\n", ' ').gsub("\r", ' ') %>",
|
||||
"<%=
|
||||
if can? :remove_project, @repository
|
||||
j(link_to('<span class="delete"> </span>'.html_safe,
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
- if current_user.admin?
|
||||
.leftlist
|
||||
= f.label :role, t("activerecord.attributes.user.role"), :class => :label
|
||||
.rightlist
|
||||
= f.select :role, User::ROLES, {}, {:name => 'role'}
|
||||
- if @user.new_record?
|
||||
.leftlist
|
||||
= f.label :uname, t("activerecord.attributes.user.uname")
|
||||
.rightlist
|
||||
= f.text_field :uname
|
||||
.leftlist
|
||||
= f.label :password, t("activerecord.attributes.user.password")
|
||||
.rightlist
|
||||
= f.password_field :password
|
||||
.both
|
||||
.leftlist
|
||||
= f.label :password_confirmation, t("activerecord.attributes.user.password_confirm")
|
||||
.rightlist
|
||||
= f.password_field :password_confirmation
|
||||
.both
|
||||
.leftlist
|
||||
= f.label :name, t("activerecord.attributes.user.name")
|
||||
.rightlist
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
.admin-preferences
|
||||
%ul
|
||||
- if can? :edit, @user
|
||||
%li{:class => (act == :edit && :users == contr) ? 'active' : ''}
|
||||
%li{:class => (act == :profile && :users == contr) ? 'active' : ''}
|
||||
= link_to t("layout.users.profile"), @user == current_user ? edit_profile_path : edit_user_path(@user)
|
||||
- if can? :private, @user
|
||||
%li{:class => (act == :private && contr == :users) ? 'active' : ''}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.users.list"), users_path
|
||||
%li= link_to t("layout.users.new"), new_user_path
|
||||
%li= link_to t("layout.users.register_requests"), register_requests_path if can? :read, RegisterRequest
|
||||
.content
|
||||
%h2.title
|
||||
= t("layout.users.list_header")
|
||||
.inner
|
||||
= render :partial => "users/filter", :action_url => @action_url
|
||||
.inner
|
||||
%table.table
|
||||
%tr
|
||||
%th.first ID
|
||||
%th= t("activerecord.attributes.user.name")
|
||||
%th= t("activerecord.attributes.user.uname")
|
||||
%th= t("activerecord.attributes.user.email")
|
||||
%th= t("activerecord.attributes.user.role")
|
||||
%th.last
|
||||
- @users.each do |user|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td= user.id
|
||||
%td= link_to user.name, user_path(user)
|
||||
%td= link_to user.uname, user_path(user)
|
||||
%td= user.email
|
||||
%td= user.role
|
||||
%td.last
|
||||
- if can? :read, user
|
||||
= link_to t("layout.show"), user_path(user)
|
||||
\|
|
||||
- if can? :edit, user
|
||||
#{link_to t("layout.edit"), edit_user_path(user)}
|
||||
\|
|
||||
- if can? :destroy, user
|
||||
#{link_to t("layout.delete"), user_path(user), :method => :delete, :confirm => t("layout.users.confirm_delete")}
|
||||
.actions-bar.wat-cf
|
||||
.actions= will_paginate @users, :param_name => :user_page
|
||||
= render 'admins/submenu'
|
|
@ -1,12 +0,0 @@
|
|||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.users.list"), users_path
|
||||
%li.active= link_to t("layout.users.new"), new_user_path
|
||||
.content
|
||||
%h2.title= t("layout.users.new_header")
|
||||
.inner
|
||||
= form_for @user, :url => users_path, :html => { :class => :form } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
|
||||
- content_for :sidebar, render('sidebar')
|
|
@ -1,12 +1,7 @@
|
|||
%h3.fix.bpadding10= @user.uname
|
||||
|
||||
= form_for @user, :url => user_path(@user), :html => { :class => :form } do |f|
|
||||
- if current_user.admin?
|
||||
.leftlist
|
||||
= f.label :role, t("activerecord.attributes.user.role"), :class => :label
|
||||
.rightlist
|
||||
= f.select :role, User::ROLES, :include_blank => true
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
= render :partial => "users/form", :locals => {:f => f}
|
||||
|
||||
.notify
|
||||
%p= t('layout.users.public_data_edit_warning')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.left
|
||||
= image_tag avatar_url(@user, :big)
|
||||
%br
|
||||
= link_to t("layout.users.settings"), edit_user_path(@user), :class => 'button width81' if can? :edit, @user
|
||||
= link_to t("layout.users.settings"), current_user == @user ? edit_profile_path : edit_user_path(@user), :class => 'button width81' if can? :edit, @user
|
||||
.left
|
||||
%h3= @user.uname
|
||||
= @user.name
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
- if has_footer?
|
||||
#wiki-footer{:class => "gollum-#{footer_format}-content"}
|
||||
#footer-content= raw footer_content
|
||||
.both
|
||||
#gollum-footer
|
||||
%p#last-edit
|
||||
= t("wiki.last_edited_by")
|
||||
|
@ -15,5 +16,5 @@
|
|||
= 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"), :class => 'button width100' do
|
||||
= link_to project_wiki_path(@project, escaped_name), :method => :delete, :confirm => t("layout.confirm") do
|
||||
%span= t("wiki.delete_page")
|
|
@ -1,18 +1,14 @@
|
|||
= render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%h3.wiki
|
||||
.left
|
||||
%h3
|
||||
= 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'
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
||||
.r= link_to t("wiki.view_page"), view_path(@project, escaped_name), :class => 'action-view-page button'
|
||||
.r= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'aciton-view-history button'
|
||||
.both
|
||||
#wiki-content= render "editor"
|
||||
|
||||
:javascript
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
/ = render 'gollum_includes'
|
||||
/ = render 'project_short'
|
||||
= render 'projects/submenu'
|
||||
|
||||
%h3.wiki
|
||||
.left
|
||||
%h3
|
||||
= @page.name
|
||||
= "(#{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'
|
||||
= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'button'
|
||||
.r
|
||||
- if @editable
|
||||
= link_to t("wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "button width100"
|
||||
= link_to t("wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => 'button'
|
||||
.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'
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
= link_to t("wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project), :id => 'minibutton-new-page', :class => 'button'
|
||||
.both
|
||||
/ = render 'searchbar'
|
||||
= render "page"
|
||||
|
|
|
@ -3,12 +3,17 @@ $:.unshift File.expand_path('.')
|
|||
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
|
||||
set :rvm_type, :user
|
||||
|
||||
set :default_environment, {
|
||||
'LANG' => 'en_US.UTF-8'
|
||||
}
|
||||
|
||||
#set :rake, "#{rake} --trace"
|
||||
|
||||
require 'rvm/capistrano'
|
||||
require 'bundler/capistrano'
|
||||
require 'delayed/recipes'
|
||||
require 'airbrake/capistrano'
|
||||
|
||||
|
||||
set :whenever_command, "bundle exec whenever"
|
||||
# require "whenever/capistrano"
|
||||
|
||||
|
@ -61,6 +66,19 @@ namespace :deploy do
|
|||
task :symlink_pids, :roles => :app do
|
||||
run "cd #{fetch :shared_path}/tmp && ln -nfs ../pids pids"
|
||||
end
|
||||
|
||||
# Speed up precompile (http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano )
|
||||
namespace :assets do
|
||||
task :precompile, :roles => :web, :except => { :no_release => true } do
|
||||
from = source.next_revision(current_revision)
|
||||
if capture("cd #{latest_release} && #{source.local.log(from)} app/assets/ lib/assets/ vendor/assets/ | wc -l").to_i > 0
|
||||
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
|
||||
else
|
||||
logger.info "Skipping asset pre-compilation because there were no asset changes"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
after "deploy:finalize_update", "deploy:symlink_all"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
common: &common
|
||||
project_name: ABF
|
||||
repo_project_name: ABF
|
||||
distr_types: ['mdv', 'nau5', 'suse', 'deb']
|
||||
wiki_formats:
|
||||
markdown: "Markdown"
|
||||
textile: "Textile"
|
||||
org: "Org-mode"
|
||||
|
||||
production:
|
||||
<<: *common
|
||||
root_path: /share
|
||||
nginx_log: /srv/rosa_build/shared/log/nginx.access.log
|
||||
do-not-reply-email: do-not-reply@rosalab.ru
|
||||
build_server_ip: 127.0.0.1
|
||||
build_server_port: 12555
|
||||
build_server_path: /xmlrpc
|
||||
product_builder_ip:
|
||||
mdv: 192.168.122.19
|
||||
nau5: 192.168.122.203
|
||||
product_builder_port: 12554
|
||||
product_builder_path: /xmlrpc
|
|
@ -1,16 +1,14 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
set :branch, "pingwinsoft"
|
||||
#require "whenever/capistrano"
|
||||
set :branch, "master"
|
||||
|
||||
set :domain, "b.pingwinsoft.ru" # "195.19.76.12"
|
||||
set :port, 1822
|
||||
set :domain, "89.248.225.78" # "195.19.76.12"
|
||||
set :port, 16922
|
||||
|
||||
role :app, domain
|
||||
role :web, domain
|
||||
role :db, domain, :primary => true
|
||||
|
||||
set :application, "rosa_build_#{stage}"
|
||||
set :deploy_to, "/srv/#{application}"
|
||||
|
||||
# set :unicorn_port, 8081
|
||||
|
||||
before "deploy:restart", "deploy:stub_xml_rpc"
|
||||
#set :application, "rosa_build_#{stage}"
|
||||
#set :deploy_to, "/srv/#{application}"
|
||||
#before "deploy:restart", "deploy:stub_xml_rpc"
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
require './lib/ext/core/string'
|
|
@ -24,6 +24,7 @@ en:
|
|||
create: Create
|
||||
update: Update
|
||||
delete: Erase
|
||||
delete_selected: Remove selected
|
||||
save: Save
|
||||
clone: Clone
|
||||
search_by_name: Filter by name
|
||||
|
|
|
@ -33,6 +33,7 @@ en:
|
|||
wiki: Wiki
|
||||
platform_menu:
|
||||
settings: Settings
|
||||
admins_menu_header: Admin
|
||||
admins_menu:
|
||||
users: Пользователи
|
||||
event_logs: Лог событий
|
||||
|
|
|
@ -33,6 +33,7 @@ ru:
|
|||
wiki: Вики
|
||||
platform_menu:
|
||||
settings: Настройки
|
||||
admins_menu_header: Центр управления
|
||||
admins_menu:
|
||||
users: Пользователи
|
||||
event_logs: Лог событий
|
||||
|
|
|
@ -7,7 +7,7 @@ en:
|
|||
all_my_builds: All my builds
|
||||
my_builds_by_day: My today builds
|
||||
new_project: Create project
|
||||
load_messages: Load messages
|
||||
load_messages: show previous messages
|
||||
|
||||
notifications:
|
||||
subjects:
|
||||
|
|
|
@ -7,7 +7,7 @@ ru:
|
|||
all_my_builds: Все мои сборки
|
||||
my_builds_by_day: Мои сборки за день
|
||||
new_project: Создать проект
|
||||
load_messages: Загрузить сообщения
|
||||
load_messages: показать предыдущие сообщения
|
||||
|
||||
notifications:
|
||||
subjects:
|
||||
|
|
|
@ -3,7 +3,7 @@ en:
|
|||
groups:
|
||||
list: List
|
||||
new: Create
|
||||
edit: Edit
|
||||
edit: Settings
|
||||
members: Members
|
||||
new_header: New group
|
||||
edit_header: Edit
|
||||
|
@ -11,7 +11,7 @@ en:
|
|||
show: Group
|
||||
back_to_the_list: ⇐ List of groups
|
||||
confirm_delete: Are you sure to remove this group?
|
||||
edit_members: Edit members
|
||||
edit_members: Members
|
||||
group: Group
|
||||
description: Descripton
|
||||
leave_group: Leave group
|
||||
|
|
|
@ -3,7 +3,7 @@ ru:
|
|||
groups:
|
||||
list: Список
|
||||
new: Создать группу
|
||||
edit: Редактировать
|
||||
edit: Настройки
|
||||
members: Участники
|
||||
new_header: Новая группа
|
||||
edit_header: Редактировать
|
||||
|
@ -11,7 +11,7 @@ ru:
|
|||
show: Группа
|
||||
back_to_the_list: ⇐ К списку групп
|
||||
confirm_delete: Вы уверены, что хотите удалить эту группу?
|
||||
edit_members: Изменить список участников
|
||||
edit_members: Участники
|
||||
group: Группа
|
||||
description: Описание
|
||||
leave_group: Покинуть группу
|
||||
|
|
|
@ -2,7 +2,7 @@ en:
|
|||
layout:
|
||||
projects:
|
||||
add: Add
|
||||
edit: Edit
|
||||
edit: Settings
|
||||
fork_and_edit: Fork and Edit
|
||||
list: List
|
||||
list_header: Projects
|
||||
|
@ -17,11 +17,10 @@ en:
|
|||
current_project_header: Current project
|
||||
current_build_lists: Current builds
|
||||
build_button: Start build
|
||||
add_collaborators: Add collaborators
|
||||
add_collaborators: Add members
|
||||
members: Members
|
||||
collaborators: Collaborators
|
||||
groups: Groups
|
||||
edit_collaborators: Edit collaborators
|
||||
edit_collaborators: Members
|
||||
role: Project role
|
||||
remove_user: Leave project
|
||||
issues: Issues
|
||||
|
|
|
@ -2,7 +2,7 @@ ru:
|
|||
layout:
|
||||
projects:
|
||||
add: Добавить
|
||||
edit: Редактировать
|
||||
edit: Настройки
|
||||
fork_and_edit: Клонировать и редактировать
|
||||
list: Список
|
||||
list_header: Проекты
|
||||
|
@ -17,11 +17,10 @@ ru:
|
|||
current_project_header: Текущий проект
|
||||
current_build_lists: Текущие сборки
|
||||
build_button: Начать сборку
|
||||
add_collaborators: Добавить коллабораторов
|
||||
add_collaborators: Добавить участников
|
||||
members: Участники
|
||||
collaborators: Коллабораторы
|
||||
groups: Группы
|
||||
edit_collaborators: Изменить список участников
|
||||
edit_collaborators: Участники
|
||||
role: Роль в проекте
|
||||
remove_user: Покинуть проект
|
||||
issues: Задачи
|
||||
|
|
|
@ -24,6 +24,7 @@ ru:
|
|||
create: Создать
|
||||
update: Обновить
|
||||
delete: Удалить
|
||||
delete_selected: Удалить выбранное
|
||||
save: Сохранить
|
||||
clone: Клонировать
|
||||
search_by_name: Фильтр по имени
|
||||
|
|
|
@ -25,6 +25,11 @@ en:
|
|||
avatar_notice: Without uploaded avatar will be used avatar from gravar web service.
|
||||
delete_avatar: Delete avatar
|
||||
avatar_with_size: Avatar (less than %{max})
|
||||
users_filter:
|
||||
all: All
|
||||
admin: Admins
|
||||
real: Real
|
||||
banned: Banned
|
||||
|
||||
activerecord:
|
||||
attributes:
|
||||
|
|
|
@ -22,9 +22,14 @@ ru:
|
|||
delete_header: Удалить аккаунт
|
||||
delete_warning: Внимание! Удаленный аккаунт восстановлению не подлежит.
|
||||
private_settings_header: Изменение пароля
|
||||
avatar_notice: При отсутствии загруженной аватарки будет использована Ваша аватарка на сервисе gravatar.
|
||||
avatar_notice: При отсутствии загруженного аватара будет использован Ваш аватар на сервисе gravatar.
|
||||
delete_avatar: Удалить аватар
|
||||
avatar_with_size: Аватар (менее %{max})
|
||||
users_filter:
|
||||
all: Все
|
||||
admin: Админы
|
||||
real: Обычные
|
||||
banned: Забаненные
|
||||
|
||||
activerecord:
|
||||
attributes:
|
||||
|
|
|
@ -5,14 +5,19 @@ Rosa::Application.routes.draw do
|
|||
|
||||
devise_scope :user do
|
||||
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
||||
get '/user' => 'users#profile', :as => 'edit_profile'
|
||||
put '/user' => 'users#update', :as => 'update_profile'
|
||||
get '/users/:id/edit' => 'users#profile', :as => 'edit_user'
|
||||
put '/users/:id/edit' => 'users#update', :as => 'update_user'
|
||||
get '/user' => 'users#profile', :as => :edit_profile
|
||||
put '/user' => 'users#update', :as => :update_profile
|
||||
get '/users' => 'admin/users#index', :as => :users
|
||||
get '/users/new' => 'admin/users#new', :as => :new_user
|
||||
get '/users/list' => 'admin/users#list', :as => :users_list
|
||||
post '/users/create' => 'admin/users#create', :as => :create_user
|
||||
get '/users/:id/edit' => 'admin/users#profile', :as => :edit_user
|
||||
put '/users/:id/edit' => 'admin/users#update', :as => :update_user
|
||||
delete '/users/:id/delete' => 'admin/users#destroy', :as => :delete_user
|
||||
end
|
||||
devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'}
|
||||
|
||||
resources :users do
|
||||
resources :users, :only => [:show, :profile, :update] do
|
||||
resources :groups, :only => [:new, :create, :index]
|
||||
collection do
|
||||
resources :register_requests, :only => [:index, :new, :create, :show_message, :approve, :reject] do
|
||||
|
@ -27,6 +32,7 @@ Rosa::Application.routes.draw do
|
|||
namespace :settings do
|
||||
resource :notifier, :only => [:show, :update]
|
||||
end
|
||||
resources :platforms, :only => [:new, :create]
|
||||
end
|
||||
match 'users/:id/settings/private' => 'users#private', :as => :user_private_settings, :via => :get
|
||||
match 'users/:id/settings/private' => 'users#private', :as => :user_private_settings, :via => :put
|
||||
|
@ -182,14 +188,14 @@ Rosa::Application.routes.draw do
|
|||
delete :remove
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resources :users, :groups do
|
||||
resources :platforms, :only => [:new, :create]
|
||||
|
||||
# resources :repositories, :only => [:new, :create]
|
||||
end
|
||||
|
||||
# resources :users, :groups do
|
||||
# resources :platforms, :only => [:new, :create]
|
||||
# resources :repositories, :only => [:new, :create]
|
||||
# end
|
||||
|
||||
resources :activity_feeds, :only => [:index]
|
||||
|
||||
resources :search, :only => [:index]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class CreateActivityFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :activity_feeds do |t|
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddCreatorToIssue < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :issues, :creator_id, :integer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class CreateLabels < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :labels do |t|
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class RemoveRepositoriesOwner < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :repositories, :owner_id
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddClosedAtToIssue < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :issues, :closed_at, :datetime
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddClosedByToIssue < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :issues, :closed_by, :integer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddDescriptionToGroups < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :groups, :description, :text
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddDefaultValuesToIsRpmForProjects < ActiveRecord::Migration
|
||||
def change
|
||||
Project.update_all(:is_rpm => true)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class RemoveNameFromGroups < ActiveRecord::Migration
|
||||
def up
|
||||
remove_column :groups, :name
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddProfessionalExperienceToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :professional_experience, :text
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddSiteCompanyAndLocationToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :site, :string
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddAvatarToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
change_table :users do |t|
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddProjectToComment < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :comments, :project_id, :integer
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class DeleteDublicateSubscribes < ActiveRecord::Migration
|
||||
def up
|
||||
execute <<-SQL
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class TruncateActivityFeed < ActiveRecord::Migration
|
||||
def up
|
||||
ActivityFeed.destroy_all
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddDescriptionToProducts < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :products, :description, :text
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class RemoveIsTemplateFromProducts < ActiveRecord::Migration
|
||||
def up
|
||||
remove_column :products, :is_template
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddBuildListPriority < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :build_lists, :priority, :integer, :null => false, :default => 0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class AddDeviseLockable < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :failed_attempts, :integer, :default => 0 # Only if lock strategy is :failed_attempts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# encoding: UTF-8
|
||||
# -*- encoding : utf-8 -*-
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
|
|
|
@ -18,5 +18,7 @@ Add to /etc/rc.d/rc.sysinit
|
|||
fi
|
||||
|
||||
=== Tips
|
||||
gem install charlock_holmes -- --with-icu-dir=/opt/local
|
||||
sudo urpmi lib64icu-devel # mandriva
|
||||
gem install charlock_holmes -- --with-icu-dir=/opt/local # macports
|
||||
|
||||
git config --global core.quotepath false
|
||||
|
|
|
@ -17,9 +17,12 @@
|
|||
<div class="middle">
|
||||
<!--Main menu-->
|
||||
<menu>
|
||||
<div class="logo">
|
||||
<a href="#"><img src="pics/logo-mini.png" alt="Главная" /></a>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" class="first">Главная</a>
|
||||
<a href="#">Главная</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Проекты</a>
|
||||
|
@ -37,9 +40,6 @@
|
|||
<a href="#">Документация</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="logo">
|
||||
<img src="pics/logo-mini.png" alt="logo" />
|
||||
</div>
|
||||
</menu>
|
||||
<div class="information">
|
||||
<!--Search-->
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Сборочная среда</title>
|
||||
<script type="text/javascript" src="js/html5shiv.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="styles/main.css" />
|
||||
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/all.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<!--Top block-->
|
||||
<header>
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="middle">
|
||||
<!--Main menu-->
|
||||
<menu>
|
||||
<div class="logo">
|
||||
<a href="#"><img src="pics/logo-mini.png" alt="Главная" /></a>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">Главная</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Проекты</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Группы</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Мониторинг</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Платформа</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Документация</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</menu>
|
||||
<div class="information">
|
||||
<!--Search-->
|
||||
<div class="search">
|
||||
<div class="pic">
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="text" value="Поиск" class="gray" onClick="if(this.value=='Поиск'){this.value='';this.className='black';}" onblur="if(this.value==''){this.value='Поиск';this.className='gray';}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user">
|
||||
<div class="avatar" onclick="droplist();">
|
||||
<img src="pics/ava.png" alt="avatar" height="30" />
|
||||
</div>
|
||||
<div class="profile" onclick="droplist();">
|
||||
<a href="#" onclick="droplist();">mikimaus <img src="pics/expand-white.png" alt="ex" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="both">
|
||||
</div>
|
||||
|
||||
<div class="droplist-wrap">
|
||||
<div class="droplist" id="droplist">
|
||||
<div class="a"><a href="#">Публичный профиль</a></div>
|
||||
<div class="a"><a href="#">Настройки</a></div>
|
||||
<div class="a"><a href="#">Выйти</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
<div class="both">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="both">
|
||||
</div>
|
||||
|
||||
<!--Page-->
|
||||
<article>
|
||||
<!--Single page content-->
|
||||
<div class="all error500">
|
||||
|
||||
<h1>Ошибка <span>500</span></h1>
|
||||
<h2>Что-то пошло не так.<br />
|
||||
Мы были уведомлены об этом<br />
|
||||
и скоро посмотрим что случилось.</h2>
|
||||
<p class="pages">
|
||||
Попробуйте открыть другие страницы.
|
||||
</p>
|
||||
<p class="search">
|
||||
Или воспользуйтесь поиском.
|
||||
</p>
|
||||
<div class="both"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="both">
|
||||
</div>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
<!--Footer-->
|
||||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
ROSA Лаб. © 2012 <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<img src="pics/flag.png" alt="rosa" /> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">О компании</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Контакты</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Условия использования</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Конфиденциальность</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Безопасность</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Сборочная среда</title>
|
||||
<script type="text/javascript" src="js/html5shiv.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="styles/main.css" />
|
||||
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/all.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap tmargin30">
|
||||
|
||||
<!--Page-->
|
||||
<article>
|
||||
<!--Single page content-->
|
||||
<div class="all error503">
|
||||
|
||||
<h1>Ведутся <span>работы</span></h1>
|
||||
<h2>Мы обновляем сайт, это займет еще некоторое время.<br />
|
||||
Нажмите <span>F5</span>, если это не помогло, значит,<br />
|
||||
нужно еще чуточку подождать.<br />
|
||||
<br />
|
||||
Мы правда пытаемся сделать это быстро и<br />
|
||||
приносим свои извинения за возможные неудобства.</h2>
|
||||
<div class="both"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="both">
|
||||
</div>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
<!--Footer-->
|
||||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
ROSA Лаб. © 2012 <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<img src="pics/flag.png" alt="rosa" /> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">О компании</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Контакты</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Условия использования</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Конфиденциальность</a> <img src="pics/square.png" alt="_" />
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">Безопасность</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue