gitlabhq/app/views/issues/_form.html.haml

54 lines
1.7 KiB
Plaintext
Raw Normal View History

%div.issue-form-holder
2011-12-14 07:58:35 +01:00
= form_for [@project, @issue], :remote => request.xhr? do |f|
2012-01-28 00:49:14 +01:00
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
%hr
2012-01-17 23:46:13 +01:00
-if @issue.errors.any?
2012-01-28 00:49:14 +01:00
.alert-message.block-message.error
%ul
- @issue.errors.full_messages.each do |msg|
%li= msg
.clearfix
2012-04-08 23:28:58 +02:00
= f.label :title, "Issue Subject *"
.input
= f.text_field :title, :maxlength => 255, :class => "xxlarge"
.clearfix
= f.label :assignee_id, "Assign to *"
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Assign to user" })
2012-03-17 04:24:40 +01:00
.clearfix
= f.label :description, "Issue Details"
2012-03-17 17:13:42 +01:00
.input
2012-03-25 18:44:29 +02:00
= f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 10
%p.hint Markdown is enabled.
2012-04-08 23:28:58 +02:00
2012-01-28 00:49:14 +01:00
.clearfix
2012-04-08 23:28:58 +02:00
= f.label :milestone_id
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { :include_blank => "Select milestone" })
2011-12-14 07:58:35 +01:00
2012-01-28 00:49:14 +01:00
.clearfix
= f.label :critical, "Critical"
.input= f.check_box :critical
2011-12-14 07:58:35 +01:00
2012-01-28 00:49:14 +01:00
- unless @issue.new_record?
.clearfix
= f.label :closed
.input= f.check_box :closed
2012-01-29 11:04:09 +01:00
.actions
- if @issue.new_record?
= f.submit 'Submit new issue', :class => "primary btn"
-else
= f.submit 'Save changes', :class => "primary btn"
2012-01-28 00:49:14 +01:00
- 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"