Merge branch '3.2-master' into 265-new_design_for_activity_feed

Conflicts:
	app/models/user.rb
This commit is contained in:
Alexander Machehin 2012-03-07 03:58:35 +06:00
commit 7588a318da
89 changed files with 1802 additions and 556 deletions

View File

@ -8,7 +8,7 @@ gem 'redhillonrails_core', :git => 'git://github.com/chipiga/redhillonrails_core
# gem 'schema_plus', '~> 0.2.1' # buggy shit!
gem 'devise', '~> 2.0.4'
gem 'omniauth', '~> 1.0.2'
gem 'omniauth', '~> 1.0.3'
gem 'omniauth-openid', '~> 1.0.1'
gem 'cancan', '~> 1.6.7'
@ -36,7 +36,7 @@ gem 'newrelic_rpm', '~> 3.3.2'
gem 'rails3-jquery-autocomplete', '~> 1.0.6'
gem 'will_paginate', '~> 3.0.3'
gem 'meta-tags', '~> 1.2.4', :require => 'meta_tags'
gem 'meta-tags', '~> 1.2.5', :require => 'meta_tags'
gem "haml-rails", '~> 0.3.4'
gem 'jquery-rails', '~> 2.0.1'
@ -50,7 +50,7 @@ end
group :production do
gem "airbrake", '~> 3.0.9'
gem 'bluepill', '~> 0.0.59', :require => false
gem 'bluepill', '~> 0.0.60', :require => false
gem 'daemons', '1.1.6' # for DJ
end

View File

@ -62,7 +62,7 @@ GEM
activerecord (>= 2.2.2)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bluepill (0.0.59)
bluepill (0.0.60)
activesupport (>= 3.0.0)
daemons (~> 1.1.4, <= 1.1.6)
i18n (>= 0.5.0)
@ -145,7 +145,7 @@ GEM
json (1.6.5)
kgio (2.7.2)
libv8 (3.3.10.4)
mail (2.4.1)
mail (2.4.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@ -158,7 +158,7 @@ GEM
skinny (~> 0.2)
sqlite3 (~> 1.3)
thin (~> 1.2)
meta-tags (1.2.4)
meta-tags (1.2.6)
actionpack
mime-types (1.17.2)
multi_json (1.1.0)
@ -172,7 +172,7 @@ GEM
net-ssh (>= 1.99.1)
newrelic_rpm (3.3.2)
nokogiri (1.5.0)
omniauth (1.0.2)
omniauth (1.0.3)
hashie (~> 1.2)
rack
omniauth-openid (1.0.1)
@ -188,7 +188,7 @@ GEM
polyglot (0.3.3)
posix-spawn (0.3.6)
rack (1.4.1)
rack-cache (1.1)
rack-cache (1.2)
rack (>= 0.4)
rack-openid (1.3.1)
rack (>= 1.1.0)
@ -275,7 +275,7 @@ GEM
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
tzinfo (0.3.32)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
@ -300,7 +300,7 @@ DEPENDENCIES
RedCloth
airbrake (~> 3.0.9)
ancestry (~> 1.2.4)
bluepill (~> 0.0.59)
bluepill (~> 0.0.60)
cancan (~> 1.6.7)
cape
capistrano
@ -320,9 +320,9 @@ DEPENDENCIES
hirb
jquery-rails (~> 2.0.1)
mailcatcher
meta-tags (~> 1.2.4)
meta-tags (~> 1.2.5)
newrelic_rpm (~> 3.3.2)
omniauth (~> 1.0.2)
omniauth (~> 1.0.3)
omniauth-openid (~> 1.0.1)
paperclip (~> 2.7.0)
pg (~> 0.13.2)

View File

@ -7,35 +7,35 @@
//= require_tree ./extra
//= require_self
// function disableNotifierCbx(global_cbx) {
// if ($(global_cbx).attr('checked')) {
// $('.notify_cbx').removeAttr('disabled');
// $('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); })
// } else {
// $('.notify_cbx').attr('disabled', 'disabled');
// $('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); })
// }
// }
//
// $(document).ready(function() {
// $('input.user_role_chbx').click(function() {
// var current = $(this);
// current.parent().find('input.user_role_chbx').each(function(i,el) {
// if ($(el).attr('id') != current.attr('id')) {
// $(el).removeAttr('checked');
// }
// });
// });
//
// $('#settings_notifier_can_notify').click(function() {
// disableNotifierCbx($(this));
// });
//
// $('div.information > div.user').live('click', function() {
// droplist();
// });
//
// $('div.information > div.profile > a').live('click', function(e) {
// e.preventDefault();
// });
// });
function disableNotifierCbx(global_cbx) {
if ($(global_cbx).attr('checked')) {
$('.notify_cbx').removeAttr('disabled');
$('.notify_cbx').each(function(i,el) { $(el).prev().removeAttr('disabled'); })
} else {
$('.notify_cbx').attr('disabled', 'disabled');
$('.notify_cbx').each(function(i,el) { $(el).prev().attr('disabled', 'disabled'); })
}
}
$(document).ready(function() {
$('input.user_role_chbx').click(function() {
var current = $(this);
current.parent().find('input.user_role_chbx').each(function(i,el) {
if ($(el).attr('id') != current.attr('id')) {
$(el).removeAttr('checked');
}
});
});
$('#settings_notifier_can_notify').click(function() {
disableNotifierCbx($(this));
});
$('div.information > div.user').live('click', function() {
droplist();
});
$('div.information > div.profile > a').live('click', function(e) {
e.preventDefault();
});
});

View File

@ -1,11 +1,11 @@
jQuery(document).ready(function(){
//var params = {
// changedEl: ".lineForm select",
// visRows: 999999,
// scrollArrows: false
// }
//
// cuSel(params);
var params = {
changedEl: ".lineForm select",
visRows: 999999,
scrollArrows: false
}
cuSel(params);
});
});

View File

@ -119,8 +119,7 @@ $(document).ready(function() {
url: $(this).attr("action"),
data: $(this).serialize(),
success: function(data){
var tmp = $('#create_issue_'+ which +'_list');
$('#create_issue_'+ which +'_list').html(data);
$('#manage_issue_'+ which +'_list').html(data);
},
error: function(data){
alert('error') // TODO remove
@ -132,20 +131,23 @@ $(document).ready(function() {
function remExecutor(form) {
var el = form.find('.people.selected.remove_executor');
var id = el.attr('id');
$('#'+id+'.add_executor.people.selected').removeClass('select');
$('#manage_issue_users_list .add_executor.people.selected').removeClass('select');
el.remove();
}
$('.add_executor.people.selected').live('click', function() {
var form = $('.form.issue');
form.find('#people-span').fadeOut(0);
remExecutor(form);
form.find('#issue_executor').html($(this).clone().removeClass('add_executor').addClass('remove_executor'));
var form_new = $('form.issue');
var form_edit = $('form.edit_form.issue');
form_new.find('#people-span').fadeOut(0);
remExecutor(form_new);
var clone = $(this).clone().removeClass('add_executor').addClass('remove_executor');
form_new.find('#issue_executor').html(clone);
$('.current_executor').html(clone.removeClass('select'));
$(this).addClass('select');
});
$('.remove_executor.people.selected').live('click', function() {
var form = $('.form.issue');
var form = $('form.issue, form.edit_form issue');
form.find('#people-span').fadeIn(0);
remExecutor(form);
});
@ -165,23 +167,28 @@ $(document).ready(function() {
var style = $(this).find('.flag').attr('style');
$(this).find('.flag').fadeOut(0);
$(this).find('.labeltext.selected').attr('style', style);
var form = $('.form.issue');
form.find('#flag-span').fadeOut(0);
form.find('#issue_labels').append($(this).clone());
var form_new = $('form.form.issue');
var clone = $(this).clone();
form_new.find('#flag-span').fadeOut(0);
form_new.find('#issue_labels').append(clone);
var labels = $('#active_labels');
labels.find('#'+$(this).attr('id')).remove();
labels.append(clone);
});
$('.remove_label.label.selected').live('click', function() {
var id = $(this).attr('id');
$('.current_labels, #active_labels').find('#'+id+'.label.selected.remove_label').remove();
var form = $('.form.issue');
if(form.find('.remove_label.label.selected').length == 1) {
form.find('#flag-span').fadeIn(0);
}
var str = '.label.remove_label'+'#'+$(this).attr('id');
var str = '.label.remove_label'+'#'+id;
form.find(str).remove();
var label = $(str);
label.removeClass('selected').addClass('add_label').removeClass('remove_label');
label.find('.labeltext.selected').attr('style', '').removeClass('selected');
label.find('.flag').fadeIn(0);
});
$('.issue_status.switch_issue_status').live('click', function () {
@ -228,10 +235,57 @@ $(document).ready(function() {
$('.fulltext.view.issue_body').html(form.find('#issue_body').attr('value'));
},
error: function(data){
alert('error') // TODO remove
alert('error'); // TODO remove
}
});
return false;
});
$('.button.manage_executor').live('click', function() {
$('form#search_user, .button.update_executor').fadeIn(0);
$('.current_executor .people').addClass('remove_executor selected');
$(this).fadeOut(0);
});
$('.button.manage_labels').live('click', function() {
$('form#search_labels, .button.update_labels').fadeIn(0);
$(this).fadeOut(0);
});
$('.button.update_executor').live('click', function() {
var form = $('form.edit_executor.issue');
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
$('form#search_user, .button.update_executor').fadeOut(0);
$('.button.manage_executor').fadeIn(0);
$('#manage_issue_users_list').html('');
},
error: function(data){
alert('error'); // TODO remove
}
});
return false;
});
$('.button.update_labels').live('click', function() {
var form = $('form.edit_labels.issue');
$.ajax({
type: 'POST',
url: form.attr("action"),
data: form.serialize(),
success: function(data){
$('form#search_labels, .button.update_labels').fadeOut(0);
$('.button.manage_labels').fadeIn(0);
$('#manage_issue_labels_list').html('');
},
error: function(data){
alert('error'); // TODO remove
}
});
return false;
});
});

View File

@ -20,4 +20,16 @@ $(document).ready(function() {
$(this).addClass('registartion-input-no-focus').removeClass('registartion-input-focus');
});
$('#niceCheckbox1').click(function() {
var el = $(this),
input = el.find('input[type="checkbox"]');
if(input.attr("checked")) {
el.css('backgroundPosition', '0 0');
input.removeAttr('checked');
} else {
el.css('backgroundPosition', '0 -18px');
input.attr('checked', true);
}
return true;
});
});

View File

