Commit faa87e61bf87f1dcff1222573af0ac45679e4777
Exists in
master
and in
4 other branches
Merge branch 'dev'
Showing
23 changed files
with
194 additions
and
142 deletions
Show diff stats
app/assets/javascripts/note.js
app/assets/stylesheets/projects.css.scss
... | ... | @@ -276,6 +276,9 @@ input.ssh_project_url { |
276 | 276 | /** FORM INPUTS **/ |
277 | 277 | |
278 | 278 | .user_new, |
279 | +.new_key, | |
280 | +.new_issue, | |
281 | +.new_note, | |
279 | 282 | .edit_user, |
280 | 283 | .new_project, |
281 | 284 | .new_snippet, |
... | ... | @@ -676,6 +679,30 @@ body.project-page table .commit { |
676 | 679 | } |
677 | 680 | } |
678 | 681 | |
682 | +#notes-list .note .delete-note { display:none; } | |
683 | +#notes-list .note:hover .delete-note { display:block; } | |
684 | + | |
685 | +#issues-table-holder .issue .action-links { | |
686 | + display:none; | |
687 | + a { | |
688 | + margin-left:10px; | |
689 | + } | |
690 | +} | |
691 | + | |
692 | +.issue-number { | |
693 | + float: left; | |
694 | + border-radius: 5px; | |
695 | + text-shadow: none; | |
696 | + background: rgba(0, 0, 0, 0.12); | |
697 | + text-align: center; | |
698 | + padding: 14px 8px; | |
699 | + width: 40px; | |
700 | + margin-right: 10px; | |
701 | + color: #444; | |
702 | +} | |
703 | + | |
704 | +#issues-table-holder .issue:hover .action-links { display:block; } | |
705 | + | |
679 | 706 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
680 | 707 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
681 | 708 | body.project-page #notes-list .note img{float: left; margin-right: 10px;} |
... | ... | @@ -683,3 +710,14 @@ body.project-page #notes-list .note span.note-title{display: block;} |
683 | 710 | body.project-page #notes-list .note span.note-title{margin-bottom: 10px} |
684 | 711 | body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;} |
685 | 712 | body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;} |
713 | + | |
714 | + | |
715 | +/** NEW PROJECT **/ | |
716 | +.new-project-hodler { | |
717 | + .icon span { | |
718 | + background-position: -31px -70px; | |
719 | + } | |
720 | + td { | |
721 | + border-bottom: 1px solid #DEE2E3; | |
722 | + } | |
723 | +} | ... | ... |
app/assets/stylesheets/style.scss
... | ... | @@ -87,6 +87,17 @@ h2{margin: 1.5em 0} |
87 | 87 | /* Forms */ |
88 | 88 | input[type="text"]:focus, input[type="password"]:focus { outline: none; } |
89 | 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 | 101 | /* eo Forms */ |
91 | 102 | |
92 | 103 | /* Tables */ | ... | ... |
app/controllers/issues_controller.rb
... | ... | @@ -47,6 +47,7 @@ class IssuesController < ApplicationController |
47 | 47 | def create |
48 | 48 | @issue = @project.issues.new(params[:issue]) |
49 | 49 | @issue.author = current_user |
50 | + | |
50 | 51 | if @issue.save && @issue.assignee != current_user |
51 | 52 | Notify.new_issue_email(@issue).deliver |
52 | 53 | end | ... | ... |
app/helpers/issues_helper.rb
app/views/admin/users/_form.html.haml
... | ... | @@ -7,44 +7,42 @@ |
7 | 7 | - @admin_user.errors.full_messages.each do |msg| |
8 | 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 | 46 | .clear |
49 | 47 | %br |
50 | 48 | .actions | ... | ... |
app/views/admin/users/index.html.haml
app/views/issues/_form.html.haml
... | ... | @@ -5,24 +5,21 @@ |
5 | 5 | - @issue.errors.full_messages.each do |msg| |
6 | 6 | %li= msg |
7 | 7 | |
8 | - .span-8 | |
8 | + .form-row | |
9 | 9 | = f.label :title |
10 | 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 | 12 | = f.label :assignee_id |
16 | 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 | 15 | = f.label :critical, "Critical" |
19 | 16 | %br |
20 | 17 | = f.check_box :critical |
21 | 18 | - unless @issue.new_record? |
22 | - .span-2.right | |
19 | + .form-row | |
23 | 20 | = f.label :closed |
24 | 21 | %br |
25 | 22 | = f.check_box :closed |
26 | 23 | %hr |
27 | - .span-6 | |
24 | + .form-row | |
28 | 25 | = f.submit 'Save', :class => "lbutton vm" | ... | ... |
app/views/issues/_issues.html.haml
1 | -%table.round-borders#issues-table | |
2 | - %thead | |
3 | - - if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0" | |
4 | - %th | |
5 | - %th Assignee | |
6 | - %th ID | |
7 | - %th Title | |
8 | - %th Closed? | |
1 | +- @issues.critical.each do |issue| | |
2 | + = render(:partial => 'show', :locals => {:issue => issue}) | |
9 | 3 | |
10 | - - @issues.critical.each do |issue| | |
11 | - = render(:partial => 'show', :locals => {:issue => issue}) | |
12 | - | |
13 | - - @issues.non_critical.each do |issue| | |
14 | - = render(:partial => 'show', :locals => {:issue => issue}) | |
4 | +- @issues.non_critical.each do |issue| | |
5 | + = render(:partial => 'show', :locals => {:issue => issue}) | ... | ... |
app/views/issues/_show.html.haml
1 | 1 | %tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) } |
2 | - - if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0") | |
3 | - %td | |
4 | - = image_tag "move.png" , :class => [:handle, :left] | |
5 | 2 | %td |
6 | - = image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" | |
7 | - = issue.assignee.name | |
8 | - %td ##{issue.id} | |
9 | - %td | |
10 | - = truncate(html_escape(issue.title), :length => 200) | |
3 | + %strong.issue-number{:class => sort_class}= "##{issue.id}" | |
4 | + %span | |
5 | + = truncate(html_escape(issue.title), :length => fixed_mode? ? 100 : 200) | |
11 | 6 | %br |
12 | 7 | %br |
13 | - - if issue.critical | |
14 | - %span.tag.high critical | |
15 | - - if issue.today? | |
16 | - %span.tag.today today | |
17 | - | |
18 | - .right | |
19 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
20 | - = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true | |
21 | - - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
22 | - | |
23 | - = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" | |
24 | - | |
25 | - -#- if issue.author == current_user | |
26 | - -#%span.tag.yours yours | |
27 | - -#- if issue.notes.count > 0 | |
28 | - -#%span.tag.notes | |
29 | - -#= issue.notes.count | |
30 | - -#notes | |
31 | - %td | |
32 | - - if can? current_user, :write_issue, @project | |
33 | - = form_for([@project, issue], :remote => true) do |f| | |
34 | - = f.check_box :closed, :onclick => "$(this).parent().submit();" | |
35 | - = hidden_field_tag :status_only, true | |
36 | - - else | |
37 | - = check_box_tag "closed", 1, issue.closed, :disabled => true | |
8 | + %div.note-author | |
9 | + %strong= issue.assignee.name | |
10 | + %cite.cgray | |
11 | + = time_ago_in_words(issue.updated_at) | |
12 | + ago | |
13 | + - if issue.critical | |
14 | + %span.tag.high critical | |
15 | + - if issue.today? | |
16 | + %span.tag.today today | |
17 | + .right.action-links | |
18 | + - if can? current_user, :write_issue, issue | |
19 | + - if issue.closed | |
20 | + = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true | |
21 | + - else | |
22 | + = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true | |
23 | + - if can? current_user, :write_issue, issue | |
24 | + = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true | |
25 | + - if can?(current_user, :admin_issue, @project) || issue.author == current_user | |
26 | + = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" | ... | ... |
app/views/issues/create.js.haml
app/views/issues/index.html.haml
1 | -%div | |
2 | - .top_panel_issues | |
3 | - - if can? current_user, :write_issue, @project | |
4 | - %div{:class => "left", :style => "margin-right: 10px;" } | |
5 | - = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm" | |
6 | - = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do | |
7 | - = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } | |
8 | - = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } | |
1 | +%div#issues-table-holder | |
2 | + %table.round-borders#issues-table | |
3 | + %thead | |
4 | + %th | |
5 | + .top_panel_issues | |
6 | + - if can? current_user, :write_issue, @project | |
7 | + %div{:class => "left", :style => "margin-right: 10px;" } | |
8 | + = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm" | |
9 | + = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do | |
10 | + = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } | |
11 | + = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } | |
9 | 12 | |
10 | - .right.issues_filter | |
11 | - = form_tag project_issues_path(@project), :method => :get do | |
12 | - .left | |
13 | - = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" | |
14 | - = label_tag "open_issues","Open" | |
15 | - .left | |
16 | - = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" | |
17 | - = label_tag "closed_issues","Closed" | |
18 | - .left | |
19 | - = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" | |
20 | - = label_tag "my_issues","To Me" | |
21 | - .left | |
22 | - = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" | |
23 | - = label_tag "all_issues","All" | |
13 | + .right.issues_filter | |
14 | + = form_tag project_issues_path(@project), :method => :get do | |
15 | + .left | |
16 | + = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" | |
17 | + = label_tag "open_issues","Open" | |
18 | + .left | |
19 | + = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" | |
20 | + = label_tag "closed_issues","Closed" | |
21 | + .left | |
22 | + = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" | |
23 | + = label_tag "my_issues","To Me" | |
24 | + .left | |
25 | + = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" | |
26 | + = label_tag "all_issues","All" | |
24 | 27 | |
25 | - #issues-table-holder= render "issues" | |
28 | + = render "issues" | |
26 | 29 | %br |
27 | 30 | :javascript |
28 | 31 | var href = $('.issue_search').parent().attr('action'); |
... | ... | @@ -37,7 +40,7 @@ |
37 | 40 | |
38 | 41 | if (terms.length >= 2 || terms.length == 0) { |
39 | 42 | $.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) { |
40 | - $('#issues-table').html(response); | |
43 | + $('#issues-table tbody').html(response); | |
41 | 44 | setSortable(); |
42 | 45 | }); |
43 | 46 | } | ... | ... |
app/views/issues/index.js.haml
app/views/keys/_form.html.haml
... | ... | @@ -5,12 +5,12 @@ |
5 | 5 | - @key.errors.full_messages.each do |msg| |
6 | 6 | %li= msg |
7 | 7 | |
8 | - .span-6 | |
8 | + .form-row | |
9 | 9 | = f.label :title |
10 | 10 | = f.text_field :title, :style => "width:300px" |
11 | - .span-6 | |
11 | + .form-row | |
12 | 12 | = f.label :key |
13 | 13 | = f.text_area :key, :style => "width:300px; height:130px" |
14 | - .span-6 | |
14 | + .form-row | |
15 | 15 | = f.submit 'Save', :class => "lbutton vm" |
16 | 16 | ... | ... |
app/views/notes/_form.html.haml
... | ... | @@ -10,13 +10,16 @@ |
10 | 10 | |
11 | 11 | %div |
12 | 12 | = f.label :note |
13 | - %cite | |
13 | + %cite.cgray markdown supported | |
14 | + %br | |
14 | 15 | %br |
15 | 16 | = f.text_area :note, :size => 255 |
16 | - | |
17 | + | |
17 | 18 | %div.attach_holder |
19 | + %br | |
18 | 20 | = f.label :attachment |
19 | - %cite (less than 10 MB) | |
21 | + %cite.cgray (less than 10 MB) | |
22 | + %br | |
20 | 23 | %br |
21 | 24 | = f.file_field :attachment |
22 | 25 | ... | ... |
app/views/profile/password.html.haml
... | ... | @@ -7,11 +7,11 @@ |
7 | 7 | - @user.errors.full_messages.each do |msg| |
8 | 8 | %li= msg |
9 | 9 | |
10 | - .div | |
10 | + .form-row | |
11 | 11 | = f.label :password |
12 | 12 | %br |
13 | 13 | = f.password_field :password |
14 | - .div | |
14 | + .form-row | |
15 | 15 | = f.label :password_confirmation |
16 | 16 | %br |
17 | 17 | = f.password_field :password_confirmation | ... | ... |
app/views/profile/show.html.haml
... | ... | @@ -16,15 +16,15 @@ |
16 | 16 | - @user.errors.full_messages.each do |msg| |
17 | 17 | %li= msg |
18 | 18 | |
19 | - .div | |
19 | + .form-row | |
20 | 20 | = f.label :skype |
21 | 21 | %br |
22 | 22 | = f.text_field :skype |
23 | - .div | |
23 | + .form-row | |
24 | 24 | = f.label :linkedin |
25 | 25 | %br |
26 | 26 | = f.text_field :linkedin |
27 | - .div | |
27 | + .form-row | |
28 | 28 | = f.label :twitter |
29 | 29 | %br |
30 | 30 | = f.text_field :twitter | ... | ... |
app/views/projects/_form.html.haml
1 | 1 | = form_for(@project, :remote => true) do |f| |
2 | 2 | %div.form_content |
3 | 3 | - unless @project.new_record? |
4 | - %h1 Edit Project | |
4 | + %h2.icon | |
5 | + %span | |
6 | + = @project.name | |
5 | 7 | - if @project.errors.any? |
6 | 8 | #error_explanation |
7 | 9 | %h2 |
... | ... | @@ -10,7 +12,7 @@ |
10 | 12 | %ul |
11 | 13 | - @project.errors.full_messages.each do |msg| |
12 | 14 | %li= msg |
13 | - %table.round-borders | |
15 | + %table | |
14 | 16 | %tr |
15 | 17 | %td= f.label :name |
16 | 18 | %td= f.text_field :name, :placeholder => "Example Project" |
... | ... | @@ -29,15 +31,13 @@ |
29 | 31 | %tr |
30 | 32 | %td= f.label :tag_list |
31 | 33 | %td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field |
34 | + %tr | |
35 | + %td= f.label :description | |
36 | + %td= f.text_area :description, :placeholder => "project description", :style => "height:50px" | |
32 | 37 | |
33 | - .field | |
34 | - = f.label :description | |
35 | - %br/ | |
36 | - = f.text_area :description, :style => "height:140px;width:932px;" | |
37 | - .clear | |
38 | - %hr.prepend-top | |
38 | + %br | |
39 | 39 | .actions |
40 | - = f.submit :class => "lbutton vm" | |
40 | + = f.submit :class => "button" | |
41 | 41 | |
42 | 42 | %div{ :class => "ajax_loader", :style => "display:none;height:200px;"} |
43 | 43 | %center | ... | ... |
app/views/projects/new.html.erb
... | ... | @@ -1 +0,0 @@ |
1 | -<%= render 'form' %> |
spec/requests/issues_spec.rb
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | .ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; } |
60 | 60 | .ui-widget .ui-widget { font-size: 1em; } |
61 | 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 | 63 | .ui-widget-content a { color: #222222; } |
64 | 64 | .ui-widget-header { color: #222222; font-weight: bold; } |
65 | 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 | 445 | * http://docs.jquery.com/UI/Dialog#theming |
446 | 446 | */ |
447 | 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 | 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 | 451 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } |
452 | 452 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } | ... | ... |