Commit 444b69ddc2382489dbd01304b605c3be5af75f28

Authored by Aleksei Kvitinskii
2 parents 4a1b70f7 9054f64c

Merge branch 'dev' into issue-184

Conflicts:
	app/views/layouts/project.html.haml
app/assets/javascripts/note.js
@@ -42,8 +42,10 @@ replace: @@ -42,8 +42,10 @@ replace:
42 42
43 prepend: 43 prepend:
44 function(id, html) { 44 function(id, html) {
45 - this.last_id = id;  
46 - $("#notes-list").prepend(html); 45 + if(id != this.last_id) {
  46 + this.last_id = id;
  47 + $("#notes-list").prepend(html);
  48 + }
47 }, 49 },
48 50
49 getNew: 51 getNew:
app/assets/stylesheets/projects.css.scss
@@ -276,6 +276,9 @@ input.ssh_project_url { @@ -276,6 +276,9 @@ input.ssh_project_url {
276 /** FORM INPUTS **/ 276 /** FORM INPUTS **/
277 277
278 .user_new, 278 .user_new,
  279 +.new_key,
  280 +.new_issue,
  281 +.new_note,
279 .edit_user, 282 .edit_user,
280 .new_project, 283 .new_project,
281 .new_snippet, 284 .new_snippet,
@@ -667,6 +670,15 @@ table.highlighttable pre{ @@ -667,6 +670,15 @@ table.highlighttable pre{
667 .cred { color:#D12F19; } 670 .cred { color:#D12F19; }
668 .cgreen { color:#44aa22; } 671 .cgreen { color:#44aa22; }
669 672
  673 +body.project-page table .commit {
  674 + a.tree-commit-link {
  675 + color:gray;
  676 + &:hover {
  677 + text-decoration:underline;
  678 + }
  679 + }
  680 +}
  681 +
670 body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} 682 body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
671 body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} 683 body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
672 body.project-page #notes-list .note img{float: left; margin-right: 10px;} 684 body.project-page #notes-list .note img{float: left; margin-right: 10px;}
app/assets/stylesheets/style.scss
@@ -87,6 +87,17 @@ h2{margin: 1.5em 0} @@ -87,6 +87,17 @@ h2{margin: 1.5em 0}
87 /* Forms */ 87 /* Forms */
88 input[type="text"]:focus, input[type="password"]:focus { outline: none; } 88 input[type="text"]:focus, input[type="password"]:focus { outline: none; }
89 input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} 89 input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px}
  90 +
  91 +.form-row{
  92 + padding: 0px 0px 10px 0px;
  93 +}
  94 +
  95 +.form-row label{
  96 + font-weight:bold;
  97 + display: inline-block;
  98 + padding: 0px 0px 5px 0px;
  99 +}
  100 +
90 /* eo Forms */ 101 /* eo Forms */
91 102
92 /* Tables */ 103 /* Tables */
app/helpers/application_helper.rb
@@ -4,6 +4,10 @@ module ApplicationHelper @@ -4,6 +4,10 @@ module ApplicationHelper
4 "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon" 4 "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon"
5 end 5 end
6 6
  7 + def fixed_mode?
  8 + @view_mode == :fixed
  9 + end
  10 +
7 def body_class(default_class = nil) 11 def body_class(default_class = nil)
8 main = content_for(:body_class).blank? ? 12 main = content_for(:body_class).blank? ?
9 default_class : 13 default_class :
app/models/project.rb
@@ -50,6 +50,11 @@ class Project < ActiveRecord::Base @@ -50,6 +50,11 @@ class Project < ActiveRecord::Base
50 code 50 code
51 end 51 end
52 52
  53 + def team_member_by_name_or_email(email = nil, name = nil)
  54 + user = users.where("email like ? or name like ?", email, name).first
  55 + users_projects.find_by_user_id(user.id) if user
  56 + end
  57 +
53 def common_notes 58 def common_notes
54 notes.where(:noteable_type => ["", nil]) 59 notes.where(:noteable_type => ["", nil])
55 end 60 end
app/views/admin/users/_form.html.haml
@@ -7,44 +7,42 @@ @@ -7,44 +7,42 @@
7 - @admin_user.errors.full_messages.each do |msg| 7 - @admin_user.errors.full_messages.each do |msg|
8 %li= msg 8 %li= msg
9 9
10 - .span-24  
11 - .span-11.colborder  
12 - .field  
13 - = f.label :name  
14 - %br  
15 - = f.text_field :name  
16 - .field  
17 - = f.label :email  
18 - %br  
19 - = f.text_field :email  
20 - .field  
21 - = f.label :password  
22 - %br  
23 - = f.password_field :password  
24 - .field  
25 - = f.label :password_confirmation  
26 - %br  
27 - = f.password_field :password_confirmation  
28 - .field.prepend-top  
29 - = f.check_box :admin  
30 - = f.label :admin  
31 - .span-11  
32 - .field.prepend-top  
33 - = f.text_field :projects_limit, :class => "small_input"  
34 - = f.label :projects_limit 10 + .form-row
  11 + = f.label :name
  12 + %br
  13 + = f.text_field :name
  14 + .form-row
  15 + = f.label :email
  16 + %br
  17 + = f.text_field :email
  18 + .form-row
  19 + = f.label :password
  20 + %br
  21 + = f.password_field :password
  22 + .form-row
  23 + = f.label :password_confirmation
  24 + %br
  25 + = f.password_field :password_confirmation
  26 + .form-row
  27 + = f.check_box :admin
  28 + = f.label :admin
35 29
36 - .field  
37 - = f.label :skype  
38 - %br  
39 - = f.text_field :skype  
40 - .field  
41 - = f.label :linkedin  
42 - %br  
43 - = f.text_field :linkedin  
44 - .field  
45 - = f.label :twitter  
46 - %br  
47 - = f.text_field :twitter 30 + .form-row
  31 + = f.text_field :projects_limit, :class => "small_input"
  32 + = f.label :projects_limit
  33 +
  34 + .form-row
  35 + = f.label :skype
  36 + %br
  37 + = f.text_field :skype
  38 + .form-row
  39 + = f.label :linkedin
  40 + %br
  41 + = f.text_field :linkedin
  42 + .form-row
  43 + = f.label :twitter
  44 + %br
  45 + = f.text_field :twitter
48 .clear 46 .clear
49 %br 47 %br
50 .actions 48 .actions
app/views/admin/users/index.html.haml
@@ -21,4 +21,5 @@ @@ -21,4 +21,5 @@
21 %br 21 %br
22 22
23 = paginate @admin_users 23 = paginate @admin_users
  24 +
24 = link_to 'New User', new_admin_user_path 25 = link_to 'New User', new_admin_user_path
app/views/commits/_commits.html.haml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" 17 = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
18 %span.commit-title 18 %span.commit-title
19 %strong 19 %strong
20 - = truncate(commit.safe_message, :length => 60) 20 + = truncate(commit.safe_message, :length => fixed_mode? ? 60 : 120)
21 %span.commit-author 21 %span.commit-author
22 %strong= commit.author_name 22 %strong= commit.author_name
23 = time_ago_in_words(commit.committed_date) 23 = time_ago_in_words(commit.committed_date)
app/views/issues/_form.html.haml
@@ -5,24 +5,21 @@ @@ -5,24 +5,21 @@
5 - @issue.errors.full_messages.each do |msg| 5 - @issue.errors.full_messages.each do |msg|
6 %li= msg 6 %li= msg
7 7
8 - .span-8 8 + .form-row
9 = f.label :title 9 = f.label :title
10 = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255 10 = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255
11 - -#.span-8  
12 - -#= f.label :content  
13 - -#= f.text_area :content, :style => "width:450px; height:130px"  
14 - .span-8.append-bottom 11 + .form-row
15 = f.label :assignee_id 12 = f.label :assignee_id
16 = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) 13 = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
17 - .span-1 14 + .form-row
18 = f.label :critical, "Critical" 15 = f.label :critical, "Critical"
19 %br 16 %br
20 = f.check_box :critical 17 = f.check_box :critical
21 - unless @issue.new_record? 18 - unless @issue.new_record?
22 - .span-2.right 19 + .form-row
23 = f.label :closed 20 = f.label :closed
24 %br 21 %br
25 = f.check_box :closed 22 = f.check_box :closed
26 %hr 23 %hr
27 - .span-6 24 + .form-row
28 = f.submit 'Save', :class => "lbutton vm" 25 = f.submit 'Save', :class => "lbutton vm"
app/views/keys/_form.html.haml
@@ -5,12 +5,12 @@ @@ -5,12 +5,12 @@
5 - @key.errors.full_messages.each do |msg| 5 - @key.errors.full_messages.each do |msg|
6 %li= msg 6 %li= msg
7 7
8 - .span-6 8 + .form-row
9 = f.label :title 9 = f.label :title
10 = f.text_field :title, :style => "width:300px" 10 = f.text_field :title, :style => "width:300px"
11 - .span-6 11 + .form-row
12 = f.label :key 12 = f.label :key
13 = f.text_area :key, :style => "width:300px; height:130px" 13 = f.text_area :key, :style => "width:300px; height:130px"
14 - .span-6 14 + .form-row
15 = f.submit 'Save', :class => "lbutton vm" 15 = f.submit 'Save', :class => "lbutton vm"
16 16
app/views/layouts/project.html.haml
@@ -26,12 +26,12 @@ @@ -26,12 +26,12 @@
26 - if @project.users_projects.count > 0 26 - if @project.users_projects.count > 0
27 %span{ :class => "number" }= @project.users_projects.count 27 %span{ :class => "number" }= @project.users_projects.count
28 = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do 28 = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
29 - Issues 29 + Issuess
30 - if @project.issues.opened.count > 0 30 - if @project.issues.opened.count > 0
31 %span{ :class => "number" }= @project.issues.opened.count 31 %span{ :class => "number" }= @project.issues.opened.count
32 = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do 32 = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
33 Wall 33 Wall
34 - - if @project.common_notes.count > 0 34 + - if @project.common_nsotes.count > 0
35 %span{ :class => "number" }= @project.common_notes.count 35 %span{ :class => "number" }= @project.common_notes.count
36 = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do 36 = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
37 Snippets 37 Snippets
app/views/notes/_form.html.haml
@@ -10,13 +10,16 @@ @@ -10,13 +10,16 @@
10 10
11 %div 11 %div
12 = f.label :note 12 = f.label :note
13 - %cite 13 + %cite.cgray markdown supported
  14 + %br
14 %br 15 %br
15 = f.text_area :note, :size => 255 16 = f.text_area :note, :size => 255
16 - 17 +
17 %div.attach_holder 18 %div.attach_holder
  19 + %br
18 = f.label :attachment 20 = f.label :attachment
19 - %cite (less than 10 MB) 21 + %cite.cgray (less than 10 MB)
  22 + %br
20 %br 23 %br
21 = f.file_field :attachment 24 = f.file_field :attachment
22 25
app/views/profile/password.html.haml
@@ -7,11 +7,11 @@ @@ -7,11 +7,11 @@
7 - @user.errors.full_messages.each do |msg| 7 - @user.errors.full_messages.each do |msg|
8 %li= msg 8 %li= msg
9 9
10 - .div 10 + .form-row
11 = f.label :password 11 = f.label :password
12 %br 12 %br
13 = f.password_field :password 13 = f.password_field :password
14 - .div 14 + .form-row
15 = f.label :password_confirmation 15 = f.label :password_confirmation
16 %br 16 %br
17 = f.password_field :password_confirmation 17 = f.password_field :password_confirmation
app/views/profile/show.html.haml
@@ -16,15 +16,15 @@ @@ -16,15 +16,15 @@
16 - @user.errors.full_messages.each do |msg| 16 - @user.errors.full_messages.each do |msg|
17 %li= msg 17 %li= msg
18 18
19 - .div 19 + .form-row
20 = f.label :skype 20 = f.label :skype
21 %br 21 %br
22 = f.text_field :skype 22 = f.text_field :skype
23 - .div 23 + .form-row
24 = f.label :linkedin 24 = f.label :linkedin
25 %br 25 %br
26 = f.text_field :linkedin 26 = f.text_field :linkedin
27 - .div 27 + .form-row
28 = f.label :twitter 28 = f.label :twitter
29 %br 29 %br
30 = f.text_field :twitter 30 = f.text_field :twitter
app/views/projects/_tree_item.html.haml
@@ -11,5 +11,8 @@ @@ -11,5 +11,8 @@
11 %td 11 %td
12 = time_ago_in_words(content_commit.committed_date) 12 = time_ago_in_words(content_commit.committed_date)
13 ago 13 ago
14 - %td  
15 - = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit) 14 + %td.commit
  15 + = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link"
  16 + - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name)
  17 + - if tm
  18 + = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
public/.directory 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +[Dolphin]
  2 +ShowPreview=true
  3 +Timestamp=2011,11,6,21,7,47
  4 +Version=2
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 .ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; } 59 .ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; }
60 .ui-widget .ui-widget { font-size: 1em; } 60 .ui-widget .ui-widget { font-size: 1em; }
61 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } 61 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
62 -.ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } 62 +.ui-widget-content { border: 1px solid #474D57; background: #ffffff url(ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
63 .ui-widget-content a { color: #222222; } 63 .ui-widget-content a { color: #222222; }
64 .ui-widget-header { color: #222222; font-weight: bold; } 64 .ui-widget-header { color: #222222; font-weight: bold; }
65 .ui-widget-header a { color: #222222; } 65 .ui-widget-header a { color: #222222; }
@@ -445,8 +445,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad @@ -445,8 +445,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
445 * http://docs.jquery.com/UI/Dialog#theming 445 * http://docs.jquery.com/UI/Dialog#theming
446 */ 446 */
447 .ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; } 447 .ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
448 -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #F7F7F7; color:#555; }  
449 -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0;} 448 +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #474D57; color:#eee; }
  449 +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; text-shadow: none;}
450 .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; background:#eaeaea} 450 .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; background:#eaeaea}
451 .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 451 .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
452 .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 452 .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }