Merge branch 'new_issue' into dev
This commit is contained in:
commit
3fa770dd10
12 changed files with 84 additions and 18 deletions
|
@ -662,6 +662,10 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
|
|||
background: #4466cc;
|
||||
color:white;
|
||||
}
|
||||
&.normal {
|
||||
background: #2c5ca6;
|
||||
color:white;
|
||||
}
|
||||
&.notes {
|
||||
background: #2c5c66;
|
||||
color:white;
|
||||
|
|
|
@ -34,7 +34,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@notes = @issue.notes
|
||||
@notes = @issue.notes.order("created_at ASC")
|
||||
@note = @project.notes.new(:noteable => @issue)
|
||||
end
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ class Issue < ActiveRecord::Base
|
|||
:presence => true,
|
||||
:length => { :within => 0..255 }
|
||||
|
||||
validates :content,
|
||||
:presence => true,
|
||||
:length => { :within => 0..2000 }
|
||||
#validates :content,
|
||||
#:presence => true,
|
||||
#:length => { :within => 0..2000 }
|
||||
|
||||
scope :critical, where(:critical => true)
|
||||
scope :non_critical, where(:critical => false)
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
.span-8
|
||||
= f.label :title
|
||||
= f.text_field :title, :style => "width:450px"
|
||||
.span-8
|
||||
= f.label :content
|
||||
= f.text_area :content, :style => "width:450px; height:130px"
|
||||
= f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255
|
||||
-#.span-8
|
||||
-#= f.label :content
|
||||
-#= f.text_area :content, :style => "width:450px; height:130px"
|
||||
.span-8.append-bottom
|
||||
= f.label :assignee_id
|
||||
= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
= truncate issue.assignee.name, :lenght => 20
|
||||
%td ##{issue.id}
|
||||
%td
|
||||
= html_escape issue.title
|
||||
= truncate(html_escape(issue.title), :length => 60)
|
||||
%br
|
||||
- if issue.critical
|
||||
%span.tag.high critical
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
});
|
||||
|
||||
$('.delete-issue').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
$(this).closest('tr').fadeOut(); updatePage();});
|
||||
|
||||
function setSortable(){
|
||||
$('#issues-table>tbody').sortable({
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
%h2
|
||||
= "Issue ##{@issue.id} - #{@issue.title}"
|
||||
|
||||
= "Issue ##{@issue.id} - #{html_escape(@issue.title)}"
|
||||
.span-15
|
||||
= simple_format html_escape(@issue.content)
|
||||
-#= simple_format html_escape(@issue.content)
|
||||
.issue_notes= render "notes/notes"
|
||||
.span-8.right
|
||||
.span-8
|
||||
|
@ -29,6 +28,16 @@
|
|||
%td
|
||||
= image_tag gravatar_icon(@issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= @issue.assignee.name
|
||||
%tr
|
||||
%td Tags
|
||||
%td
|
||||
- if @issue.critical
|
||||
%span.tag.high critical
|
||||
- else
|
||||
%span.tag.normal normal
|
||||
|
||||
- if @issue.today?
|
||||
%span.tag.today today
|
||||
%tr
|
||||
%td Closed?
|
||||
%td
|
||||
|
@ -39,5 +48,10 @@
|
|||
- else
|
||||
= check_box_tag "closed", 1, @issue.closed, :disabled => true
|
||||
|
||||
|
||||
- if can?(current_user, :admin_issue, @issue)
|
||||
.clear
|
||||
= link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true
|
||||
.right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}"
|
||||
.clear
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- if @issue.valid?
|
||||
:plain
|
||||
$("#edit_issue_dialog").dialog("close");
|
||||
$.ajax({type: "GET", url: location.href, dataType: "script"});
|
||||
updatePage();
|
||||
- else
|
||||
:plain
|
||||
$("#edit_issue_dialog").empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue