From e166a8022a3f239938a1449a0a8ce3485f309766 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Fri, 29 Apr 2016 16:25:03 +0200 Subject: Backend for a gitignores dropdown --- app/views/projects/blob/_editor.html.haml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/views/projects/blob') diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index fefa652a3da..eac5014b7c9 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -16,6 +16,9 @@ .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'} + .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2' -- cgit v1.2.1 From fab9dbb3eba55151c34fc8bc171e3670e6c7c422 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Fri, 6 May 2016 17:13:16 +0200 Subject: First import of gitignores Add .gitignore dropdown when creating a new .gitignore file Signed-off-by: Alfredo Sumaran --- app/views/projects/blob/_editor.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/projects/blob') 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' -- cgit v1.2.1 From 1f5fcb638d6b432d76a639ccc35acc94d8ae6ac7 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 11 May 2016 19:38:43 -0500 Subject: Dropdown implementation --- app/views/projects/blob/_editor.html.haml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/views/projects/blob') diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 5efec92cf6b..678eadafe15 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -17,9 +17,7 @@ = 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.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'} + = dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { filenames: gitignores_for_select } } ) .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2' -- cgit v1.2.1 From ab96ca2bf1ae72817ff5cedf1792c8f7563ebdef Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 13 May 2016 10:57:03 -0500 Subject: Dropdown implementation --- app/views/projects/blob/_editor.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/blob') diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 678eadafe15..4071b59c003 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -17,7 +17,7 @@ = 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.hidden - = dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { filenames: gitignores_for_select } } ) + = dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { filenames: gitignore_names } } ) .encoding-selector = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2' -- cgit v1.2.1 From cdcb354f1764a3483d6220f301ff983692554c4d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 26 May 2016 17:58:44 +0200 Subject: Remove header title from project pages With new navigation design it makes no sense to duplicate title in the header Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/blob/_header_title.html.haml | 1 - app/views/projects/blob/edit.html.haml | 1 - app/views/projects/blob/new.html.haml | 1 - app/views/projects/blob/show.html.haml | 1 - 4 files changed, 4 deletions(-) delete mode 100644 app/views/projects/blob/_header_title.html.haml (limited to 'app/views/projects/blob') diff --git a/app/views/projects/blob/_header_title.html.haml b/app/views/projects/blob/_header_title.html.haml deleted file mode 100644 index 78c5ef20a5f..00000000000 --- a/app/views/projects/blob/_header_title.html.haml +++ /dev/null @@ -1 +0,0 @@ -- header_title project_title(@project, "Files", project_files_path(@project)) diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index effcce5a1c4..e4f04ca7764 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -1,5 +1,4 @@ - page_title "Edit", @blob.path, @ref -= render "header_title" .file-editor %ul.nav-links.no-bottom.js-edit-mode diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 0459699432e..c952bc7e5db 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,5 +1,4 @@ - page_title "New File", @path.presence, @ref -= render "header_title" %h3.page-title New File diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index 6988039b6c7..ed670dae88d 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -1,5 +1,4 @@ - page_title @blob.path, @ref -= render "header_title" = render 'projects/last_push' -- cgit v1.2.1