Commit fbdb1da2ab450a49357feb8306dcced6ce61ab50

Authored by Dmitriy Zaporozhets
1 parent d4ad3623

Bootstrap: issues, notes css

app/assets/javascripts/issues.js
1 1 function switchToNewIssue(form){
2   - $("#issues-table-holder").hide("slide", { direction: "left" }, 150, function(){
3   - $(".project-content").append(form);
  2 + $("#issues-table").hide("slide", { direction: "left" }, 150, function(){
  3 + $("#issues-table").after(form);
4 4 $('select#issue_assignee_id').chosen();
5 5 $("#new_issue_dialog").show("slide", { direction: "right" }, 150);
6 6 $('.top-tabs .add_new').hide();
... ... @@ -8,11 +8,11 @@ function switchToNewIssue(form){
8 8 }
9 9  
10 10 function switchToEditIssue(form){
11   - $("#issues-table-holder").hide("slide", { direction: "left" }, 150, function(){
12   - $(".project-content").append(form);
  11 + $("#issues-table").hide("slide", { direction: "left" }, 150, function(){
  12 + $("#issues-table").after(form);
13 13 $('select#issue_assignee_id').chosen();
14 14 $("#edit_issue_dialog").show("slide", { direction: "right" }, 150);
15   - $('.top-tabs .add_new').hide();
  15 + $('.add_new').hide();
16 16 });
17 17 }
18 18  
... ... @@ -26,10 +26,10 @@ function switchFromEditIssue(){
26 26  
27 27 function backToIssues(){
28 28 $("#edit_issue_dialog, #new_issue_dialog").hide("slide", { direction: "right" }, 150, function(){
29   - $("#issues-table-holder").show("slide", { direction: "left" }, 150, function() {
  29 + $("#issues-table").show("slide", { direction: "left" }, 150, function() {
30 30 $("#edit_issue_dialog").remove();
31 31 $("#new_issue_dialog").remove();
32   - $('.top-tabs .add_new').show();
  32 + $('.add_new').show();
33 33 });
34 34 });
35 35 }
... ...
app/assets/stylesheets/common.scss
... ... @@ -87,6 +87,9 @@ $blue_link: "#2fa0bb";
87 87 .no-padding {
88 88 padding:0 !important;
89 89 }
  90 +.underlined {
  91 + border-bottom: 1px solid $border_color;
  92 +}
90 93  
91 94 /** LAYOUT **/
92 95  
... ... @@ -94,7 +97,7 @@ $blue_link: "#2fa0bb";
94 97 min-width:$min_app_width;
95 98 max-width:$max_app_width;
96 99 margin:auto;
97   - margin-top:60px;
  100 + margin-top:51px;
98 101 }
99 102  
100 103 .container-fluid > .sidebar {
... ... @@ -106,6 +109,7 @@ $blue_link: "#2fa0bb";
106 109  
107 110 .container-fluid > .content {
108 111 margin-left: 160px;
  112 + margin-top:20px;
109 113 }
110 114  
111 115 @import "reset_bootstrap.scss";
... ... @@ -113,12 +117,12 @@ $blue_link: "#2fa0bb";
113 117 @import "projects.css.scss";
114 118 @import "commits.css.scss";
115 119 @import "tree.scss";
  120 +@import "issues.css.scss";
  121 +@import "merge_requests.css.scss";
  122 +@import "notes.css.scss";
116 123  
117 124 //@import "style.scss";
118   -//@import "notes.css.scss";
119   -//@import "merge_requests.css.scss";
120 125  
121   -//@import "issues.css.scss";
122 126 //@import "commits.css.scss";
123 127  
124 128 //@import "dashboard.scss";
... ...
app/assets/stylesheets/issues.css.scss
... ... @@ -10,61 +10,6 @@
10 10 color: #444;
11 11 }
12 12  
13   -.issues_filter {
14   - margin:10px 0;
15   - .left {
16   - margin-right:15px;
17   - }
18   -}
19   -
20   -.top_panel_issues{
21   - #issue_search_form {
22   - margin:5px 0;
23   - input {
24   - border:1px solid #D3D3D3;
25   - padding: 3px;
26   - height: 28px;
27   - width: 250px;
28   - -webkit-appearance:none;
29   - box-sizing: border-box;
30   - -moz-box-sizing: border-box;
31   -
32   - &:focus {
33   - border-color:#c2e1ef;
34   - }
35   - }
36   - }
37   -}
38   -
39   -/** ISSUES LIST **/
40   -.issue .action-links {
41   - display:none;
42   - a {
43   - margin-left:10px;
44   - }
45   -}
46   -.issue:hover .action-links { display:block; }
47   -.issue-show-holder {
48   - width:100%;
49   - .data p { font-size:16px }
50   -}
51   -
52 13 #issue_assignee_id {
53 14 width:300px;
54 15 }
55   -
56   -.issue-form-holder .ui-box .data {
57   - margin: 0;
58   - padding: 0;
59   -}
60   -
61   -
62   -#issues-table {
63   - tr {
64   - border-top: 1px solid $lite_border_color;
65   - &:first-child {
66   - border:none;
67   - }
68   - }
69   -
70   -}
... ...
app/assets/stylesheets/merge_requests.css.scss
1   -// Place all the styles related to the MergeRequests controller here.
2   -// They will automatically be included in application.css.
3   -// You can use Sass (SCSS) here: http://sass-lang.com/
4   -
5   -
6 1 .merge-request-form-holder {
7 2 select {
8 3 width:300px;
... ...
app/assets/stylesheets/notes.css.scss
... ... @@ -32,7 +32,6 @@
32 32  
33 33 #notes-list .note .delete-note { display:none; }
34 34 #notes-list .note:hover .delete-note { display:block; }
35   -
36 35 #notes-list .note {padding: 10px 0; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
37 36 #notes-list .note img{float: left; margin-right: 10px;}
38 37 #notes-list .note span.note-title{display: block;}
... ...
app/views/commits/_commits.html.haml
1 1 - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits|
2 2 %div{ :class => "commits-date ui-box ui-box-small ui-box-big" }
3 3 .day-commits-table
4   - %div.alert-message.info
5   - %p= day.stamp("28 Aug, 2010")
6   - .data
  4 + %h5.underlined= day.stamp("28 Aug, 2010")
  5 + %ul.unstyled
7 6 - commits.each do |commit|
8   - %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) }
9   - %span.commit-info
10   - %data.commit-button
11   - = truncate(commit.id.to_s, :length => 16)
12   - %i
13   - %data.commit-browse{ :onclick => "location.href='#{tree_project_ref_path(@project, commit.id)}';return false;"}
14   - Browse Code
15   - - if commit.author_email
16   - = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
17   - - else
18   - = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
19   - %span.commit-title
20   - %strong
21   - = truncate(commit.safe_message, :length => 70)
22   - %span.commit-author
23   - %strong= commit.author_name
24   - = time_ago_in_words(commit.committed_date)
25   - ago
  7 + %li
  8 + %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) }
  9 + %span.commit-info
  10 + %data.commit-button
  11 + = truncate(commit.id.to_s, :length => 16)
  12 + %i
  13 + %data.commit-browse{ :onclick => "location.href='#{tree_project_ref_path(@project, commit.id)}';return false;"}
  14 + Browse Code
  15 + - if commit.author_email
  16 + = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
  17 + - else
  18 + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
  19 + %span.commit-title
  20 + %strong
  21 + = truncate(commit.safe_message, :length => 70)
  22 + %span.commit-author
  23 + %strong= commit.author_name
  24 + = time_ago_in_words(commit.committed_date)
  25 + ago
... ...
app/views/commits/show.html.haml
1 1 .commit
2 2 %span.commit-info
3   - = link_to tree_project_ref_path(@project, @commit.id) do
4   - %data.commit-button
5   - Browse Code
6   - %i
  3 + = link_to tree_project_ref_path(@project, @commit.id), :class => "btn" do
  4 + Browse Code »
7 5 - if @commit.author_email
8 6 = image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
9 7 - else
... ...
app/views/issues/_head.html.haml
1   -.top-tabs
2   - = link_to project_issues_path(@project), :class => "tab #{'active' if current_page?(project_issues_path(@project)) }" do
3   - %span
4   - Issues
  1 +.tabs
  2 + %li{:class => "#{'active' if current_page?(project_issues_path(@project))}"}
  3 + = link_to project_issues_path(@project), :class => "tab" do
  4 + Issues
5 5  
6 6 -#= link_to project_issues_path(@project), :class => "tab" do
7 7 %span
... ... @@ -9,6 +9,7 @@
9 9  
10 10 - if current_page?(project_issues_path(@project))
11 11 - if can? current_user, :write_issue, @project
12   - = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do
13   - Add new
  12 + %li
  13 + = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do
  14 + Add new
14 15  
... ...
app/views/issues/_show.html.haml
1 1 %tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
2 2 %td
3   - %strong.issue-number{:class => sort_class}= "##{issue.id}"
  3 + = image_tag gravatar_icon(issue.assignee_email), :class => "left", :width => 40, :style => "padding-right:5px;"
4 4 %span
5 5 = truncate(html_escape(issue.title), :length => 100)
6   - %br
7   - %br
8 6 %div.note-author
9 7 %strong= issue.assignee.name
10 8 %cite.cgray
... ...
app/views/issues/index.html.haml
... ... @@ -6,31 +6,25 @@
6 6 = image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
7 7  
8 8 %div#issues-table-holder
9   - .top_panel_issues
10   - = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :right, :id => "issue_search_form" do
  9 + .well
  10 + = form_tag project_issues_path(@project), :method => :get, :class => :left do
  11 + = label_tag "open_issues" do
  12 + = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status"
  13 + %span.tag.open Open
  14 + = label_tag "closed_issues" do
  15 + = radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status"
  16 + %span.tag.closed Closed
  17 + = label_tag "my_issues" do
  18 + = radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
  19 + %span To Me
  20 + = label_tag "all_issues" do
  21 + = radio_button_tag :f, 1, params[:f] == "1", :onclick => "setIssueFilter(this.form, 1)", :id => "all_issues", :class => "status"
  22 + %span All
  23 + = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do
11 24 = hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
12 25 = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
13 26  
14   - .left.issues_filter
15   - = form_tag project_issues_path(@project), :method => :get do
16   - .left
17   - = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status"
18   - = label_tag "open_issues" do
19   - %span.tag.open Open
20   - .left
21   - = radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status"
22   - = label_tag "closed_issues" do
23   - %span.tag.closed Closed
24   - .left
25   - = radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
26   - = label_tag "my_issues","To Me"
27   - .left
28   - = radio_button_tag :f, 1, params[:f] == "1", :onclick => "setIssueFilter(this.form, 1)", :id => "all_issues", :class => "status"
29   - = label_tag "all_issues","All"
30   -
31   - .clear
32   - %hr
33   - %table.no-borders#issues-table
  27 + %table#issues-table
34 28 = render "issues"
35 29 %br
36 30 :javascript
... ...
app/views/notes/_form.html.haml
1 1 %div
  2 + %h3 Leave a note
2 3 = form_for [@project, @note], :remote => "true", :multipart => true do |f|
3 4 -if @note.errors.any?
4 5 .errors.error
... ... @@ -7,30 +8,25 @@
7 8  
8 9 = f.hidden_field :noteable_id
9 10 = f.hidden_field :noteable_type
  11 + = f.text_area :note, :size => 255
10 12  
11   - %div
12   - = f.label :note
13   - %cite.cgray markdown supported
14   - %br
15   - %br
16   - = f.text_area :note, :size => 255
  13 + .row
  14 + .span6
  15 + %h5 Notify via email:
  16 + .clearfix
  17 + = label_tag :notify do
  18 + = check_box_tag :notify, 1, @note.noteable_type != "Commit"
  19 + %span Project team
17 20  
18   - %div.attach_holder
19   - %br
20   - = f.label :attachment
21   - %cite.cgray (less than 10 MB)
22   -  
23   - = f.file_field :attachment
24   -
25   - %p.notify_controls
26   - %span Notify:
27   - = check_box_tag :notify, 1, @note.noteable_type != "Commit"
28   - = label_tag :notify, "Project team"
  21 + -if @note.noteable_type == "Commit"
  22 + = label_tag :notify_author do
  23 + = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
  24 + %span Commit author
  25 + .span6
  26 + %h5 Attachment:
  27 + .clearfix
  28 + = f.label :attachment, "Any file, < 10 MB"
  29 + .input= f.file_field :attachment, :class => "input-file"
29 30  
30   - -if @note.noteable_type == "Commit"
31   - = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
32   - = label_tag :notify_author, "Commit author"
33 31  
34   - .clear
35   - %br
36   - = f.submit 'Add note', :class => "positive-button", :id => "submit_note"
  32 + = f.submit 'Add note', :class => "btn primary", :id => "submit_note"
... ...
app/views/projects/_project_head.html.haml
1   -.top-tabs
2   - = link_to project_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_path(@project)) }" do
3   - %span
4   - Activities
5   - = link_to info_project_path(@project), :class => "stat-tab tab #{'active' if current_page?(info_project_path(@project)) || current_page?(edit_project_path(@project)) }" do
6   - %span
7   - Info
8   - = link_to team_project_path(@project), :class => "team-tab tab #{'active' if current_page?(team_project_path(@project)) }" do
9   - %span
10   - Team
11   - = link_to files_project_path(@project), :class => "files-tab tab #{'active' if current_page?(files_project_path(@project)) }" do
12   - %span
13   - Files
14   - = link_to project_snippets_path(@project), :class => "snippets-tab tab #{'active' if current_page?(project_snippets_path(@project)) }" do
15   - %span
16   - Snippets
  1 +%ul.tabs
  2 + %li{ :class => "#{'active' if current_page?(project_path(@project)) }" }
  3 + = link_to project_path(@project), :class => "activities-tab tab" do
  4 + Activities
  5 + %li{ :class => "#{'active' if current_page?(info_project_path(@project)) || current_page?(edit_project_path(@project)) }" }
  6 + = link_to info_project_path(@project), :class => "stat-tab tab " do
  7 + Info
  8 +
  9 + %li{ :class => " #{'active' if current_page?(team_project_path(@project)) }" }
  10 + = link_to team_project_path(@project), :class => "team-tab tab" do
  11 + Team
  12 + %li{ :class => "#{'active' if current_page?(files_project_path(@project)) }" }
  13 + = link_to files_project_path(@project), :class => "files-tab tab " do
  14 + Files
  15 + %li{ :class => " #{'active' if current_page?(project_snippets_path(@project)) }" }
  16 + = link_to project_snippets_path(@project), :class => "snippets-tab tab" do
  17 + Snippets
17 18  
18 19 - if current_page?(project_snippets_path(@project))
19 20 - if can? current_user, :write_snippet, @project
20   - = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do
21   - Add new
  21 + %li
  22 + = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do
  23 + Add new
22 24  
23 25  
24 26 - if current_page?(team_project_path(@project))
25 27 - if can? current_user, :admin_team_member, @project
26   - = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member" do
27   - Add New
  28 + %li
  29 + = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member" do
  30 + Add New
... ...