summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/issues.js16
-rw-r--r--app/assets/stylesheets/common.scss4
-rw-r--r--app/assets/stylesheets/issues.css.scss12
-rw-r--r--app/assets/stylesheets/top_panel.scss7
-rw-r--r--app/controllers/application_controller.rb4
-rw-r--r--app/controllers/refs_controller.rb2
-rw-r--r--app/views/issues/_form.html.haml74
-rw-r--r--app/views/issues/_head.html.haml11
-rw-r--r--app/views/issues/_show.html.haml10
-rw-r--r--app/views/issues/index.html.haml53
-rw-r--r--app/views/layouts/_project_side_right.html.haml38
-rw-r--r--app/views/layouts/project.html.haml9
-rw-r--r--app/views/notes/_form.html.haml4
-rw-r--r--app/views/projects/_feed.html.haml24
14 files changed, 145 insertions, 123 deletions
diff --git a/app/assets/javascripts/issues.js b/app/assets/javascripts/issues.js
index 85ae43bd628..ded66b1c540 100644
--- a/app/assets/javascripts/issues.js
+++ b/app/assets/javascripts/issues.js
@@ -1,17 +1,17 @@
function switchToNewIssue(form){
- $("#issues-table").hide("slide", { direction: "left" }, 150, function(){
- $("#issues-table").after(form);
+ $(".issues_content").hide("fade", { direction: "left" }, 150, function(){
+ $(".issues_content").after(form);
$('select#issue_assignee_id').chosen();
- $("#new_issue_dialog").show("slide", { direction: "right" }, 150);
+ $("#new_issue_dialog").show("fade", { direction: "right" }, 150);
$('.top-tabs .add_new').hide();
});
}
function switchToEditIssue(form){
- $("#issues-table").hide("slide", { direction: "left" }, 150, function(){
- $("#issues-table").after(form);
+ $(".issues_content").hide("fade", { direction: "left" }, 150, function(){
+ $(".issues_content").after(form);
$('select#issue_assignee_id').chosen();
- $("#edit_issue_dialog").show("slide", { direction: "right" }, 150);
+ $("#edit_issue_dialog").show("fade", { direction: "right" }, 150);
$('.add_new').hide();
});
}
@@ -25,8 +25,8 @@ function switchFromEditIssue(){
}
function backToIssues(){
- $("#edit_issue_dialog, #new_issue_dialog").hide("slide", { direction: "right" }, 150, function(){
- $("#issues-table").show("slide", { direction: "left" }, 150, function() {
+ $("#edit_issue_dialog, #new_issue_dialog").hide("fade", { direction: "right" }, 150, function(){
+ $(".issues_content").show("fade", { direction: "left" }, 150, function() {
$("#edit_issue_dialog").remove();
$("#new_issue_dialog").remove();
$('.add_new').show();
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 3b5c3531d6b..8167e23cf87 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -125,7 +125,9 @@ $blue_link: "#2fa0bb";
margin-top:20px;
}
-aside.projects {
+aside.projects,
+aside.project-side
+{
margin-left: 0;
padding-left: 20px;
}
diff --git a/app/assets/stylesheets/issues.css.scss b/app/assets/stylesheets/issues.css.scss
index 198e1a3b7c0..ecf1ca01142 100644
--- a/app/assets/stylesheets/issues.css.scss
+++ b/app/assets/stylesheets/issues.css.scss
@@ -1,15 +1,3 @@
-.issue-number {
- float: left;
- border-radius: 5px;
- text-shadow: none;
- background: rgba(0, 0, 0, 0.12);
- text-align: center;
- padding: 14px 8px;
- width: 40px;
- margin-right: 10px;
- color: #444;
-}
-
#issue_assignee_id {
width:300px;
}
diff --git a/app/assets/stylesheets/top_panel.scss b/app/assets/stylesheets/top_panel.scss
index e8c0ae55cdd..aa9c3313911 100644
--- a/app/assets/stylesheets/top_panel.scss
+++ b/app/assets/stylesheets/top_panel.scss
@@ -1,5 +1,5 @@
.main_links {
- width:130px;
+ width:155px;
float:left;
a {
@@ -68,10 +68,7 @@ body header {
min-width:$min_app_width;
max-width:$max_app_width;
position:relative;
-
- .top_panel_content {
- padding:10px $app_padding;
- }
+ padding:10px $app_padding;
}
.project_name {
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 00ab93a153d..5a5b4aeb8d4 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -95,4 +95,8 @@ class ApplicationController < ActionController::Base
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end
+
+ def render_full_content
+ @full_content = true
+ end
end
diff --git a/app/controllers/refs_controller.rb b/app/controllers/refs_controller.rb
index 2f887a4ebe1..d564bb661ce 100644
--- a/app/controllers/refs_controller.rb
+++ b/app/controllers/refs_controller.rb
@@ -8,6 +8,8 @@ class RefsController < ApplicationController
before_filter :ref
before_filter :define_tree_vars, :only => [:tree, :blob]
+ before_filter :render_full_content
+
layout "project"
def switch
diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml
index 2ba6978a030..9f7fac1f066 100644
--- a/app/views/issues/_form.html.haml
+++ b/app/views/issues/_form.html.haml
@@ -1,51 +1,41 @@
%div.issue-form-holder
= form_for [@project, @issue], :remote => request.xhr? do |f|
- %div
- %span.entity-info
- - if request.xhr?
- = link_to "#back", :onclick => "backToIssues();" do
- .entity-button
- Issues
- %i
- - else
- - if @issue.new_record?
- = link_to project_issues_path(@project) do
- .entity-button
- Issues
- %i
- - else
- = link_to project_issue_path(@project, @issue) do
- .entity-button
- Show Issue
- %i
-
- %h2= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
- %hr
+ %h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
+ %hr
-if @issue.errors.any?
- %ul.errors_holder
- - @issue.errors.full_messages.each do |msg|
- %li= msg
+ .alert-message.block-message.error
+ %ul
+ - @issue.errors.full_messages.each do |msg|
+ %li= msg
- %table.no-borders
- %tr
- %td= f.label :assignee_id
- %td= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
+ .clearfix
+ = f.label :assignee_id
+ .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
- %tr
- %td= f.label :critical, "Critical"
- %td= f.check_box :critical
-
- - unless @issue.new_record?
- %tr
- %td= f.label :closed
- %td= f.check_box :closed
+ .clearfix
+ = f.label :critical, "Critical"
+ .input= f.check_box :critical
- = f.text_area :title, :style => "width:718px; height:100px", :maxlength => 255
- %br
- %br
- .merge-tabs
+ - unless @issue.new_record?
+ .clearfix
+ = f.label :closed
+ .input= f.check_box :closed
+
+ .clearfix
+ = f.label :title
+ .input= f.text_area :title, :maxlength => 255, :class => "xlarge"
+ .clearfix
= f.submit 'Save', :class => "primary btn"
- &nbsp;
- - unless @issue.new_record?
+
+ - if request.xhr?
+ = link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn"
+ - else
+ - if @issue.new_record?
+ = link_to "Cancel", project_issues_path(@project), :class => "btn"
+ - else
+ = link_to "Cancel", project_issue_path(@project, @issue), :class => "btn"
+
+
+ -#- unless @issue.new_record?
.right
= link_to 'Remove', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
diff --git a/app/views/issues/_head.html.haml b/app/views/issues/_head.html.haml
index 91494592ab2..d539025296a 100644
--- a/app/views/issues/_head.html.haml
+++ b/app/views/issues/_head.html.haml
@@ -2,14 +2,3 @@
%li{:class => "#{'active' if current_page?(project_issues_path(@project))}"}
= link_to project_issues_path(@project), :class => "tab" do
Issues
-
- -#= link_to project_issues_path(@project), :class => "tab" do
- %span
- Milestones
-
- - if current_page?(project_issues_path(@project))
- - if can? current_user, :write_issue, @project
- %li
- = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do
- Add new
-
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml
index 4cfb62e22d8..4c0d11e6a58 100644
--- a/app/views/issues/_show.html.haml
+++ b/app/views/issues/_show.html.haml
@@ -2,7 +2,7 @@
%td
= image_tag gravatar_icon(issue.assignee_email), :class => "left", :width => 40, :style => "padding-right:5px;"
%span
- = truncate(html_escape(issue.title), :length => 100)
+ = truncate(html_escape(issue.title), :length => 50)
%div.note-author
%strong= issue.assignee.name
%cite.cgray
@@ -15,10 +15,10 @@
.right.action-links
- if can? current_user, :write_issue, issue
- if issue.closed
- = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true
+ = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small", :remote => true
- else
- = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
+ = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small", :remote => true
- if can? current_user, :write_issue, issue
- = link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "cgray edit-issue-link", :remote => true
+ = link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
- = link_to 'Remove', [issue.project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
+ = link_to 'Remove', [issue.project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "danger btn small delete-issue", :id => "destroy_issue_#{issue.id}"
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 859181d4732..3e85e5cded8 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -1,41 +1,46 @@
-= render "issues/head"
+- if can? current_user, :write_issue, @project
+ = content_for :sidebar_top_block do
+ - if current_user.can_create_project?
+ .alert-message.block-message.error
+ You are able to create an issue. Click on button to add a new one
+ = link_to new_project_issue_path(@project), :class => "btn small", :title => "New Issue", :remote => true do
+ New Issue
+
- if current_user.private_token
= content_for :rss_icon do
.rss-icon
= link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do
= image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
-%div#issues-table-holder
- .well
- = form_tag project_issues_path(@project), :method => :get, :class => :left do
- = label_tag "open_issues" do
- = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status"
- %span.tag.open Open
- = label_tag "closed_issues" do
- = radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status"
- %span.tag.closed Closed
- = label_tag "my_issues" do
- = radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
- %span To Me
- = label_tag "all_issues" do
- = radio_button_tag :f, 1, params[:f] == "1", :onclick => "setIssueFilter(this.form, 1)", :id => "all_issues", :class => "status"
- %span All
+
+.issues_content
+ %h3 Issues
+ %hr
+ %div#issues-table-holder
+ %ul.pills.left
+ %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
+ = link_to project_issues_path(@project, :f => 0) do
+ Open
+ %li{:class => ("active" if params[:f] == "2")}
+ = link_to project_issues_path(@project, :f => 2) do
+ Closed
+ %li{:class => ("active" if params[:f] == "3")}
+ = link_to project_issues_path(@project, :f => 3) do
+ To Me
+ %li{:class => ("active" if params[:f] == "1")}
+ = link_to project_issues_path(@project, :f => 1) do
+ All
+
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
- %table#issues-table
- = render "issues"
- %br
+ %table#issues-table= render "issues"
+
:javascript
var href = $('.issue_search').parent().attr('action');
var last_terms = '';
- var setIssueFilter = function(form, value){
- $.cookie('issue_filter', value, { expires: 140 });
- form.submit();
- }
-
$('.issue_search').keyup(function() {
var terms = $(this).val();
var project_id = $('#project_id').val();
diff --git a/app/views/layouts/_project_side_right.html.haml b/app/views/layouts/_project_side_right.html.haml
new file mode 100644
index 00000000000..a8793976b4d
--- /dev/null
+++ b/app/views/layouts/_project_side_right.html.haml
@@ -0,0 +1,38 @@
+%aside.project-right
+ - if content_for? :sidebar_top_block
+ = yield :sidebar_top_block
+ - else
+ - if current_user.can_create_project?
+ .alert-message.block-message.info
+ You can create at least
+ = current_user.projects_limit
+ projects. Click on button to add a new one
+ = link_to new_project_path, :class => "btn small" do
+ New Project
+
+ %h4
+ Recent Projects:
+ %ul
+ - current_user.projects.order("id DESC").limit(5).each do |project|
+ %li
+ = link_to project_path(project) do
+ = project.name
+
+ %h4
+ Recent Issues:
+ %ul
+ - current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
+ %li
+ = link_to project_issue_path(issue.project, issue) do
+ = truncate issue.title
+
+
+ %h4
+ Recent Requests:
+ %ul
+ - current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
+ %li
+ = link_to project_merge_request_path(issue.project, issue) do
+ = truncate issue.title
+
+
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 67882a240f4..97467e4caa6 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -18,4 +18,11 @@
= render :partial => "layouts/head_panel"
.container-fluid
.sidebar= render :partial => "layouts/project_side"
- .content= yield
+ .content
+ - if @full_content
+ = yield
+ - else
+ .row
+ .span10= yield
+ .span4= render "layouts/project_side_right"
+
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index 9e74564e2cd..7adfba8e813 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -10,7 +10,7 @@
= f.text_area :note, :size => 255
.row
- .span6
+ .span4
%h5 Notify via email:
.clearfix
= label_tag :notify do
@@ -21,7 +21,7 @@
= label_tag :notify_author do
= check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
%span Commit author
- .span6
+ .span4.right
%h5 Attachment:
.clearfix
= f.label :attachment, "Any file, < 10 MB"
diff --git a/app/views/projects/_feed.html.haml b/app/views/projects/_feed.html.haml
index 4f8e59f8c51..7667f78732d 100644
--- a/app/views/projects/_feed.html.haml
+++ b/app/views/projects/_feed.html.haml
@@ -1,7 +1,7 @@
- if update.kind_of?(Note)
%a.project-update.titled{:href => dashboard_feed_path(project, update)}
- = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
- %span.update-title
+ = image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
+ %div
= dashboard_feed_title(update)
%span.update-author
%strong= update.author_name
@@ -10,7 +10,7 @@
- noteable = update.target
- if noteable.kind_of?(MergeRequest)
.title-block
- %span.update-title
+ %div
%span.commit.tag
Merge Request #
= noteable.id
@@ -21,7 +21,7 @@
- elsif noteable.kind_of?(Issue)
.title-block
- %span.update-title
+ %div
%span.commit.tag
Issue #
= noteable.id
@@ -30,29 +30,29 @@
- elsif noteable.kind_of?(Commit)
.title-block
- %span.update-title
+ %div
%span.commit.tag
commit
%span.update-author
.left= truncate noteable.id
- else
.title-block
- %span.update-title
+ %div
%span.commit.tag
Project Wall
- elsif update.kind_of?(MergeRequest)
%a.project-update.titled{:href => project_merge_request_path(project, update)}
- = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
- %span.update-title
+ = image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
+ %div
Opened merge request
%span.update-author
%strong= update.author_name
= time_ago_in_words(update.created_at)
ago
.title-block
- %span.update-title
+ %div
%span.commit.tag
Merge Request #
= update.id
@@ -63,15 +63,15 @@
- elsif update.kind_of?(Issue)
%a.project-update.titled{:href => dashboard_feed_path(project, update)}
- = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
- %span.update-title
+ = image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
+ %div
Created new Issue
%span.update-author
%strong= update.author_name
= time_ago_in_words(update.created_at)
ago
.title-block
- %span.update-title
+ %div
%span.commit.tag
Issue #
= update.id