Commit e48a0b8e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

usability improvements

parent c5a48a6a
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
} }
.issues_filter { .issues_filter {
margin-top:10px; margin:10px 0;
.left { .left {
margin-right:15px; margin-right:15px;
} }
} }
......
...@@ -440,7 +440,7 @@ header .account-box img{ ...@@ -440,7 +440,7 @@ header .account-box img{
right: 20px; right: 20px;
position: absolute; position: absolute;
width: 33px; height: 33px; width: 33px; height: 33px;
display: block; box-shadow: 0 1px 2px black; top:0;} display: block; top:0;}
header .account-box img:after{ header .account-box img:after{
content: " "; content: " ";
display: block; display: block;
......
...@@ -139,8 +139,7 @@ body header { ...@@ -139,8 +139,7 @@ body header {
.rss-icon { .rss-icon {
margin:0 15px; margin:0 15px;
padding:3px; padding:3px;
border:1px solid #ccc; border:1px solid #AAA;
border-radius:3px; border-radius:3px;
float:left; float:left;
background:#DDD;
} }
...@@ -21,6 +21,13 @@ class MergeRequestsController < ApplicationController ...@@ -21,6 +21,13 @@ class MergeRequestsController < ApplicationController
def index def index
@merge_requests = @project.merge_requests @merge_requests = @project.merge_requests
@merge_requests = case params[:f].to_i
when 2 then @merge_requests.closed
else @merge_requests.opened
end
@merge_requests = @merge_requests.includes(:author, :project)
end end
def show def show
......
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
%td= f.text_area :key, :style => "width:300px; height:130px" %td= f.text_area :key, :style => "width:300px; height:130px"
%br %br
.merge-tabs .merge-tabs
= f.submit 'Save', :class => "grey-button" = f.submit 'Save', :class => "positive-button"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.notice_holder .notice_holder
%li Deploy Keys do not exist yet. %li Deploy Keys do not exist yet.
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
%li You can add a new one by clicking on plus icon %li You can add a new one by clicking on "Add New" button
:javascript :javascript
$('.delete-key').live('ajax:success', function() { $('.delete-key').live('ajax:success', function() {
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
%br %br
%br %br
.merge-tabs .merge-tabs
= f.submit 'Save', :class => "grey-button" = f.submit 'Save', :class => "positive-button"
&nbsp; &nbsp;
- unless @issue.new_record? - unless @issue.new_record?
.right .right
......
...@@ -7,18 +7,20 @@ ...@@ -7,18 +7,20 @@
%div#issues-table-holder %div#issues-table-holder
.top_panel_issues .top_panel_issues
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :right, :id => "issue_search_form" do
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' } = hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
.right.issues_filter .left.issues_filter
= form_tag project_issues_path(@project), :method => :get do = form_tag project_issues_path(@project), :method => :get do
.left .left
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status" = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status"
= label_tag "open_issues","Open" = label_tag "open_issues" do
%span.tag.open Open
.left .left
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status" = radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status"
= label_tag "closed_issues","Closed" = label_tag "closed_issues" do
%span.tag.closed Closed
.left .left
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status" = radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
= label_tag "my_issues","To Me" = label_tag "my_issues","To Me"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
%br %br
%br %br
.merge-tabs .merge-tabs
= f.submit 'Save', :class => "grey-button" = f.submit 'Save', :class => "positive-button"
&nbsp; &nbsp;
- unless @merge_request.new_record? - unless @merge_request.new_record?
.right .right
......
= render "merge_requests/head" = render "merge_requests/head"
- if @merge_requests.opened.count > 0 .left.issues_filter
%div{ :class => "update-data ui-box ui-box-small ui-box-big" } = form_tag project_merge_requests_path(@project), :method => :get do
%h3 .left
%span.tag.open Open = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_merge_requests", :class => "status"
.data = label_tag "open_merge_requests" do
= render @merge_requests.opened %span.tag.open Open
.left
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_merge_requests", :class => "status"
= label_tag "closed_merge_requests" do
%span.tag.closed Closed
.clear .clear
%br %hr
- if @merge_requests.closed.count > 0 - if @merge_requests.count > 0
%div{ :class => "update-data ui-box ui-box-small ui-box-big" } %div{ :class => "update-data ui-box ui-box-small ui-box-big" }
%h3
%span.tag.closed Closed
.data .data
= render @merge_requests.closed = render @merge_requests
.clear .clear
%br %br
- unless @merge_requests.count > 0 - unless @merge_requests.count > 0 || params[:f] == "2"
.notice_holder .notice_holder
%li Merge Requests do not exist yet. %li Merge Requests do not exist yet.
- if can? current_user, :write_merge_request, @project - if can? current_user, :write_merge_request, @project
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
- if @snippet.new_record? - if @snippet.new_record?
= link_to project_snippets_path(@project) do = link_to project_snippets_path(@project) do
.entity-button .entity-button
Back Snippets
%i %i
- else - else
= link_to project_snippet_path(@project, @snippet) do = link_to project_snippet_path(@project, @snippet) do
.entity-button .entity-button
Back Show Snippet
%i %i
%h2= @snippet.new_record? ? "New Snippet" : "Edit Snippet ##{@snippet.id}" %h2= @snippet.new_record? ? "New Snippet" : "Edit Snippet ##{@snippet.id}"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
= f.text_area :content = f.text_area :content
.merge-tabs .merge-tabs
= f.submit 'Save', :class => "grey-button" = f.submit 'Save', :class => "positive-button"
- unless @snippet.new_record? - unless @snippet.new_record?
.right= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-snippet", :id => "destroy_snippet_#{@snippet.id}" .right= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-snippet", :id => "destroy_snippet_#{@snippet.id}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment