gitlab-org--gitlab-foss/app/views/projects/issues/_form.html.haml

36 lines
1.5 KiB
Plaintext
Raw Normal View History

%div.issue-form-holder
%h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}"
%hr
2014-04-08 15:12:57 +00:00
- if @repository.exists? && !@repository.empty? && @repository.contribution_guide && !@issue.persisted?
- contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
.row
.col-sm-10.col-sm-offset-2
.alert.alert-info
= "Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
= form_for [@project, @issue], html: { class: 'form-horizontal issue-form' } do |f|
2014-09-03 11:15:03 +00:00
= render 'projects/issuable_form', f: f, issuable: @issue
.form-group
= f.label :label_ids, class: 'control-label' do
%i.icon-tag
Labels
.col-sm-10
= f.collection_select :label_ids, @project.labels.all, :id, :name, { selected: @issue.label_ids }, multiple: true, class: 'select2'
2013-08-07 20:35:24 +00:00
.form-actions
- if @issue.new_record?
2013-01-29 20:18:19 +00:00
= f.submit 'Submit new issue', class: "btn btn-create"
-else
2013-01-29 20:18:19 +00:00
= f.submit 'Save changes', class: "btn-save btn"
2012-01-27 23:49:14 +00:00
2012-12-19 03:14:05 +00:00
- cancel_path = @issue.new_record? ? project_issues_path(@project) : project_issue_path(@project, @issue)
2013-01-29 20:18:19 +00:00
= link_to "Cancel", cancel_path, class: 'btn btn-cancel'
2012-12-18 03:14:05 +00:00
:javascript
2013-05-29 10:16:30 +00:00
$('.assign-to-me-link').on('click', function(e){
$('#issue_assignee_id').val("#{current_user.id}").trigger("change");
2013-05-29 10:16:30 +00:00
e.preventDefault();
});
window.project_image_path_upload = "#{upload_image_project_path @project}";