usability improvements
This commit is contained in:
parent
c5a48a6a90
commit
e48a0b8eab
11 changed files with 41 additions and 30 deletions
|
@ -11,8 +11,8 @@
|
|||
}
|
||||
|
||||
.issues_filter {
|
||||
margin-top:10px;
|
||||
.left {
|
||||
margin:10px 0;
|
||||
.left {
|
||||
margin-right:15px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ header .account-box img{
|
|||
right: 20px;
|
||||
position: absolute;
|
||||
width: 33px; height: 33px;
|
||||
display: block; box-shadow: 0 1px 2px black; top:0;}
|
||||
display: block; top:0;}
|
||||
header .account-box img:after{
|
||||
content: " ";
|
||||
display: block;
|
||||
|
|
|
@ -139,8 +139,7 @@ body header {
|
|||
.rss-icon {
|
||||
margin:0 15px;
|
||||
padding:3px;
|
||||
border:1px solid #ccc;
|
||||
border:1px solid #AAA;
|
||||
border-radius:3px;
|
||||
float:left;
|
||||
background:#DDD;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,13 @@ class MergeRequestsController < ApplicationController
|
|||
|
||||
def index
|
||||
@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
|
||||
|
||||
def show
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
%td= f.text_area :key, :style => "width:300px; height:130px"
|
||||
%br
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
= f.submit 'Save', :class => "positive-button"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
.notice_holder
|
||||
%li Deploy Keys do not exist yet.
|
||||
- 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
|
||||
$('.delete-key').live('ajax:success', function() {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
%br
|
||||
%br
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
= f.submit 'Save', :class => "positive-button"
|
||||
|
||||
- unless @issue.new_record?
|
||||
.right
|
||||
|
|
|
@ -7,18 +7,20 @@
|
|||
|
||||
%div#issues-table-holder
|
||||
.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' }
|
||||
= 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
|
||||
.left
|
||||
= 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
|
||||
= 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
|
||||
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
|
||||
= label_tag "my_issues","To Me"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
%br
|
||||
%br
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
= f.submit 'Save', :class => "positive-button"
|
||||
|
||||
- unless @merge_request.new_record?
|
||||
.right
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
= render "merge_requests/head"
|
||||
|
||||
- if @merge_requests.opened.count > 0
|
||||
.left.issues_filter
|
||||
= form_tag project_merge_requests_path(@project), :method => :get do
|
||||
.left
|
||||
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_merge_requests", :class => "status"
|
||||
= label_tag "open_merge_requests" do
|
||||
%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
|
||||
%hr
|
||||
|
||||
- if @merge_requests.count > 0
|
||||
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
||||
%h3
|
||||
%span.tag.open Open
|
||||
.data
|
||||
= render @merge_requests.opened
|
||||
= render @merge_requests
|
||||
|
||||
.clear
|
||||
%br
|
||||
|
||||
- if @merge_requests.closed.count > 0
|
||||
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
|
||||
%h3
|
||||
%span.tag.closed Closed
|
||||
.data
|
||||
= render @merge_requests.closed
|
||||
.clear
|
||||
%br
|
||||
|
||||
- unless @merge_requests.count > 0
|
||||
- unless @merge_requests.count > 0 || params[:f] == "2"
|
||||
.notice_holder
|
||||
%li Merge Requests do not exist yet.
|
||||
- if can? current_user, :write_merge_request, @project
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
- if @snippet.new_record?
|
||||
= link_to project_snippets_path(@project) do
|
||||
.entity-button
|
||||
Back
|
||||
Snippets
|
||||
%i
|
||||
- else
|
||||
= link_to project_snippet_path(@project, @snippet) do
|
||||
.entity-button
|
||||
Back
|
||||
Show Snippet
|
||||
%i
|
||||
%h2= @snippet.new_record? ? "New Snippet" : "Edit Snippet ##{@snippet.id}"
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
= f.text_area :content
|
||||
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
= f.submit 'Save', :class => "positive-button"
|
||||
- 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}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue