diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-05-06 17:13:16 +0200 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-05-20 15:58:36 -0500 |
commit | fab9dbb3eba55151c34fc8bc171e3670e6c7c422 (patch) | |
tree | c08e23dde57ed18176ea3d7b408c877b81c0fec0 /app/views/projects/blob | |
parent | e166a8022a3f239938a1449a0a8ce3485f309766 (diff) | |
download | gitlab-ce-fab9dbb3eba55151c34fc8bc171e3670e6c7c422.tar.gz |
First import of gitignores
Add .gitignore dropdown when creating a new .gitignore file
Signed-off-by: Alfredo Sumaran <alfredo@gitlab.com>
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/_editor.html.haml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index eac5014b7c9..5efec92cf6b 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -16,8 +16,10 @@ .license-selector.js-license-selector.hide = 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} - .gitignore-selector.js-gitignore-selector.hide - = select_tag :gitignore_template, options_for_select(Gitlab::Gitignore.all), include_blank: true, class: 'select2 gitignore-select', data: {placeholder: 'Choose a .gitignore template'} + .gitignore-selector.hidden + = dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter projects", data: { filenames: Gitlab::Gitignore.all.map.with_index{ |v| {text: v.name} } } } ) + + -# = select_tag :gitignore_template, options_for_select(Gitlab::Gitignore.all.map(&:name)), include_blank: true, class: 'select2 gitignore-select', data: {placeholder: 'Choose a .gitignore template'} .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2' |