Commit 29b5aa2c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Bootstrap: Issues restyled

parent 7f6e41fa
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();
......
......@@ -125,7 +125,9 @@ $blue_link: "#2fa0bb";
margin-top:20px;
}
aside.projects {
aside.projects,
aside.project-side
{
margin-left: 0;
padding-left: 20px;
}
......
.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;
}
.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 {
......
......@@ -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
......@@ -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
......
%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"
......@@ -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
......@@ -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}"
= 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();
......
%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
......@@ -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"
......@@ -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"
......
- 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
......
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