fix encoding error, issues critical status added

This commit is contained in:
Dmitriy Zaporozhets 2011-10-25 19:23:39 +03:00
parent 016012b145
commit 1d69788099
15 changed files with 99 additions and 21 deletions

View file

@ -11,7 +11,7 @@
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
%p
%strong
= commit.truncated_message
= truncate(commit.safe_message, :length => 60)
= link_to "Browse Code", tree_project_path(@project, :commit_id => commit.id), :class => "lite_button", :style => "float:right"
= link_to truncate(commit.id.to_s, :length => 16), project_commit_path(@project, :id => commit.id), :class => "lite_button", :style => "width:120px;float:right"
%span

View file

@ -1,5 +1,5 @@
%h3
= "[ #{@commit.committer} ] #{@commit.truncated_message(40)}"
= "[ #{@commit.committer} ] #{truncate(@commit.safe_message)}"
-#= link_to 'Back', project_commits_path(@project), :class => "button"
%table.round-borders
%tr
@ -16,7 +16,7 @@
%td= @commit.committed_date
%tr
%td Message
%td= @commit.message
%td= @commit.safe_message
%tr
%td Tree
%td= link_to 'Browse Code', tree_project_path(@project, :commit_id => @commit.id)

View file

@ -5,17 +5,21 @@
- @issue.errors.full_messages.each do |msg|
%li= msg
.span-6
.span-8
= f.label :title
= f.text_field :title, :style => "width:450px"
.span-6
.span-8
= f.label :content
= f.text_area :content, :style => "width:450px; height:130px"
.span-6.append-bottom
.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" })
.span-1
= f.label :critical, "Critical"
%br
= f.check_box :critical
- unless @issue.new_record?
.span-3.right
.span-2.right
= f.label :closed
%br
= f.check_box :closed

View file

@ -1,10 +1,15 @@
%table.round-borders#issues-table
%tr
- if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0"
%th
%th Assignee
%th ID
%th Title
%th Closed?
%th
- @issues.each do |issue|
- @issues.critical.each do |issue|
= render(:partial => 'show', :locals => {:issue => issue})
- @issues.non_critical.each do |issue|
= render(:partial => 'show', :locals => {:issue => issue})

View file

@ -1,10 +1,24 @@
%tr{ :id => dom_id(issue), :class => "issue", :url => project_issue_path(@project, issue) }
%tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) }
- if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0"
%td
= image_tag "move.png" , :class => [:handle, :left]
%td
= image_tag "move.png" , :class => [:handle, :left]
= image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;"
= truncate issue.assignee.name, :lenght => 20
%td ##{issue.id}
%td= html_escape issue.title
%td
= html_escape issue.title
%br
- if issue.critical
%span.tag.high critical
- if issue.today?
%span.tag.today today
-#- if issue.author == current_user
-#%span.tag.yours yours
-#- if issue.notes.count > 0
-#%span.tag.notes
-#= issue.notes.count
-#notes
%td
- if can? current_user, :write_issue, @project
= form_for([@project, issue], :remote => true) do |f|

View file

@ -6,7 +6,7 @@
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
%p{:style => "margin-bottom: 3px;"}
%strong
= link_to commit.truncated_message(60), project_commit_path(@project, :id => commit.id)
= link_to truncate(commit.safe_message, :length => 60), project_commit_path(@project, :id => commit.id)
%span
%span.author

View file

@ -19,7 +19,7 @@
- css_class = "dash_commit"
- commit = parent
- item_code = commit.author.email
- link_item_name = commit.truncated_message(50)
- link_item_name = truncate(commit.safe_message, :length => 50)
- link_to_item = project_commit_path(@project, :id => commit.id)
- else
- css_class = "dash_wall"

View file

@ -12,4 +12,4 @@
= time_ago_in_words(content_commit.committed_date)
ago
%td
= link_to content_commit.truncated_message(40), project_commit_path(@project, content_commit)
= link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit)