diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-11 15:49:25 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-18 14:47:50 +0200 |
commit | 13804aba867d19009ca94d820aa7ec650a509f5a (patch) | |
tree | 64c0d9415d81bb3104ba84af3834115f3a8cc5e1 /app/views/projects/blob | |
parent | 073c3d15c71a0f877b62c7d3d7417a9721da1dba (diff) | |
download | gitlab-ce-13804aba867d19009ca94d820aa7ec650a509f5a.tar.gz |
Continue implementation of the license template selector and /licenses API endpoint
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/_editor.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/blob/new.html.haml | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 8ebbc91f81d..fefa652a3da 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -14,7 +14,7 @@ .pull-right .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 } + = select_tag :license_type, grouped_options_for_select(licenses_for_select, @project.repository.license_key), include_blank: true, class: 'select2 license-select', data: {placeholder: 'Choose a license template', project: @project.name, fullname: @project.namespace.human_name} .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2' @@ -26,8 +26,3 @@ .center %h2 %i.icon-spinner.icon-spin - -:javascript - window.onload = function() { - new BlobLicenseSelector(blob.editor) - } diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 1dd2b5c0af7..0459699432e 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -14,5 +14,5 @@ cancel_path: namespace_project_tree_path(@project.namespace, @project, @id) :javascript - blob = new NewBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", null) + blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}") new NewCommitForm($('.js-new-blob-form')) |