summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-19 15:37:20 +0100
committerDouwe Maan <douwe@gitlab.com>2015-11-19 15:37:20 +0100
commit97842cea7409d80a3bf22f3ab8993a2ce3b02195 (patch)
treed1932d75d53a98912a91d53cc1ee779025b30101
parent347f136229b19994f2e52b936dc6136cde0c9133 (diff)
downloadgitlab-ce-new-tag-textarea.tar.gz
Fix 'Attach a file' link in new tag formnew-tag-textarea
-rw-r--r--app/views/projects/_zen.html.haml9
-rw-r--r--app/views/projects/releases/edit.html.haml3
-rw-r--r--app/views/projects/tags/new.html.haml13
3 files changed, 9 insertions, 16 deletions
diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml
index 63ebfc9381f..7e6301abde8 100644
--- a/app/views/projects/_zen.html.haml
+++ b/app/views/projects/_zen.html.haml
@@ -2,9 +2,12 @@
%input#zen-toggle-comment.zen-toggle-comment(tabindex="-1" type="checkbox")
.zen-backdrop
- classes << ' js-gfm-input markdown-area'
- = f.text_area attr, class: classes, placeholder: ''
+ - if defined?(f) && f
+ = f.text_area attr, class: classes, placeholder: ''
+ - else
+ = text_area_tag attr, nil, class: classes, placeholder: ''
%a.zen-enter-link(tabindex="-1" href="#")
- %i.fa.fa-expand
+ = icon('expand')
Edit in fullscreen
%a.zen-leave-link(href="#")
- %i.fa.fa-compress
+ = icon('compress')
diff --git a/app/views/projects/releases/edit.html.haml b/app/views/projects/releases/edit.html.haml
index e7db09cdaa9..f516b65ecd0 100644
--- a/app/views/projects/releases/edit.html.haml
+++ b/app/views/projects/releases/edit.html.haml
@@ -11,10 +11,9 @@
.prepend-top-default
= form_for(@release, method: :put, url: namespace_project_tag_release_path(@project.namespace, @project, @tag.name), html: { class: 'form-horizontal gfm-form release-form' }) do |f|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
- = render 'projects/zen', f: f, attr: :description, classes: 'description js-quick-submit'
+ = render 'projects/zen', f: f, attr: :description, classes: 'description js-quick-submit form-control'
= render 'projects/notes/hints'
.error-alert
.prepend-top-default
= f.submit 'Save changes', class: 'btn btn-save'
= link_to "Cancel", namespace_project_tag_path(@project.namespace, @project, @tag.name), class: "btn btn-default btn-cancel"
-
diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml
index e106be794f1..86aa15dc5b3 100644
--- a/app/views/projects/tags/new.html.haml
+++ b/app/views/projects/tags/new.html.haml
@@ -10,7 +10,7 @@
New git tag
%hr
-= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal tag-form" do
+= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal gfm-form tag-form" do
.form-group
= label_tag :tag_name, 'Name for new tag', class: 'control-label'
.col-sm-10
@@ -30,16 +30,7 @@
= label_tag :release_description, 'Release notes', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
- .zennable
- %input#zen-toggle-comment.zen-toggle-comment(tabindex="-1" type="checkbox")
- .zen-backdrop
- = text_area_tag :release_description, nil, class: 'js-gfm-input markdown-area description js-quick-submit form-control', placeholder: ''
- %a.zen-enter-link(tabindex="-1" href="#")
- = icon('expand')
- Edit in fullscreen
- %a.zen-leave-link(href="#")
- = icon('compress')
-
+ = render 'projects/zen', attr: :release_description, classes: 'description js-quick-submit form-control'
= render 'projects/notes/hints'
.help-block (Optional) You can add release notes to your tag. It will be stored in the GitLab database and shown on the tags page
.form-actions