Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Davydov <antondavydov.o@gmail.com>2016-03-01 15:36:50 +0300
committerRémy Coutable <remy@rymai.me>2016-04-18 15:47:50 +0300
commit073c3d15c71a0f877b62c7d3d7417a9721da1dba (patch)
tree83dd1a990857e54ebd91f6ef3f6494e51cdd0f47 /app/views/projects/blob/_editor.html.haml
parent06952aaf24633550f57fd54b70d27732509935c2 (diff)
Initial implementation if license template selector and /licenses/:key API endpoint
Diffstat (limited to 'app/views/projects/blob/_editor.html.haml')
-rw-r--r--app/views/projects/blob/_editor.html.haml11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml
index f8b6fa253c4..8ebbc91f81d 100644
--- a/app/views/projects/blob/_editor.html.haml
+++ b/app/views/projects/blob/_editor.html.haml
@@ -13,7 +13,11 @@
required: true, class: 'form-control new-file-name'
.pull-right
- = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
+ .license-selector.js-license-selector.hide
+ = select_tag :license_type, grouped_options_for_select(@licenses, @current_license_key), include_blank: true, class: 'select2 license-select', data: { fullname: @repository.project.creator.name }
+
+ .encoding-selector
+ = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
.file-content.code
%pre.js-edit-mode-pane#editor #{params[:content] || local_assigns[:blob_data]}
@@ -22,3 +26,8 @@
.center
%h2
%i.icon-spinner.icon-spin
+
+:javascript
+ window.onload = function() {
+ new BlobLicenseSelector(blob.editor)
+ }