@ -1,5 +1,9 @@
// PUT custom styles here ONLY
span.error {
display: none;
}
a#manage-labels {
margin-bottom: 10px;
}
@ -323,3 +327,117 @@ table.tablesorter tr td.centered {
header div.user div.avatar img {
border: 1px solid #DDDDDD;
}
div.blame_data {
font-size: 80%;
}
div.blame_data tr.firstrow {
border-top: 1px solid #DDDDDD;
}
div.blame_data tr td.commit_info {
padding: 0.5em !important;
vertical-align: top;
width: 210px;
border-right: 1px solid #DDDDDD;
}
div.blame_data tr td.commit_info .date {
display: block;
float: left;
color: #666666;
}
div.blame_data tr td.commit_info .message {
width: 210px;
display: block;
float: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
}
div.blame_data tr td.lines {
padding: 0 0.5em !important;
width: 1%;
font-size: 12px;
line-height: 1.4em;
}
div.blame_data tr td.code {
padding: 0 10px !important;
font-size: 12px;
}
div.blame_data tr td.code pre {
padding: 0;
margin: 0;
}
// Search
p.block { margin-bottom: 10px; clear: both; }
table.tablesorter.bmargin5 {
th { padding: 5px; }
td p.block {margin-bottom: 0px;}
}
div#gollum-searchbar-fauxtext {
padding-left: 10px;
}
div#gollum-searchbar-fauxtext input#search-query {
display: inline-block;
float: left;
width: 145px;
border: 1px solid #D3D3D3;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
font-size: 12px;
height: 24px;
margin: 0;
padding: 0 4px;
vertical-align: middle;
white-space: nowrap;
}
a#search-submit {
-moz-box-sizing: content-box;
border-left: medium none;
border-radius: 0 3px 3px 0;
height: 24px;
margin-left: 0;
padding: 0;
position: relative;
vertical-align: middle;
display: inline-block;
float: left;
}
a#search-submit span {
background: image-url("gollum/icon-sprite.png") no-repeat scroll 50% 4px transparent;
background-position: -430px -2px;
height: 24px;
text-indent: -9999px;
width: 16px;
display: block;
height: 21px;
line-height: 21px;
padding: 0 9px 0 7px;
}
a#search-submit:hover span {
background-position: -430px -29px;
}
table.wiki .history .td2 .name span.username {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 164px;
}

View File

@ -45,7 +45,7 @@ class ApplicationController < ActionController::Base
end
def layout_by_resource
if devise_controller?
if devise_controller? && !(params[:controller] == 'devise/registrations' && params[:action] == 'edit')
"sessions"
else
"application"

View File

@ -57,15 +57,18 @@ class IssuesController < ApplicationController
end
def update
if status = params[:issue][:status]
if params[:issue] && status = params[:issue][:status]
action = 'issues/_status'
@issue.set_close(current_user) if status == 'closed'
@issue.set_open if status == 'open'
status = 200 if @issue.save
render action, :status => (status || 500), :layout => false
else
elsif params[:issue]
@issue.labelings.destroy_all if params[:issue][:labelings_attributes] # FIXME
status = 200 if @issue.update_attributes(params[:issue])
render :nothing => true, :status => (status || 500), :layout => false
else
render :nothing => true, :status => 200, :layout => false
end
end

View File

@ -83,7 +83,7 @@ class RepositoriesController < ApplicationController
@projects = Project.joins(owner_subquery).addable_to_repository(@repository.id)
@projects = @projects.paginate(:page => (params[:iDisplayStart].to_i/params[:iDisplayLength].to_i).to_i + 1, :per_page => params[:iDisplayLength])
@projects = @projects.by_visibilities(['open']) if @repository.platform.platform_type == 'main'
@projects = @projects.by_visibilities('open') if @repository.platform.platform_type == 'main'
@total_projects = @projects.count
@projects = @projects.where(['projects.name LIKE ?', "#{params[:sSearch]}%"]) if params[:sSearch] and !params[:sSearch].empty?

View File

@ -0,0 +1,25 @@
# -*- encoding : utf-8 -*-
class SearchController < ApplicationController
before_filter :authenticate_user!
# load_and_authorize_resource
def index
params[:type] ||= 'all'
case params[:type]
when 'all'
find_collection('projects')
find_collection('users')
find_collection('groups')
find_collection('platforms')
when 'projects', 'users', 'groups', 'platforms'
find_collection(params[:type])
end
end
protected
def find_collection(type)
var = :"@#{type}"
instance_variable_set var, type.classify.constantize.search(params[:query]).paginate(:page => params[:page]) unless instance_variable_defined?(var)
end
end

View File

@ -1,7 +1,5 @@
# -*- encoding : utf-8 -*-
class Settings::NotifiersController < ApplicationController
layout "sessions"
before_filter :authenticate_user!
load_and_authorize_resource :user

View File

@ -1,7 +1,6 @@
# -*- encoding : utf-8 -*-
class UsersController < ApplicationController
before_filter :authenticate_user!
before_filter :find_user, :only => [:show, :edit, :update, :destroy]
load_and_authorize_resource
autocomplete :user, :uname
@ -19,7 +18,6 @@ class UsersController < ApplicationController
def show
@groups = @user.groups.uniq
@platforms = @user.platforms.paginate(:page => params[:platform_page], :per_page => 10)
# @repositories = @user.repositories.paginate(:page => params[:repository_page], :per_page => 10)
@projects = @user.projects.paginate(:page => params[:project_page], :per_page => 10)
end
@ -42,13 +40,30 @@ class UsersController < ApplicationController
end
def update
@user.role = params[:user][:role]
if @user.update_attributes(params[:user])
if params[:user][:role] && current_user.admin?
@user.role = params[:user][:role]
params[:user].delete(:role)
end
if @user.update_without_password(params[:user])
flash[:notice] = t('flash.user.saved')
redirect_to users_path
redirect_to edit_user_path(@user)
else
flash[:error] = t('flash.user.save_error')
render :action => :edit
flash[:warning] = @user.errors.full_messages.join('. ')
render(:action => :edit)
end
end
def private
if request.put?
if @user.update_with_password(params[:user])
flash[:notice] = t('flash.user.saved')
redirect_to user_private_settings_path(@user)
else
flash[:error] = t('flash.user.save_error')
flash[:warning] = @user.errors.full_messages.join('. ')
render(:action => :private)
end
end
end
@ -58,9 +73,4 @@ class UsersController < ApplicationController
redirect_to users_path
end
protected
def find_user
@user = User.find(params[:id])
end
end

View File

@ -41,4 +41,10 @@ module CommitHelper
truncate(message, :length => 42, :omission => "...").encode_to_default
end
def commit_author_link(author)
name = author.name.encode_to_default
email = author.email
u = User.where(:email => email).first
u.present? ? link_to(name, user_path(u)) : mail_to(email, name)
end
end

View File

@ -0,0 +1,14 @@
# -*- encoding : utf-8 -*-
module UsersHelper
def avatar_url(user, size = :small)
if user.avatar?
user.avatar.url(size)
else
gravatar_url(user.email, user.avatar.styles[size].geometry.split('x').first)
end
end
def gravatar_url(email, size = 30)
"https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.downcase)}?s=#{size}&r=pg"
end
end

View File

@ -17,10 +17,6 @@ module WikiHelper
end
end
def gravatar_url(email, size = 16)
"https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.downcase)}?s=#{size}&r=pg"
end
def escaped_name
CGI.escape(@name)
end

View File

@ -34,6 +34,7 @@ class Ability
if user.user?
can [:show, :autocomplete_user_uname], User
can [:edit, :update, :private], User, :id => user.id
can [:show, :update], Settings::Notifier, :user_id => user.id

View File

@ -17,8 +17,9 @@ class Group < ActiveRecord::Base
validates :uname, :presence => true, :uniqueness => {:case_sensitive => false}, :format => { :with => /^[a-z0-9_]+$/ }
validate { errors.add(:uname, :taken) if User.where('uname LIKE ?', uname).present? }
scope :by_owner, lambda { |owner| where(:owner_id => owner.id) }
scope :by_admin, lambda { |admin| joins(:relations).where(:'relations.role' => 'admin', :'relations.target_id' => admin.id, :'relations.target_type' => 'User') }
scope :search, lambda {|q| where("uname ILIKE ?", "%#{q}%")}
scope :by_owner, lambda {|owner| where(:owner_id => owner.id)}
scope :by_admin, lambda {|admin| joins(:relations).where(:'relations.role' => 'admin', :'relations.target_id' => admin.id, :'relations.target_type' => 'User')}
attr_readonly :own_projects_count

View File

@ -9,7 +9,7 @@ class Issue < ActiveRecord::Base
has_many :comments, :as => :commentable, :dependent => :destroy #, :finder_sql => proc { "comments.commentable_id = '#{self.id}' AND comments.commentable_type = '#{self.class.name}'"}
has_many :subscribes, :as => :subscribeable, :dependent => :destroy #, :finder_sql => proc { "subscribes.subscribeable_id = '#{self.id}' AND subscribes.subscribeable_type = '#{self.class.name}'"}
has_many :labels, :through => :labelings
has_many :labels, :through => :labelings, :uniq => true
has_many :labelings
validates :title, :body, :project_id, :presence => true
@ -20,7 +20,7 @@ class Issue < ActiveRecord::Base
after_create :subscribe_users
after_update :subscribe_issue_assigned_user
attr_accessible :labelings_attributes, :title, :body
attr_accessible :labelings_attributes, :title, :body, :user_id
accepts_nested_attributes_for :labelings, :allow_destroy => true
scope :opened, where(:status => 'open', :closed_by => nil, :closed_at => nil)

View File

@ -26,7 +26,8 @@ class Platform < ActiveRecord::Base
after_destroy lambda { umount_directory_for_rsync unless hidden? }
after_update :update_owner_relation
scope :by_visibilities, lambda {|v| {:conditions => ['visibility in (?)', v.join(',')]}}
scope :search, lambda {|q| where("name ILIKE ?", "%#{q}%").open}
scope :by_visibilities, lambda {|v| where(:visibility => v)}
scope :open, where(:visibility => 'open')
scope :hidden, where(:visibility => 'hidden')
scope :main, where(:platform_type => 'main')

View File

@ -30,8 +30,10 @@ class Project < ActiveRecord::Base
attr_readonly :name
scope :recent, order("name ASC")
scope :search, lambda {|q| by_name("%#{q}%").open}
scope :by_name, lambda {|name| where('projects.name ILIKE ?', name)}
scope :by_visibilities, lambda {|v| {:conditions => ['visibility in (?)', v.join(',')]}}
scope :by_visibilities, lambda {|v| where(:visibility => v)}
scope :open, where(:visibility => 'open')
scope :addable_to_repository, lambda { |repository_id| where("projects.id NOT IN (SELECT project_to_repositories.project_id FROM project_to_repositories WHERE (project_to_repositories.repository_id = #{ repository_id }))") }
scope :automateable, where("projects.id NOT IN (SELECT auto_build_lists.project_id FROM auto_build_lists)")

View File

@ -4,12 +4,14 @@ class User < ActiveRecord::Base
LANGUAGES_FOR_SELECT = [['Russian', 'ru'], ['English', 'en']]
LANGUAGES = LANGUAGES_FOR_SELECT.map(&:last)
has_attached_file :avatar, :styles => { :micro => "16x16", :small => "30x30>", :medium => "40x40>", :big => "81x81" }
devise :database_authenticatable, :registerable, #:omniauthable, # :token_authenticatable, :encryptable, :timeoutable
:recoverable, :rememberable, :validatable #, :trackable, :confirmable, :lockable
has_one :notifier, :class_name => 'Settings::Notifier' #:notifier
has_one :notifier, :class_name => 'Settings::Notifier', :dependent => :destroy #:notifier
has_many :activity_feeds
has_many :activity_feeds, :dependent => :destroy
has_many :authentications, :dependent => :destroy
has_many :build_lists, :dependent => :destroy
@ -17,7 +19,7 @@ class User < ActiveRecord::Base
has_many :comments, :dependent => :destroy
has_many :relations, :as => :object, :dependent => :destroy
has_many :targets, :as => :object, :class_name => 'Relation'
has_many :targets, :as => :object, :class_name => 'Relation', :dependent => :destroy
has_many :projects, :through => :targets, :source => :target, :source_type => 'Project', :autosave => true
has_many :groups, :through => :targets, :source => :target, :source_type => 'Group', :autosave => true
@ -31,16 +33,18 @@ class User < ActiveRecord::Base
validates :uname, :presence => true, :uniqueness => {:case_sensitive => false}, :format => { :with => /^[a-z0-9_]+$/ }
validate { errors.add(:uname, :taken) if Group.where('uname LIKE ?', uname).present? }
#validates :ssh_key, :uniqueness => true, :allow_blank => true
validates :role, :inclusion => {:in => ROLES}, :allow_blank => true
validates :language, :inclusion => {:in => LANGUAGES}, :allow_blank => true
attr_accessible :email, :password, :password_confirmation, :remember_me, :login, :name, :ssh_key, :uname, :language
attr_accessible :email, :password, :password_confirmation, :current_password, :remember_me, :login, :name, :ssh_key, :uname, :language,
:site, :company, :professional_experience, :location, :avatar
attr_readonly :uname, :own_projects_count
attr_readonly :uname
attr_accessor :login
after_create :create_settings_notifier
scope :search, lambda {|q| where("uname ILIKE ?", "%#{q}%")}
after_create lambda { self.create_notifier }
def admin?
role == 'admin'
@ -57,6 +61,7 @@ class User < ActiveRecord::Base
def fullname
return "#{uname} (#{name})"
end
class << self
def find_for_database_authentication(warden_conditions)
conditions = warden_conditions.dup
@ -79,17 +84,17 @@ class User < ActiveRecord::Base
end
end
def update_with_password(params={})
params.delete(:current_password)
# self.update_without_password(params) # Don't allow password update
if params[:password].blank?
params.delete(:password)
params.delete(:password_confirmation) if params[:password_confirmation].blank?
end
result = update_attributes(params)
clean_up_passwords
result
end
# def update_with_password(params={})
# params.delete(:current_password)
# # self.update_without_password(params) # Don't allow password update
# if params[:password].blank?
# params.delete(:password)
# params.delete(:password_confirmation) if params[:password_confirmation].blank?
# end
# result = update_attributes(params)
# clean_up_passwords
# result
# end
def commentor?(commentable)
comments.exists?(:commentable_type => commentable.class.name, :commentable_id => commentable.id.hex)
@ -99,14 +104,9 @@ class User < ActiveRecord::Base
email.downcase == commit.committer.email.downcase
end
def avatar(size)
"https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest(email.downcase)}?s=#{size}&r=pg"
end
private
def create_settings_notifier
self.create_notifier
end
end

View File

@ -50,7 +50,7 @@ class CommentPresenter < ApplicationPresenter
end
def header
res = link_to @user.uname, user_path(@user.uname)
res = link_to "#{@user.uname} (#{@user.name})", user_path(@user.uname)
res += ' ' + t("layout.comments.has_commented")
end

View File

@ -30,7 +30,7 @@
.lefter= t("layout.build_lists.ownership.index")
.both
%br
= f.submit t("layout.search")
= f.submit t("layout.search.header")
.block
%h3.small= t("activerecord.attributes.build_list.status")
.lineForm.aside= f.select :status, BuildList::STATUSES.collect{|status| [BuildList.human_status(status), status]}, {:include_blank => true, :selected => @filter.status}, {:class => 'sel80 aside', :id => 'status', :tabindex => 2}
@ -52,4 +52,4 @@
= f.text_field :bs_id
%br
%br
= f.submit t("layout.search")
= f.submit t("layout.search.header")

View File

@ -19,7 +19,7 @@
= check_box_tag "user_remove[#{user.id}][]"
%td
.img
= image_tag(gravatar_url(user.email))
= image_tag avatar_url(user)
.forimg= link_to "#{user.uname} (#{user.name})", user_path(user)
- Relation::ROLES.each_with_index do |role, i|
%td

View File

@ -1,79 +1,12 @@
#block-signup.block
%h2= title (t("devise.registrations.edit") + ' ' + resource_name.to_s.humanize)
.content
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
- if resource.errors.present?
.flash
.message.error= resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
%h3.fix.bpadding10= @user.uname
.group.wat-cf
.left
= f.label :uname, :class => "label"
.right
= f.text_field :uname, :class => "text_field", :disabled => true
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
= render :partial => "users/form", :locals => {:f => f}
.group.wat-cf
.left
= f.label :email, :class => "label"
.right
= f.text_field :email, :class => "text_field"
.notify
%p= t('layout.users.public_data_edit_warning')
.group.wat-cf
.left
= f.label :name, :class => "label"
.right
= f.text_field :name, :class => "text_field"
:javascript
$('article .right').addClass('middlepadding');
.group.wat-cf
.left
= f.label :ssh_key, :class => "label"
.right
= f.text_area :ssh_key, :class => "text_area"
.group.wat-cf
.left
= f.label :role, t("activerecord.attributes.user.role"), :class => :label
.right
- if current_user.admin?
= f.select :role, User::ROLES.push(""), :selected => resource.role
- else
= resource.role
.group.wat-cf
.left
= f.label :language, :class => "label"
.right
= f.select :language, User::LANGUAGES_FOR_SELECT
/ .group.wat-cf
/ .left
/ = f.label :current_password, :class => "label"
/ .right
/ = f.password_field :current_password, :class => "text_field"
/ %span.description= t("devise.registrations.current_password_description")
.group.wat-cf
.left
= f.label :password, :class => "label"
.right
= f.password_field :password, :class => "text_field"
%span.description= t("devise.registrations.edit_password_description")
.group.wat-cf
.left
= f.label :password_confirmation, :class => "label"
.right
= f.password_field :password_confirmation, :class => "text_field"
.group.navform.wat-cf
%button.button{:type => "submit"}
= image_tag("choose.png", :alt => t("devise.registrations.signed_up"))
= t("layout.save")
= 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"
.group.navform.wat-cf
= link_to t('layout.settings.notifier'), user_settings_notifier_path(current_user)#, :class => "text_button_padding link_button"
- content_for :sidebar, render('users/sidebar')

View File

@ -20,7 +20,7 @@
.registration
.remember
.check
%span#niceCheckbox1.niceCheck{:onclick => "changeCheck(this)"}
%span#niceCheckbox1.niceCheck
= f.check_box :remember_me
.text=t('devise.sessions.remember_me')
.in=f.submit t('layout.devise.shared_links.sign_in'), :class => 'button', :id => 'btnLogin'

View File

@ -0,0 +1,41 @@
%table.table.blame
- index = 1
- @blame.each do |elem|
%tr.firstrow
%td.commit_info{ :rowspan => elem[1].length, :nowrap => 'nowrap' }
%code
#{link_to shortest_hash_id(elem[0].id), commit_path(@project, elem[0].id)} #{t('layout.by')}
- author = elem[0].author
- committer = elem[0].committer
= commit_author_link(author)
- if author.email != committer.email
(#{commit_author_link(committer)})
%br
%span.date= commit_date(elem[0].committed_date)
%span.message{:title => elem[0].message.encode_to_default}= short_commit_message(elem[0].message)
%td.lines
= index
- index += 1
%td.code.cm-s-default
%pre
%div= elem[1].first.encode_to_default
- elem[1][1..-1].each do |line|
%tr
%td.lines
= index
- index += 1
%td.code.cm-s-default
%pre
%div= line.encode_to_default
:javascript
$(document).ready(function() {
var $code_rows = $('.code.cm-s-default pre div');
var mode = "#{File.extname(@blob.name) == '.spec' ? 'text/x-rpm-spec' : @blob.mime_type}"
$code_rows.each(function() {
CodeMirror.runMode($(this).text().replace(/&amp;/gi, '&'), mode, this.parentElement.parentElement);
});
});

View File

@ -17,7 +17,8 @@
- if render_way == :text and can? :write, @project and @treeish.in? @project.branches.map(&:name)
= raw "#{link_to "Edit", edit_blob_path(@project, @treeish, @path) } | "
= raw "#{link_to "Raw", raw_path(@project, @treeish, @path)} | "
=# raw "#{link_to "Blame", blame_path(@project, @treeish, @path)} | "
- if render_way == :text
= raw "#{link_to "Blame", blame_path(@project, @treeish, @path)} | "
= link_to "History", commits_path(@project, @treeish, @path)
.both
.data
@ -34,7 +35,7 @@
- when :text
.gutter
= render_line_numbers(text.length)
#output.formatted
#output.formatted.cm-s-default
%pre#code
=#{render_blob(@blob)}
:preserve
@ -51,6 +52,6 @@
<br/>
:javascript
$(document).ready(function() {
var text = $('#code').innerHTML.replace(/&amp;/gi, '&');
CodeMirror.runMode(text, "#{@blob.mime_type}", document.getElementById("output"));
var text = $('#code').text().replace(/&amp;/gi, '&');
CodeMirror.runMode(text, "#{File.extname(@blob.name) == '.spec' ? 'text/x-rpm-spec' : @blob.mime_type}", document.getElementById("output"));
});

View File

@ -1,15 +1,55 @@
.block
= render :partial => 'projects/submenu'
= render :partial => 'projects/repo_block', :locals => {:project => @project}
.description
%h3= t("layout.projects.about_subheader")
%p
= @project.description
= link_to t('layout.read_more'), '#'
%h3= t("layout.projects.last_commit")
- GitPresenters::CommitAsMessagePresenter.present(@commit, :branch => @branch, :project => @project) do |presenter|
= render :partial => 'shared/feed_message', :locals => {:presenter => presenter, :item_no => 1}
.both
#repo-wrapper
%h3= t("layout.projects.files_in_project")
.files
.l
= render :partial => 'git/shared/whereami'
.both
- render_way = choose_render_way(@blob)
.file
.top
.l
= @blob.mode + ' | '
- if (render_way == :text)
- text = @blob.data.split("\n")
= "#{text.length} lines (#{text.select{|s| s.strip.length > 0}.length} sloc) | "
= "#{(@blob.size / 1024.0).round(3)} Kb"
.r
= raw "#{link_to "Normal", blob_path(@project, @treeish, @path) } | "
= raw "#{link_to "Raw", raw_path(@project, @treeish, @path)} | "
=# raw "#{link_to "Blame", blame_path(@project, @treeish, @path)} | "
= link_to "History", commits_path(@project, @treeish, @path)
.both
.blame_data
= render :partial => 'blame_table'
-#.block
= render :partial => "git/shared/navigation"
= render :partial => "git/shared/info"
- if @commit
-#- if @commit
.block
.content
.inner
= render :partial => "git/commits/commits", :object => [@commit]
.block
-#.block
.content
.inner
%h3= render_path
@ -53,4 +93,4 @@
%pre
%div= line.encode_to_default
- content_for :sidebar, render(:partial => 'git/shared/sidebar')
-#- content_for :sidebar, render(:partial => 'git/shared/sidebar')

View File

@ -1,39 +0,0 @@
-content_for :sidebar do
- if @issue.persisted?
.bordered.nopadding
%h3=t('activerecord.attributes.issue.status')
#switcher.issue_status{:class => "#{@issue.closed? ? 'switcher-off' : 'switcher'} #{can?(:write, @issue.project) ? "switch_issue_status" : ''}"}
.swleft=t('layout.issues.status.open')
.swright=t('layout.issues.status.closed')
- if can? :write, @issue.project
=form_tag [@project, @issue], :id => 'update_issue_status', :method => :put do
=hidden_field_tag "issue_status", @issue.closed? ? 'closed' : 'open', :name => "issue[status]"
.bordered.nopadding
%h3=t('layout.issues.executor')
- if @issue.persisted? && @issue.user
.bordered.nopadding
.people.nopointer
.avatar=image_tag(@issue.user.avatar(25), :alt => 'avatar')
.name="#{@issue.user.uname} (#{@issue.user.name})"
=hidden_field_tag "user-0", @issue.user.id, :name => 'user_id'
.both
- else
=form_tag search_collaborators_project_issues_path(@project), :id => 'search_user', :method => :get do
=tracker_search_field(:search_user, t('layout.issues.search_user'))
#create_issue_users_list
=render 'issues/search_collaborators'
.block
%h3=t('layout.issues.labels')
- if @issue.new_record?
=form_tag search_labels_project_issues_path(@project), :id => 'search_labels', :method => :get do
=tracker_search_field(:search_labels, t('layout.issues.search_labels'))
#create_issue_labels_list
=render 'issues/search_labels'
- else
- (@issue.labels || []).each_with_index do |label|
.label.selected.nopointer
.labeltext.selected{:style => "background: ##{label.color};"}
=label.name
.both

View File

@ -14,7 +14,8 @@
=form_tag project_issues_path(@project), :id => 'search_issue', :method => :get do
.bordered.bpadding20
=tracker_search_field(:search_issue, t('layout.issues.search'))
.bordered.nopadding
%h3.bmargin10=t('layout.issues.new')
= link_to t("layout.add"), new_project_issue_path(@project), :class => 'button' if can? :new, @project.issues.new
- if can? :new, @project.issues.new
.bordered.nopadding
%h3.bmargin10=t('layout.issues.new')
= link_to t("layout.add"), new_project_issue_path(@project), :class => 'button'
=render :partial => 'labels'

View File

@ -7,7 +7,7 @@
%div.issue_title=issue.title
.smalltext
=issue.created_at.to_s(:long)
=t("layout.issues.by") if issue.creator
=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|
@ -15,9 +15,9 @@
.both
%td.td3
.avatar
=link_to image_tag(issue.user.avatar(22), :alt => 'avatar'), user_path(issue.user) if issue.user
=link_to image_tag(avatar_url(issue.user), :alt => 'avatar'), user_path(issue.user) if issue.user
%a{:href => "#{project_issue_path @project, issue}#block-list"}
.answers
.pic= image_tag 'answers.png'
.count=issue.comments.count
.both
.both

View File

@ -0,0 +1,61 @@
-content_for :sidebar do
- can_manage = can? :write, @issue.project
- if @issue.persisted?
.bordered.nopadding
%h3=t('activerecord.attributes.issue.status')
#switcher.issue_status{:class => "#{@issue.closed? ? 'switcher-off' : 'switcher'} #{can_manage ? "switch_issue_status" : ''}"}
.swleft=t('layout.issues.status.open')
.swright=t('layout.issues.status.closed')
- if can_manage
=form_tag [@project, @issue], :id => 'update_issue_status', :method => :put do
=hidden_field_tag "issue_status", @issue.closed? ? 'closed' : 'open', :name => "issue[status]"
.bordered.nopadding
%h3=t('layout.issues.executor')
- if @issue.persisted?
-if can_manage
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_executor issue'} do |f|
.current_executor
- if @issue.user
#user-0.people
.avatar=image_tag avatar_url(@issue.user), :alt => 'avatar'
.name="#{@issue.user.uname} (#{@issue.user.name})"
=hidden_field_tag "user-0", @issue.user.id, :name => 'issue[user_id]'
.both
- else
.people.nopointer
.avatar=image_tag(@issue.user.avatar(25), :alt => 'avatar')
.name="#{@issue.user.uname} (#{@issue.user.name})"
.both
=link_to(t('layout.issues.label_manage'), '#', :class => "button tmargin10 manage_executor") if can_manage
- if can_manage
=form_tag search_collaborators_project_issues_path(@project), :id => 'search_user', :method => :get, :style => @issue.persisted? ? 'display:none' : '' do
=tracker_search_field(:search_user, t('layout.issues.search_user'))
#manage_issue_users_list
=render 'issues/search_collaborators'
=link_to(t('layout.issues.done'), '#', :class => "button tmargin10 update_executor", :style => 'display:none') if can_manage
.block
%h3=t('layout.issues.labels')
- if @issue.persisted?
- if can_manage
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_labels issue'} do |f|
.current_labels
- (@issue.labels || []).each do |label|
.label.selected{:id => "flag#{label.id}"}
.flag{:style => "display:none; background: ##{label.color}"}
.labeltext.selected{:style => "background: ##{label.color}"}=label.name
=hidden_field_tag "label-#{label.id}", label.id, :name => "issue[labelings_attributes][#{label.id}][label_id]"
.both
- else
- (@issue.labels || []).each do |label|
.label.nopointer
.labeltext.selected{:style => "background: ##{label.color};"}
=label.name
.both
=link_to(t('layout.issues.label_manage'), '#', :class => "button tmargin10 manage_labels") if can_manage
- if can_manage
=form_tag search_labels_project_issues_path(@project), :id => 'search_labels', :method => :get, :style => @issue.persisted? ? 'display:none' : '' do
=tracker_search_field(:search_labels, t('layout.issues.search_labels'))
#manage_issue_labels_list
=render 'issues/search_labels'
=link_to(t('layout.issues.done'), '#', :class => "button tmargin10 update_labels", :style => 'display:none') if can_manage

View File

@ -1,6 +1,6 @@
- (@users || []).each_with_index do |user, index|
.people.selected{:id => "user-#{index}", :class => 'add_executor'}
.avatar=image_tag(user.avatar(25), :alt => 'avatar')
.avatar= image_tag(avatar_url(user), :alt => 'avatar')
.name="#{user.uname} (#{user.name})"
=hidden_field_tag "user-#{index}", user.id, :name => 'user_id'
=hidden_field_tag "user-#{index}", user.id, :name => 'issue[user_id]'
.both

View File

@ -1,6 +1,6 @@
- (@labels || []).each_with_index do |label, index|
.add_label.label{:id => "flag#{index}"}
- (@labels || []).each do |label|
.add_label.label{:id => "flag#{label.id}"}
.flag{:style => "background: ##{label.color};"}
.labeltext=label.name
=hidden_field_tag "label-#{index}", label.id, :name => "issue[labelings_attributes][#{index}][label_id]"
=hidden_field_tag "label-#{label.id}", label.id, :name => "issue[labelings_attributes][#{label.id}][label_id]"
.both

View File

@ -3,7 +3,7 @@
#closed-comment.comment-closed{:style => 'display: block;'}
.state=t('layout.issues.status.closed')
.text
.avatar=image_tag(@issue.closer.avatar(25), :alt => 'avatar')
.avatar= image_tag(avatar_url(@issue.closer), :alt => 'avatar')
.name="#{@issue.closer.uname} (#{@issue.closer.name}) #{t('layout.issues.at')} #{@issue.closed_at.to_s(:long)}"
.both
%br/
%br/

View File

@ -1,5 +1,5 @@
-render :partial => 'projects/submenu'
-render :partial => 'issues/create_sidebar'
-render :partial => 'issues/manage_sidebar'
%h3.bpadding10= t("layout.issues.create_header")
= form_for :issue, :url => project_issues_path(@project), :html => { :class => 'form issue' } do |f|

View File

@ -1,14 +1,14 @@
-render :partial => 'projects/submenu'
-render :partial => 'issues/create_sidebar'
-render :partial => 'issues/manage_sidebar'
-content_for :right_nopadding do
dummy
%h3.issue_title=@issue.title
.activity
.top
.image
=image_tag(@issue.creator.avatar(42), :alt => 'avatar') if @issue.creator
=image_tag(avatar_url(@issue.creator, :medium), :alt => 'avatar') if @issue.creator
.text
%span.name=link_to(@issue.creator.uname, user_path(@issue.creator)) if @issue.creator
%span.name=link_to("#{@issue.creator.uname} (#{@issue.creator.name})", user_path(@issue.creator)) if @issue.creator
%br/
%span.date=@issue.created_at.to_s(:long)
%br/
@ -31,4 +31,4 @@
= render :partial => "comments/list", :locals => {:list => @issue.comments, :project => @project, :commentable => @issue}
%br
= render :partial => "comments/add", :locals => {:project => @project, :commentable => @issue}
= render :partial => "comments/add", :locals => {:project => @project, :commentable => @issue}

View File

@ -17,12 +17,9 @@
= render 'layouts/menu/top'
.logo= image_tag 'logo-mini.png', :alt => 'logo'
.information
.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"}"}
= render 'search/form'
.user
.avatar= image_tag gravatar_url(current_user.email, 30), :alt => 'avatar', :height => "30"
.avatar= image_tag avatar_url(current_user), :alt => 'avatar', :height => "30"
.profile
%a{:href => "#"}
= current_user.uname

View File

@ -17,7 +17,7 @@
= check_box_tag "user_remove[#{user.id}][]"
%td
.img
= image_tag(gravatar_url(user.email))
= image_tag avatar_url(user)
.forimg= link_to user.name, user_path(user)
- Relation::ROLES.each_with_index do |role, i|
%td

View File

@ -8,7 +8,7 @@
- if @project.is_rpm and can?(:create, @project => BuildList)
%li= link_to t("project_menu.builds"), project_build_lists_path(@project), :class => (contr == :build_lists ? 'active' : nil)
- if @project.has_issues
%li= link_to t("project_menu.tracker"), project_issues_path(@project), :class => (act == :index && contr == :issues ? 'active' : nil)
%li= link_to t("project_menu.tracker"), project_issues_path(@project), :class => (contr == :issues ? 'active' : nil)
- if @project.has_wiki
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), :class => (contr == :wiki ? 'active' : nil)
%li= link_to t("project_menu.readme"), "#" #pending

View File

@ -0,0 +1,4 @@
.search
= form_tag search_index_path, :method => 'get' do
.pic
.field= text_field_tag 'query', params[:query], :placeholder => t("layout.search.header")

View File

@ -0,0 +1,5 @@
= form_tag search_index_path, :method => 'get' do
.leftside= text_field_tag 'query', params[:query], :placeholder => t("layout.search.header"), :class => 'exsearch'
.lineForm.leftside.rmargin10= select_tag 'type', options_for_select(t('layout.search.types').invert, params[:type]), :class => 'sel80', :id => 'selSearch'
.leftside= submit_tag t("layout.search.header"), :class => 'button width100'
.both

View File

@ -0,0 +1,3 @@
%p.block
.img= image_tag 'ava-admin.png'
.forimg= link_to group.uname, group

View File

@ -0,0 +1 @@
%p.block= link_to platform.name, platform

View File

@ -0,0 +1,4 @@
%p.block
= link_to "#{project.owner.uname} / #{project.name}", project
%br
= project.description

View File

@ -0,0 +1,10 @@
- collection = instance_variable_get("@#{type}")
%table.tablesorter.bmargin5{:cellpadding => "0", :cellspacing => "0"}
%thead
%tr
%th #{t "layout.#{type}.list_header"} (#{collection.count})
%tbody
- collection.each do |c|
%tr
%td= render type.singularize, type.singularize.to_sym => c
= link_to t('layout.search.all'), search_index_path(:query => params[:query], :type => type) if collection.present?

View File

@ -0,0 +1,3 @@
%p.block
.img= image_tag avatar_url(user)
.forimg= link_to user.fullname, user

View File

@ -0,0 +1,17 @@
%h3= t 'layout.search.advanced'
= render 'form_advanced'
- if params[:type] == 'all'
#all
= render 'table', :type => 'projects'
.both
.left.width400.rmargin55
= render 'table', :type => 'users'
= render 'table', :type => 'groups'
.left.width400
= render 'table', :type => 'platforms'
- else
- collection = instance_variable_get("@#{params[:type]}")
.tmargin10{:id => params[:type]}= render :collection => collection, :partial => params[:type].to_s.underscore.singularize
%br
= will_paginate collection
.both

View File

@ -1,41 +1,90 @@
.group
= f.label :can_notify, t('activerecord.attributes.settings.notifier.can_notify'), :class => :label
= f.check_box :can_notify#, :class => 'text_field'
.group
= f.label :new_comment, t('activerecord.attributes.settings.notifier.new_comment'), :class => :label
.leftside.w25
= f.check_box :can_notify
.leftside
= f.label :can_notify, t('activerecord.attributes.settings.notifier.can_notify')
.both
%h3= t("layout.settings.notifiers.code_header")
.leftside.w25
= f.check_box :new_comment, :class => 'notify_cbx'
.group
= f.label :new_comment_reply, t('activerecord.attributes.settings.notifier.new_comment_reply'), :class => :label
.leftside
= f.label :new_comment, t('activerecord.attributes.settings.notifier.new_comment')
.both
.leftside.w25
= f.check_box :new_comment_reply, :class => 'notify_cbx'
.group
= f.label :new_issue, t('activerecord.attributes.settings.notifier.new_issue'), :class => :label
.leftside
= f.label :new_comment_reply, t('activerecord.attributes.settings.notifier.new_comment_reply')
.both
.leftside.w25
= f.check_box :new_issue, :class => 'notify_cbx'
.group
= f.label :issue_assign, t('activerecord.attributes.settings.notifier.issue_assign'), :class => :label
.leftside
= f.label :new_issue, t('activerecord.attributes.settings.notifier.new_issue')
.both
.leftside.w25
= f.check_box :issue_assign, :class => 'notify_cbx'
.group
= f.label :new_comment_commit_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_owner'), :class => :label
.leftside
= f.label :issue_assign, t('activerecord.attributes.settings.notifier.issue_assign')
.both
.leftside.w25
= f.check_box :new_comment_commit_owner, :class => 'notify_cbx'
.group
= f.label :new_comment_commit_repo_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_repo_owner'), :class => :label
.leftside
= f.label :new_comment_commit_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_owner')
.both
.leftside.w25
= f.check_box :new_comment_commit_repo_owner, :class => 'notify_cbx'
.group
= f.label :new_comment_commit_commentor, t('activerecord.attributes.settings.notifier.new_comment_commit_commentor'), :class => :label
.leftside
= f.label :new_comment_commit_repo_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_repo_owner')
.both
.leftside.w25
= f.check_box :new_comment_commit_commentor, :class => 'notify_cbx'
.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"), user_settings_notifier_path(@user), :class => "text_button_padding link_button"
.leftside
= f.label :new_comment_commit_commentor, t('activerecord.attributes.settings.notifier.new_comment_commit_commentor')
.both
%br
.leftside.w25
\ 
.leftside.w420
= submit_tag t("layout.save")
.both
:javascript
disableNotifierCbx($('#settings_notifier_can_notify'));
-#.group
-# = f.label :can_notify, t('activerecord.attributes.settings.notifier.can_notify'), :class => :label
-# = f.check_box :can_notify#, :class => 'text_field'
-#
-#.group
-# = f.label :new_comment, t('activerecord.attributes.settings.notifier.new_comment'), :class => :label
-# = f.check_box :new_comment, :class => 'notify_cbx'
-#
-#.group
-# = f.label :new_comment_reply, t('activerecord.attributes.settings.notifier.new_comment_reply'), :class => :label
-# = f.check_box :new_comment_reply, :class => 'notify_cbx'
-#
-#.group
-# = f.label :new_issue, t('activerecord.attributes.settings.notifier.new_issue'), :class => :label
-# = f.check_box :new_issue, :class => 'notify_cbx'
-#
-#.group
-# = f.label :issue_assign, t('activerecord.attributes.settings.notifier.issue_assign'), :class => :label
-# = f.check_box :issue_assign, :class => 'notify_cbx'
-#
-#.group
-# = f.label :new_comment_commit_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_owner'), :class => :label
-# = f.check_box :new_comment_commit_owner, :class => 'notify_cbx'
-#
-#.group
-# = f.label :new_comment_commit_repo_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_repo_owner'), :class => :label
-# = f.check_box :new_comment_commit_repo_owner, :class => 'notify_cbx'
-#
-#.group
-# = f.label :new_comment_commit_commentor, t('activerecord.attributes.settings.notifier.new_comment_commit_commentor'), :class => :label
-# = f.check_box :new_comment_commit_commentor, :class => 'notify_cbx'
-#
-#.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"), user_settings_notifier_path(@user), :class => "text_button_padding link_button"
-#

View File

@ -1,5 +1,20 @@
#block-signup.block
%h2= title t("layout.settings.notifiers.edit_header")
.content
= form_for @notifier, :url => user_settings_notifier_path(@user), :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}
%p
= t("layout.settings.notifiers.notice_header", :email => @user.email)
%br
= link_to t("layout.settings.notifiers.change_email_link"), edit_user_path(@user)
%br
%br/
= form_for @notifier, :url => user_settings_notifier_path(@user), :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}
:javascript
$('article .right').addClass('bigpadding');
- content_for :sidebar, render('users/sidebar')
-##block-signup.block
-# %h2= title t("layout.settings.notifiers.edit_header")
-# .content
-# = form_for @notifier, :url => user_settings_notifier_path(@user), :html => { :class => :form } do |f|
-# = render :partial => "form", :locals => {:f => f}

View File

@ -2,5 +2,4 @@
.group
= label_tag :query, t("layout.search_by_name"), :class => :label
= text_field_tag :query
%button.search{:type => "submit"}
= t("layout.search")
%button.search{:type => "submit"}= t("layout.search.header")

View File

@ -10,5 +10,5 @@
.group.navform.wat-cf
%button.button{ :type => "submit" }
= image_tag("choose.png", :alt => "Save")
= t("layout.search")
= t("layout.search.header")

View File

@ -1,22 +1,48 @@
.group
= f.label :name, t("activerecord.attributes.user.name"), :class => :label
= f.text_field :name, :class => 'text_field'
.group
= f.label :uname, t("activerecord.attributes.user.uname"), :class => :label
= f.text_field :uname, :class => 'text_field', :disabled => f.object.try(:persisted?)
.group
= f.label :email, t("activerecord.attributes.user.email"), :class => :label
= f.text_field :email, :class => 'text_field'
.group
= f.label :role, t("activerecord.attributes.user.role"), :class => :label
= f.select :role, User::ROLES, :include_blank => 'user'
.group
= f.label :ssh_key, t("activerecord.attributes.user.ssh_key"), :class => :label
= f.text_area :ssh_key, :class => 'text_area'
.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"), users_path, :class => "text_button_padding link_button"
.leftlist
= f.label :name, t("activerecord.attributes.user.name")
.rightlist
= f.text_field :name
.both
.leftlist
= f.label :email, t("activerecord.attributes.user.email")
.rightlist
= f.text_field :email
.both
.leftlist
= f.label :site, t("activerecord.attributes.user.site")
.rightlist
= f.text_field :site
.both
.leftlist
= f.label :language, t("activerecord.attributes.user.language")
.rightlist
= f.select :language, User::LANGUAGES_FOR_SELECT
.both
.leftlist
= f.label :company, t("activerecord.attributes.user.company")
.rightlist
= f.text_field :company
.both
.leftlist
= f.label :location, t("activerecord.attributes.user.location")
.rightlist
= f.text_field :location
.both
.leftlist
= f.label :avatar, t("activerecord.attributes.user.avatar")
.rightlist
= image_tag(avatar_url(@user, :medium))
%br
%br
= f.file_field :avatar
.both
.leftlist
= f.label :professional_experience, t("activerecord.attributes.user.professional_experience")
.rightlist
= f.text_area :professional_experience
.both
.leftlist
\ 
.rightlist
= submit_tag t("layout.save")
.both

View File

@ -1,5 +1,15 @@
.block.notice
%h3= t("layout.users.groups")
.content
- @user.groups.each do |group|
%p= link_to group.name, group
- act = action_name.to_sym
- contr = controller_name.to_sym
%aside
.admin-preferences
%ul
- if can? :edit, @user
%li{:class => (act == :edit && :users == contr) ? 'active' : ''}
= link_to t("layout.users.edit"), edit_user_path(@user)
- if can? :private, @user
%li{:class => (act == :private && contr == :users) ? 'active' : ''}
= link_to t("layout.users.user_private_settings"), user_private_settings_path(@user)
- if can? :show, @user.notifier
%li{:class => (act == :show && contr == :notifiers) ? 'active' : ''}
= link_to t("layout.users.settings_notifier"), user_settings_notifier_path(@user)

View File

@ -1,13 +1,19 @@
.block
.secondary-navigation
%ul.wat-cf
%li.first= link_to t("layout.users.list"), users_path
%li= link_to t("layout.users.new"), new_user_path
%li.active= link_to t("layout.users.edit"), edit_user_path
.content
%h2.title= t("layout.users.edit_header")
.inner
= form_for @user, :url => user_path(@user), :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}
%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}
.notify
%p= t('layout.users.public_data_edit_warning')
.notify
%p= t('layout.users.avatar_notice')
:javascript
$('article .right').addClass('middlepadding');
- content_for :sidebar, render('sidebar')

View File

@ -0,0 +1,28 @@
%h3.fix.bpadding10= t('layout.users.private_settings_header')
= form_for(@user, :url => user_private_settings_path(@user), :html => { :method => :put, :class => "form" }) do |f|
.leftlist
= f.label :current_password
.rightlist
= f.password_field :current_password
.both
.leftlist
= f.label :password
.rightlist
= f.password_field :password
.both
.leftlist
= f.label :password_confirmation
.rightlist
= f.password_field :password_confirmation
.both
.leftlist
\ 
.rightlist
= submit_tag t('layout.save')
.both
:javascript
$('article .right').addClass('middlepadding');
- content_for :sidebar, render('users/sidebar')

View File

@ -1,85 +1,109 @@
.block
.secondary-navigation
%ul.wat-cf
%li.first= link_to t("layout.users.list"), users_path
%li= link_to t("layout.users.new"), new_user_path
%li.active= link_to t("layout.users.show"), user_path
.content
.inner
.left
= image_tag avatar_url(current_user, :big)
.left
%h3= @user.uname
= @user.name
%br
= link_to @user.email, "mailto:#{ @user.email }"
%br
%h4= t("activerecord.attributes.user.professional_experience") + ":"
%p= @user.professional_experience
%h4= t("layout.users.public_projects_list") + ":"
%p
%b
Id
\:
= @user.id
%p
%b
= t("activerecord.attributes.user.name")
\:
= @user.name
%p
%b
= t("activerecord.attributes.user.uname")
\:
= @user.uname
%p
%b
= t("activerecord.attributes.user.email")
\:
= @user.email
%p
%b
= t("activerecord.attributes.user.created_at")
\:
= @user.created_at
.wat-cf
- if can? :edit, @user
= 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("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete")
- @user.projects.by_visibilities(['open']).each do |project|
= link_to project.name, project
%br
.block
.secondary-navigation
%ul.wat-cf
%li.first.active= link_to t("layout.platforms.list"), platforms_path
%li= link_to t("layout.platforms.new"), new_user_platform_path(@user)
.content
%h2.title
= t("layout.platforms.list_header")
.inner
= render :partial => 'shared/search_form'
= render :partial => 'platforms/list', :object => @platforms
.actions-bar.wat-cf
.actions
= will_paginate @platforms, :param_name => :platform_page
.left
%br
= link_to t("layout.users.edit"), edit_user_path(@user), :class => 'button' if can? :edit, @user
:javascript
$('article .all').addClass('verybigpadding');
-#.block
.secondary-navigation
%ul.wat-cf
%li.first.active= link_to t("layout.repositories.list"), repositories_path
%li= link_to t("layout.repositories.new"), new_user_repository_path(@user)
.content
%h2.title
= t("layout.repositories.list_header")
.inner
= render :partial => 'shared/search_form'
= render :partial => 'repositories/list', :object => @repositories
.actions-bar.wat-cf
.actions
= will_paginate @repositories, :param_name => :repository_page
.block
.secondary-navigation
%ul.wat-cf
%li.first.active= link_to t("layout.projects.list"), projects_path
%li= link_to t("layout.projects.new"), new_project_path
.content
%h2.title
= t("layout.projects.list_header")
.inner
= render :partial => 'shared/search_form'
= render :partial => 'projects/list', :object => @projects
.actions-bar.wat-cf
.actions
= will_paginate @projects, :param_name => :project_page
- content_for :sidebar, render('sidebar')
-# .secondary-navigation
-# %ul.wat-cf
-# %li.first= link_to t("layout.users.list"), users_path
-# %li= link_to t("layout.users.new"), new_user_path
-# %li.active= link_to t("layout.users.show"), user_path
-# .content
-# .inner
-# %p
-# %b
-# Id
-# \:
-# = @user.id
-# %p
-# %b
-# = t("activerecord.attributes.user.name")
-# \:
-# = @user.name
-# %p
-# %b
-# = t("activerecord.attributes.user.uname")
-# \:
-# = @user.uname
-# %p
-# %b
-# = t("activerecord.attributes.user.email")
-# \:
-# = @user.email
-# %p
-# %b
-# = t("activerecord.attributes.user.created_at")
-# \:
-# = @user.created_at
-# .wat-cf
-# - if can? :edit, @user
-# = 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("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
-# %ul.wat-cf
-# %li.first.active= link_to t("layout.platforms.list"), platforms_path
-# %li= link_to t("layout.platforms.new"), new_user_platform_path(@user)
-# .content
-# %h2.title
-# = t("layout.platforms.list_header")
-# .inner
-# = render :partial => 'shared/search_form'
-# = render :partial => 'platforms/list', :object => @platforms
-# .actions-bar.wat-cf
-# .actions
-# = will_paginate @platforms, :param_name => :platform_page
-#
-#-#.block
-# .secondary-navigation
-# %ul.wat-cf
-# %li.first.active= link_to t("layout.repositories.list"), repositories_path
-# %li= link_to t("layout.repositories.new"), new_user_repository_path(@user)
-# .content
-# %h2.title
-# = t("layout.repositories.list_header")
-# .inner
-# = render :partial => 'shared/search_form'
-# = render :partial => 'repositories/list', :object => @repositories
-# .actions-bar.wat-cf
-# .actions
-# = will_paginate @repositories, :param_name => :repository_page
-#
-#.block
-# .secondary-navigation
-# %ul.wat-cf
-# %li.first.active= link_to t("layout.projects.list"), projects_path
-# %li= link_to t("layout.projects.new"), new_project_path
-# .content
-# %h2.title
-# = t("layout.projects.list_header")
-# .inner
-# = render :partial => 'shared/search_form'
-# = render :partial => 'projects/list', :object => @projects
-# .actions-bar.wat-cf
-# .actions
-# = will_paginate @projects, :param_name => :project_page
-#
-#- content_for :sidebar, render('sidebar')

View File

@ -9,11 +9,11 @@
%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
= 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}"}
.name
= link_to user_path_by_user(user) do
%span.username= user.present? ? "#{user.uname} (#{user.name})" : v.author.name.encode_to_default
.both
%td.td3
%span.wiki-gray= "#{l v.committed_date.to_date, :format => :long}:"

View File

@ -3,4 +3,5 @@
#gollum-searchbar-fauxtext
= 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")
%span= t("wiki.search")
.both

View File

@ -15,7 +15,6 @@ en:
filtered_label: (filtered from _MAX_)
layout:
search: Search
logged_in_as: You logged as
logout: Logout
user_list: User list
@ -26,7 +25,6 @@ en:
update: Update
delete: Erase
save: Save
search: Search
clone: Clone
search_by_name: Filter by name
are_you_sure: "Sure?"
@ -43,13 +41,17 @@ en:
owner: Owner
confirm: Sure?
back: Back
processing: working ...
invalid_content_type: incorrect type
settings:
label: Settings
notifier: Notifier setting
notifiers:
edit_header: Notifier setting
processing: working ...
invalid_content_type: incorrect type
notice_header: You can receive notifies from other collaborators about changes into code of your projects. Notifies will be sent to your email %{email}.
change_email_link: Change email address
code_header: Code
devise:
shared_links:
@ -216,7 +218,7 @@ en:
attributes:
settings:
notifier:
can_notify: Notifications by e-mail
can_notify: Notifications by email
new_comment: New task comment notifications
new_comment_reply: New reply of comment notifications
new_issue: New task notifications

View File

@ -9,3 +9,5 @@ en:
enter_commit_message: Commit message
read_write_access: read & write
by: by

View File

@ -9,3 +9,5 @@ ru:
enter_commit_message: Сопровождающее сообщение
read_write_access: чтение и запись
by: ''

View File

@ -0,0 +1,12 @@
en:
layout:
search:
header: Search
advanced: Advanced search
all: Show All
types:
all: All
projects: Projects
users: Users
groups: Groups
platforms: Platforms

View File

@ -0,0 +1,12 @@
ru:
layout:
search:
header: Поиск
advanced: Расширенный поиск
all: Показать все
types:
all: Все
projects: Проекты
users: Пользователи
groups: Группы
platforms: Платформы

View File

@ -35,7 +35,6 @@ en:
unsubscribe_btn: Unsubscribe
number: Number
description: Description
by: by
labels: Labels
invalid_labels: Invalid hex color code
new_label: New label name
@ -49,6 +48,7 @@ en:
choose_labels_on_left: Choose labels on the left
at: at
cancel_button: Cancel
done: Done
flash:
issue:

View File

@ -35,7 +35,6 @@ ru:
unsubscribe_btn: Отписаться
number: Номер
description: Описание
by: ' '
labels: Метки
invalid_labels: Неверный hex код
new_label: Название новой метки
@ -49,6 +48,7 @@ ru:
choose_labels_on_left: выберите метки слева
at: в
cancel_button: Отменить
done: Обновить
flash:
issue:

View File

@ -15,7 +15,6 @@ ru:
filtered_label: (отфильтровано из _MAX_)
layout:
search: Поиск
logged_in_as: Вы вошли как
logout: Выйти
user_list: Список пользователей
@ -26,7 +25,6 @@ ru:
update: Обновить
delete: Удалить
save: Сохранить
search: Искать
clone: Клонировать
search_by_name: Фильтр по имени
are_you_sure: "Вы уверены?"
@ -43,13 +41,17 @@ ru:
owner: Владелец
confirm: Уверены?
back: Назад
processing: Обрабатывается...
invalid_content_type: имеет неверный тип
settings:
label: 'Настройки'
notifier: Настройки оповещений
notifiers:
edit_header: Настройки оповещений
processing: Обрабатывается...
invalid_content_type: имеет неверный тип
notice_header: Вы можете получать уведомления об изменениях, которые вносят другие участники, в код ваших программ. Уведомления будут высылаться на указанный вами адрес электронной почты %{email}.
change_email_link: Изменить адрес электронной почты
code_header: Код
devise:
shared_links:

View File

@ -0,0 +1,47 @@
en:
layout:
users:
list: List
new: Create
edit: Edit
new_header: New user
edit_header: Edit
list_header: Users
groups: Groups
show: User
back_to_the_list: ⇐ List of users
confirm_delete: Are you sure to remove this user?
own_projects: My projects
part_projects: Participate projects
filter_header: Filter
public_projects_list: Public projects list
public_data_edit_warning: This data is able for public profile. If you don't want to show some data, just don't fill them.
user_private_settings: Settings
settings_notifier: Notification center
delete_header: Delete aacount
delete_warning: Warning! Deleted account can not be recovered.
private_settings_header: Password change
avatar_notice: Without uploaded avatar will be used avatar from gravar web service.
activerecord:
attributes:
user:
name: Name
login: Nickname or Email
email: Email
uname: Nickname
ssh_key: SSH key
current_password: Current password
role: Role
created_at: Created
updated_at: Updated
role: System role
language: Language
password: Password
password_confirm: Confirmation
professional_experience: Professional experience
site: Web-Site
location: Location
company: Company
avatar: Avatar

View File

@ -0,0 +1,47 @@
ru:
layout:
users:
list: Список
new: Создать
edit: Редактировать
new_header: Новый пользователь
edit_header: Редактировать
list_header: Пользователи
groups: Группы
show: Пользователь
back_to_the_list: К списку пользователей
confirm_delete: Вы уверены, что хотите удалить этого пользователя?
own_projects: Мои проекты
part_projects: Участвую в проектах
filter_header: Фильтр
public_projects_list: Список публичных проектов
public_data_edit_warning: Данные доступны для публичного профиля. Если вы не хотите показывать какие-либо данные, просто не заполняйте их.
user_private_settings: Настройки
settings_notifier: Центр подписки
delete_header: Удалить аккаунт
delete_warning: Внимание! Удаленный аккаунт восстановлению не подлежит.
private_settings_header: Изменение пароля
avatar_notice: При отсутствии загруженной аватарки будет использована Ваша аватарка на сервисе gravatar.
activerecord:
attributes:
user:
name: Имя
login: Псевдоним или Email
email: Email
uname: Никнейм
ssh_key: SSH ключ
current_password: Текущий пароль
role: Роль
created_at: Создан
updated_at: Обновлен
role: Роль в системе
language: Язык
password: Пароль
password_confirm: Повторите пароль
professional_experience: Профессиональный опыт
site: Вэб-сайт
location: Местонахождение
company: Компания
avatar: Аватар

View File

@ -24,6 +24,8 @@ Rosa::Application.routes.draw do
resource :notifier, :only => [:show, :update]
end
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
resources :event_logs, :only => :index
@ -185,8 +187,6 @@ Rosa::Application.routes.draw do
end
end
resources :activity_feeds, :only => [:index]
resources :users, :groups do
resources :platforms, :only => [:new, :create]
@ -195,6 +195,10 @@ Rosa::Application.routes.draw do
# resources :repositories, :only => [:new, :create]
end
resources :activity_feeds, :only => [:index]
resources :search, :only => [:index]
match '/catalogs', :to => 'categories#platforms', :as => :catalogs
match 'product_status', :to => 'product_build_lists#status_build'

View File

@ -0,0 +1,5 @@
class AddProfessionalExperienceToUsers < ActiveRecord::Migration
def change
add_column :users, :professional_experience, :text
end
end

View File

@ -0,0 +1,7 @@
class AddSiteCompanyAndLocationToUsers < ActiveRecord::Migration
def change
add_column :users, :site, :string
add_column :users, :company, :string
add_column :users, :location, :string
end
end

View File

@ -0,0 +1,11 @@
class AddAvatarToUsers < ActiveRecord::Migration
def change
change_table :users do |t|
t.has_attached_file :avatar
end
end
def self.down
drop_attached_file :users, :avatar
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120302102734) do
ActiveRecord::Schema.define(:version => 20120303171802) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
@ -23,8 +23,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
create_table "arches", :force => true do |t|
t.string "name", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true
@ -33,8 +33,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "user_id"
t.string "provider"
t.string "uid"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
@ -45,8 +45,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "arch_id"
t.integer "pl_id"
t.integer "bpl_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "build_list_items", :force => true do |t|
@ -54,8 +54,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "level"
t.integer "status"
t.integer "build_list_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "version"
end
@ -69,8 +69,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "project_id"
t.integer "arch_id"
t.datetime "notified_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "is_circle", :default => false
t.text "additional_repos"
t.string "name"
@ -93,16 +93,16 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "name"
t.string "ancestry"
t.integer "projects_count", :default => 0, :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "comments", :force => true do |t|
t.string "commentable_type"
t.integer "user_id"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.decimal "commentable_id", :precision => 50, :scale => 0
end
@ -110,8 +110,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "name", :null => false
t.integer "project_id", :null => false
t.integer "owner_id", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "delayed_jobs", :force => true do |t|
@ -123,8 +123,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.datetime "locked_at"
t.datetime "failed_at"
t.string "locked_by"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "queue"
end
@ -136,8 +136,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "distro"
t.string "platform"
t.integer "counter", :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "event_logs", :force => true do |t|
@ -152,14 +152,14 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "controller"
t.string "action"
t.text "message"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "groups", :force => true do |t|
t.integer "owner_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "uname"
t.integer "own_projects_count", :default => 0, :null => false
t.text "description"
@ -172,8 +172,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "title"
t.text "body"
t.string "status", :default => "open"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "creator_id"
t.datetime "closed_at"
t.integer "closed_by"
@ -204,8 +204,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "description"
t.string "name"
t.integer "parent_platform_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "released", :default => false
t.integer "owner_id"
t.string "owner_type"
@ -218,8 +218,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "platform_id"
t.string "login"
t.string "password"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
end
@ -227,8 +227,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "product_id"
t.integer "status", :default => 2, :null => false
t.datetime "notified_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id"
@ -238,8 +238,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.integer "platform_id", :null => false
t.integer "build_status", :default => 2, :null => false
t.string "build_path"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.text "build_script"
t.text "counter"
t.text "ks"
@ -259,8 +259,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "name"
t.string "version"
t.datetime "file_mtime"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "platform_id"
end
@ -269,14 +269,14 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
create_table "project_to_repositories", :force => true do |t|
t.integer "project_id"
t.integer "repository_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "projects", :force => true do |t|
t.string "name"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "owner_id"
t.string "owner_type"
t.string "visibility", :default => "open"
@ -284,11 +284,11 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.text "description"
t.string "ancestry"
t.boolean "has_issues", :default => true
t.boolean "has_wiki", :default => false
t.string "srpm_file_name"
t.string "srpm_content_type"
t.integer "srpm_file_size"
t.datetime "srpm_updated_at"
t.boolean "has_wiki", :default => false
t.string "default_branch", :default => "master"
t.boolean "is_rpm", :default => true
end
@ -302,8 +302,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "token"
t.boolean "approved", :default => false
t.boolean "rejected", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "interest"
t.text "more"
end
@ -316,16 +316,16 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "object_type"
t.integer "target_id"
t.string "target_type"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "role"
end
create_table "repositories", :force => true do |t|
t.string "description", :null => false
t.integer "platform_id", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "name", :null => false
end
@ -333,8 +333,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.string "name", :null => false
t.integer "arch_id", :null => false
t.integer "project_id", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id"
@ -347,8 +347,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
t.boolean "new_comment_reply", :default => true
t.boolean "new_issue", :default => true
t.boolean "issue_assign", :default => true
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "new_comment_commit_owner", :default => true
t.boolean "new_comment_commit_repo_owner", :default => true
t.boolean "new_comment_commit_commentor", :default => true
@ -357,8 +357,8 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
create_table "subscribes", :force => true do |t|
t.string "subscribeable_type"
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "status", :default => true
t.integer "project_id"
t.decimal "subscribeable_id", :precision => 50, :scale => 0
@ -366,18 +366,26 @@ ActiveRecord::Schema.define(:version => 20120302102734) do
create_table "users", :force => true do |t|
t.string "name"
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.text "ssh_key"
t.string "uname"
t.string "role"
t.string "language", :default => "en"
t.integer "own_projects_count", :default => 0, :null => false
t.string "language", :default => "en"
t.datetime "reset_password_sent_at"
t.integer "own_projects_count", :default => 0, :null => false
t.text "professional_experience"
t.string "site"
t.string "company"
t.string "location"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true

View File

@ -40,7 +40,7 @@
</div>
<div class="in">
<a class="button disabled" id ="btnLogin" href="#" onClick="logIn();">Войти</a>
<input type="submit" id="btnLogin" onClick="logIn();" class="button disabled" value="Войти"></input>
</div>
</div>
@ -68,7 +68,10 @@
</div>
</article>
<div class="error" id="hint">
<p>Неверная пара логин/пароль.</p>
<div class="img"></div>
<div class="msg">Неверная пара логин/пароль.</div>
<div class="both">
</div>
</div>
<div class="forgot">
<div class="password">

View File

@ -323,22 +323,23 @@
<a href="#">raw</a> | <a href="#">blame</a> | <a href="#">history</a>
</div>
</div>
<div class="gutter">
<span>1</span><br />
<span>2</span><br />
<span>3</span><br />
<span>4</span><br />
<span>5</span><br />
<span>6</span><br />
<span>7</span><br />
</div>
<pre class='brush: ruby'>source 'https//rubygems.org'
<div class="data">
<div class="gutter">
<span>1</span><br />
<span>2</span><br />
<span>3</span><br />
<span>4</span><br />
<span>5</span><br />
<span>6</span><br />
<span>7</span><br />
</div>
<pre class='brush: ruby'>source 'https//rubygems.org'
gemspec
if ENV[ 'AREL']
gem 'arel', :path => ENV['AREL']
else
gem 'arel'</pre>
</div>
<div class="both"></div>
</div>
</div>

View File

@ -7,19 +7,7 @@
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="styles/registration.css" />
<script type='text/javascript' src='js/checkbox.js'></script>
<script type='text/javascript'>
function disError(elem) {
buttonCheck();
}
function buttonCheck() {
if ((document.getElementById("login").value!="")&&(document.getElementById("name").value!="")&&(document.getElementById("pass").value!="")&&(document.getElementById("pass2").value!="")&&(document.getElementById("email").value!="")) {
document.getElementById("btnLogin").className = "button";
} else {
document.getElementById("btnLogin").className = "button disabled";
}
}
</script>
<script type='text/javascript' src='js/registration.js'></script>
</head>
<body>
<div class="wrap">
@ -73,7 +61,7 @@
<div class="both"></div>
<div class="in">
<a id="btnLogin" class="button disabled" href="#">Регистрация</a>
<input type="submit" id="btnLogin" class="button disabled" value="Регистрация"></input>
</div>
@ -81,6 +69,28 @@
</article>
<div class="error login" id="hintLogin">
<div class="img"></div>
<div class="msg">Содержит только латинские буквы.</div>
<div class="both"></div>
</div>
<div class="error name" id="hintName">
<div class="img"></div>
<div class="msg">Использование спецзнаков запрещено.</div>
<div class="both"></div>
</div>
<div class="error email" id="hintEmail">
<div class="img"></div>
<div class="msg">Введенный текст не является адресом почты.<br />Или такой адрес уже зарегистирован.</div>
<div class="both"></div>
</div>
<div class="error password" id="hintPassword">
<div class="img"></div>
<div class="msg">Пароль должен содержать от 5 до 20 символов.<br />Допустимы только латинские символы, спецзнаки и цифры.<br />Или пароли не совпадают.</div>
<div class="both"></div>
</div>
</div>
<!--Footer-->
<footer>

341
doc/design/abf-search.html Normal file
View File

@ -0,0 +1,341 @@
<!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>
<link href="styles/cusel.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/cusel-2.5.js"></script>
<script type="text/javascript" src="js/cusel-init.js"></script>
<script type="text/javascript" src="js/all.js"></script>
<script type="text/javascript" src="js/exsearch.js"></script>
<link rel="stylesheet" href="styles/blue/style.css" type="text/css" id="" media="print, projection, screen" />
</head>
<body>
<div class="wrap">
<!--Top block-->
<header>
<div class="left">
</div>
<div class="middle">
<!--Main menu-->
<menu>
<ul>
<li>
<a href="#" class="first">Главная</a>
</li>
<li>
<a href="#">Проекты</a>
</li>
<li>
<a href="#">Группы</a>
</li>
<li>
<a href="#">Мониторинг</a>
</li>
<li>
<a href="#" class="active">Платформа</a>
</li>
<li>
<a href="#">Документация</a>
</li>
</ul>
<div class="logo">
<img src="pics/logo-mini.png" alt="logo" />
</div>
</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>
<div class="all">
<h3>Расширенный поиск</h3>
<div class="leftside">
<input type="text" class="exsearch gray" value="Найти..." onClick="if(this.value=='Найти...'){this.value='';this.className='exsearch black';}" onblur="if(this.value==''){this.value='Найти...';this.className='exsearch gray';}" />
</div>
<div class="lineForm leftside rmargin10">
<select class="sel80" id="selSearch" name="selSearch" tabindex="2">
<option selected="selected" value="all">Все</option>
<option value="projects">Проекты</option>
<option value="users">Пользователи и группы</option>
<option value="platforms">Платформы</option>
</select>
</div>
<div class="leftside">
<input type="submit" class="button width100" value="Найти" />
</div>
<div class="both"></div>
<div id="all" style="display: block;">
<table id="myTable" class="tablesorter bmargin5" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Проекты (10909349843874)</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4.
</p>
</td>
</tr>
<tr style="display: none;" id="row1-1">
<td>
<p>
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4.
</p>
</td>
</tr>
<tr style="display: none;" id="row1-2">
<td>
<p>
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4.
</p>
</td>
</tr>
</tbody>
</table>
<a href="#" id="projects-more" class="lmargin7">Показать все</a>
<div class="both"></div>
<div class="left width400 rmargin55">
<table id="myTable2" class="tablesorter bmargin5" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Пользователи / группы (1096)</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">jeni (Jane Conzi)</div>
</td>
</tr>
<tr>
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miki (Mike Shane)</div>
</td>
</tr>
<tr>
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">vitko (Виталий Усупов)</div>
</td>
</tr>
<tr>
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miha (Михаил Буданов)</div>
</td>
</tr>
<tr style="display: none;" id="row2-1">
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miha (Михаил Буданов)</div>
</td>
</tr>
<tr style="display: none;" id="row2-2">
<td>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miha (Михаил Буданов)</div>
</td>
</tr>
</tbody>
</table>
<a href="#" id="users-more" class="lmargin5">Показать все</a>
</div>
<div class="left width400">
<table id="myTable3" class="tablesorter bmargin5" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Платформы (96)</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="#">rosa2011</a>
</td>
</tr>
<tr>
<td>
<a href="#">rosa_lts1</a>
</td>
</tr>
<tr>
<td>
<a href="#">mandriva_2010.1</a>
</td>
</tr>
<tr>
<td>
<a href="#">rosa_tech_preview_2012</a>
</td>
</tr>
<tr style="display: none;" id="row3-1">
<td>
<a href="#">rosa_tech_preview_2012</a>
</td>
</tr>
<tr style="display: none;" id="row3-2">
<td>
<a href="#">rosa_tech_preview_2012</a>
</td>
</tr>
</tbody>
</table>
<a href="#" id="platforms-more" class="lmargin5">Показать все</a>
</div>
</div>
<div class="both"></div>
<div id="projects" style="display: none;" class="tmargin10">
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4. <br />
<br />
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4. <br />
<br />
<a href="#">santaux / WacomDrivers</a><br />
Данный проект создан с целью улучшения поддержки продукции компании Wacom под Linux. В настоящее время ощущается острая проблема с
функциональными клавишами как на пере, так и на самом дигитайзере. Особое внимание уделяется профессиональной линейке продукции,
серии Intiuos4. <br />
<br />
</div>
<div id="users" style="display: none;" class="tmargin10">
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">jeni (Jane Conzi)</div>
<div class="both"></div>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miki (Mike Shane)</div>
<div class="both"></div>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">vitko (Виталий Усупов)</div>
<div class="both"></div>
<div class="img"><img src="pics/ava-admin.png" /></div><div class="forimg">miha (Михаил Буданов)</div>
<div class="both"></div>
</div>
<div id="platforms" style="display: none;" class="tmargin10">
<a href="#">rosa2011</a><br />
<a href="#">rosa_lts1</a><br />
<a href="#">mandriva_2010.1</a><br />
<a href="#">rosa_tech_preview_2012</a>
</div>
<div class="both"></div>
</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>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true
});
</script>
</body>
</html>

45
doc/design/js/exsearch.js Normal file
View File

@ -0,0 +1,45 @@
$(document).ready(function() {
$("#selSearch").change(function() {
var selection = document.getElementById("selSearch").value;
if (selection == "all") {
$("#projects").fadeOut(0);
$("#platforms").fadeOut(0);
$("#users").fadeOut(0);
$("#all").fadeIn("fast");
}
if (selection == "projects") {
$("#all").fadeOut(0);
$("#platforms").fadeOut(0);
$("#users").fadeOut(0);
$("#projects").fadeIn("fast");
}
if (selection == "users") {
$("#all").fadeOut(0);
$("#projects").fadeOut(0);
$("#platforms").fadeOut(0);
$("#users").fadeIn("fast");
}
if (selection == "platforms") {
$("#all").fadeOut(0);
$("#projects").fadeOut(0);
$("#users").fadeOut(0);
$("#platforms").fadeIn("fast");
}
});
$("#projects-more").click(function() {
$("#row1-1").fadeIn("fast");
$("#row1-2").fadeIn("fast");
});
$("#users-more").click(function() {
$("#row2-1").fadeIn("fast");
$("#row2-2").fadeIn("fast");
});
$("#platforms-more").click(function() {
$("#row3-1").fadeIn("fast");
$("#row3-2").fadeIn("fast");
});
});

View File

@ -0,0 +1,72 @@
function logIn() {
$("#hintLogin").fadeIn("slow");
document.getElementById("login").className="registartion-input-error";
$("#hintName").fadeIn("slow");
document.getElementById("name").className="registartion-input-error";
$("#hintEmail").fadeIn("slow");
document.getElementById("email").className="registartion-input-error";
$("#hintPassword").fadeIn("slow");
document.getElementById("pass").className="registartion-input-error";
document.getElementById("pass2").className="registartion-input-error";
}
function disError(elem) {
$("#hintLogin").fadeOut("fast");
$("#hintName").fadeOut("fast");
$("#hintEmail").fadeOut("fast");
$("#hintPassword").fadeOut("fast");
if (document.getElementById("login").className=="registartion-input-error") {
if (this.id=="login") {
document.getElementById("login").className="registartion-input-focus";
} else {
document.getElementById("login").className="registartion-input-no-focus";
}
}
if (document.getElementById("name").className=="registartion-input-error") {
if (this.id=="name") {
document.getElementById("name").className="registartion-input-focus";
} else {
document.getElementById("name").className="registartion-input-no-focus";
}
}
if (document.getElementById("email").className=="registartion-input-error") {
if (this.id=="email") {
document.getElementById("email").className="registartion-input-focus";
} else {
document.getElementById("email").className="registartion-input-no-focus";
}
}
if (document.getElementById("pass").className=="registartion-input-error") {
if (this.id=="pass") {
document.getElementById("pass").className="registartion-input-focus";
} else {
document.getElementById("pass").className="registartion-input-no-focus";
}
}
if (document.getElementById("pass2").className=="registartion-input-error") {
if (this.id=="pass2") {
document.getElementById("pass2").className="registartion-input-focus";
} else {
document.getElementById("pass2").className="registartion-input-no-focus";
}
}
buttonCheck();
}
/*function disError(elem) {
buttonCheck();
}*/
function buttonCheck() {
if ((document.getElementById("login").value!="")&&(document.getElementById("name").value!="")&&(document.getElementById("pass").value!="")&&(document.getElementById("pass2").value!="")&&(document.getElementById("email").value!="")) {
document.getElementById("btnLogin").className = "button";
} else {
document.getElementById("btnLogin").className = "button disabled";
}
}
$(document).ready(function() {
$("#btnLogin").click(function() {
logIn();
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -105,9 +105,9 @@ a.button, input.button {
}
input.button {
padding: 5px 27px 8px 27px;
height: 28px;
width: 110px;
padding: 3px 27px 8px 27px;
height: 25px;
width: auto;
}
a.button:hover, input.button:hover {
@ -120,7 +120,7 @@ a.button:active, input.button:active{
background: url("../pics/button-green-press.png");
}
a.button:disabled, a.button.disabled, input.button:disabled {
a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled {
background: #125687;
background: url("../pics/button-green-disabled.png");
cursor: default;
@ -252,9 +252,8 @@ nav p {
}
div.error {
background: url("../pics/error-message.png");
width: 237px;
height: 35px;
width: auto;
height: auto;
font-size: 12px;
position: absolute;
margin-top: -159px;
@ -262,10 +261,33 @@ div.error {
display: none;
}
div.error div.img {
background: url("../pics/error-arrow.png") 0% 5px no-repeat;
width: 19px;
height: 35px;
float: left;
}
div.error div.msg {
background: #ededed;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: auto;
height: auto;
float: left;
-webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
padding: 5px 20px 5px;
}
div.error p{
margin:0;
padding: 0;
padding-top: 7px;
text-align: center;
}

View File

@ -207,6 +207,8 @@ header div.profile a:hover {
header div.droplist-wrap {
margin: -4px 0px 0px 0px;
width: 151px;
float: right;
}
header div.droplist {
@ -218,7 +220,6 @@ header div.droplist {
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
position: absolute;
margin-top: 0px;
margin-left: 138px;
border-radius: 0px 0px 4px 4px;
display: none;
text-align: right;
@ -508,7 +509,7 @@ article input[type="submit"] {
background-image: linear-gradient(top, #68a3d8, #125687);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#68a3d8', EndColorStr='#125687');
border: 1px solid #5084b4;
padding: 4px 20px;
padding: 0px 20px 0px;
margin: 0;
font-size: 12px;
text-decoration: none;
@ -518,8 +519,9 @@ article input[type="submit"] {
border-radius: 5px;
text-align: center;
height: auto;
height: 28px;
width: auto;
font-family: Tahoma;
}
article input[type="submit"]:hover{
@ -838,7 +840,7 @@ div.rightlist textarea {
}
div.rightlist input[type="text"], div.rightlist input[type="password"] {
height: 15px;
height: 16px;
width: 350px;
border: 1px solid #dedede;
border-radius: 4px;
@ -849,30 +851,30 @@ div.rightlist input[type="text"], div.rightlist input[type="password"] {
/* Admin-members page */
.right table div.img {
div.img {
float: left;
}
.right table div.radio {
table div.radio {
float: left;
margin: 5px 0px 0px 0px;
}
.right table div.forimg {
div.forimg {
float: left;
margin: 5px 0px 0px 5px;
}
.right table div.forradio {
table div.forradio {
float: left;
margin: 5px 0px 0px 5px;
}
.right table span.niceCheck-main {
table span.niceCheck-main {
margin-top: 3px;
}
.right div.admin-search {
div.admin-search {
float: left;
}
@ -2159,4 +2161,50 @@ article div.all.error404 p.pages {
article div.all.error404 p.search {
margin-top: 80px;
width: 230px;
}
/*search*/
input.button.width100 {
width: 100px;
}
input[type="text"].exsearch {
height: 16px;
border: 1px solid #dedede;
border-radius: 4px;
padding: 5px;
font-family: Tahoma, Geneva, Helvetica, sans-serif;
font-size: 12px;
width: 520px;
margin-right: 10px;
}
div.lineForm.leftside.rmargin10 {
margin-right: 10px;
}
table.tablesorter.bmargin5 {
margin-bottom: 1px;
}
div.width400 {
width: 400px;
float: left;
}
div.width400.rmargin55 {
margin-right: 55px;
}
div.tmargin10 {
margin-top: 10px;
}
a.lmargin7 {
margin-left: 7px;
}
a.lmargin5 {
margin-left: 5px;
}

View File

@ -123,9 +123,9 @@ article div.right {
}
input.button {
padding: 5px 27px 8px 27px;
height: 28px;
width: 110px;
padding: 3px 27px 8px 27px;
height: 25px;
width: auto;
}
a.button:hover, input.button:hover {
@ -138,7 +138,7 @@ a.button:active, input.button:active{
background: url("../pics/button-green-press.png");
}
a.button:disabled, a.button.disabled, input.button:disabled {
a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled{
background: #125687;
background: url("../pics/button-green-disabled.png");
cursor: default;
@ -221,4 +221,65 @@ footer ul li a {
footer ul li a:hover {
text-decoration: underline;
}
div.error {
width: auto;
height: auto;
font-size: 12px;
position: absolute;
margin-top: -159px;
margin-left: 582px;
display: none;
text-align: left;
}
div.error div.img {
background: url("../pics/error-arrow.png") 0% 5px no-repeat;
width: 19px;
height: 35px;
float: left;
}
div.error div.msg {
background: #ededed;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: auto;
height: auto;
float: left;
-webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
padding: 5px 20px 5px;
}
div.error p{
margin:0;
padding: 0;
text-align: center;
}
div.error.login {
margin-top: -242px;
margin-left: 650px;
}
div.error.name {
margin-top: -202px;
margin-left: 650px;
}
div.error.email {
margin-top: -161px;
margin-left: 650px;
}
div.error.password {
margin-top: -101px;
margin-left: 650px;
}

View File

@ -2,10 +2,8 @@
//= require gollum/gollum.dialog
//= require gollum/gollum.placeholder
//= require gollum/editor/gollum.editor
// require hl/shCore
//= require codemirror
//= require codemirror/runmode
//= require_tree ./codemirror/modes
//= require cusel
// require_tree .

View File

@ -9,3 +9,6 @@
@import "codemirror";
@import "codemirror/themes/eclipse";
@import "codemirror/modes/diff";
@import "codemirror/modes/rpm-spec";
@import "codemirror/modes/tiddlywiki";