Commit b753bfd1 authored by Stephan van Leeuwen's avatar Stephan van Leeuwen

Updated issuable form to only show create links if allowed, and added...

Updated issuable form to only show create links if allowed, and added contribution guide url to form actions.

Also changed icon for labels.
Removed contribution guide notice from issue form.
parent a9cf84e5
...@@ -52,10 +52,11 @@ ...@@ -52,10 +52,11 @@
- else - else
%span.light No open milestones available. %span.light No open milestones available.
   
- if can? current_user, :admin_milestone, issuable.project
= link_to 'Create new milestone', new_project_milestone_path(issuable.project), target: :blank = link_to 'Create new milestone', new_project_milestone_path(issuable.project), target: :blank
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, class: 'control-label' do
%i.icon-tag %i.fa.fa-tag
Labels Labels
.col-sm-10 .col-sm-10
- if issuable.project.labels.any? - if issuable.project.labels.any?
...@@ -64,9 +65,15 @@ ...@@ -64,9 +65,15 @@
- else - else
%span.light No labels yet. %span.light No labels yet.
   
- if can? current_user, :admin_label, issuable.project
= link_to 'Create new label', new_project_label_path(issuable.project), target: :blank = link_to 'Create new label', new_project_label_path(issuable.project), target: :blank
.form-actions .form-actions
- if contribution_guide_url(issuable.project) && !issuable.persisted?
%p
Please review the
%strong #{link_to 'guidelines for contribution', contribution_guide_url(issuable.project)}
to this repository.
- if issuable.new_record? - if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' = f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
- else - else
......
%div.issue-form-holder %div.issue-form-holder
%h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}" %h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}"
%hr %hr
- 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 gfm-form' } do |f| = form_for [@project, @issue], html: { class: 'form-horizontal issue-form gfm-form' } do |f|
= render 'projects/issuable_form', f: f, issuable: @issue = render 'projects/issuable_form', f: f, issuable: @issue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment