Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3391 emphasize template select #3863

Merged
merged 9 commits into from
Oct 14, 2024
7 changes: 2 additions & 5 deletions apps/dashboard/app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,8 @@ def templates
[label, project.directory, data]
end

if templates.size.positive?
templates.prepend(['', '', { 'data-description': '', 'data-icon': '' }])
else
[]
end
return templates if templates.size.positive?
return []
end

def project_params
Expand Down
7 changes: 3 additions & 4 deletions apps/dashboard/app/views/projects/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
%>

<div class='card'>
<h2 class='card-header'>Project Details</h2>
<%= render(partial: "template_select", locals: { form: form, templates: @templates}) %>
<div id='project_form'>
<div class='card-header'>
<%= form.select(:template, @templates, { prompt: "--- select template ---" }, required: true, label_class: "h4")%>
</div>
<div class='card-group'>
<div class='card'>
<div class='card-body'>
Expand Down Expand Up @@ -81,6 +81,5 @@
<%= link_to 'Back', projects_path, class: 'btn btn-default',
title: 'Return to projects page' %>
</p>
</div>
</div>

34 changes: 0 additions & 34 deletions apps/dashboard/app/views/projects/_template_select.html.erb

This file was deleted.

Loading