gitlabhq/app/views/issues/_form.html.haml
Dmitriy Zaporozhets ff1cbbc532 Issue restyle
2011-12-14 08:58:35 +02:00

57 lines
1.6 KiB
Plaintext

%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
Back
%i
- else
- if @issue.new_record?
= link_to project_issues_path(@project) do
.entity-button
Back
%i
- else
= link_to project_issue_path(@project, @issue) do
.entity-button
Back
%i
%h2= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
%hr
%table.no-borders
-if @issue.errors.any?
%tr
%td{:colspan => 2}
#error_explanation
- @issue.errors.full_messages.each do |msg|
%span= msg
%br
%tr
%td= f.label :assignee_id
%td= 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
= f.text_area :title, :style => "width:718px; height:100px", :maxlength => 255
%br
%br
.merge-tabs
= f.submit 'Save', :class => "grey-button"
 
- unless @issue.new_record?
.right
= link_to 'Remove', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"