2018-07-22 15:44:29 +00:00
|
|
|
<h3>Edit software</h3>
|
|
|
|
|
|
|
|
<%= render 'form_errors' %>
|
|
|
|
|
|
|
|
<%= form_with(
|
|
|
|
scope: :software,
|
|
|
|
url: software_path(@software),
|
|
|
|
class: 'uk-form-horizontal uk-form-width-large',
|
|
|
|
model: @software,
|
|
|
|
local: true
|
|
|
|
) do |form|
|
|
|
|
%>
|
|
|
|
<p>
|
|
|
|
<%= form.label :name, class: 'uk-form-label' %><br>
|
|
|
|
<%= form.text_field :name, class: 'uk-input' %>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<%= form.label :website, class: 'uk-form-label' %><br>
|
|
|
|
<%= form.text_field :website, class: 'uk-input' %>
|
|
|
|
</p>
|
2018-07-29 19:06:32 +00:00
|
|
|
<p>
|
|
|
|
<%= form.label :repository_type, class: 'uk-form-label' %><br>
|
|
|
|
<%= form.select :repository_type, [nil, 'Github'], {}, class: 'uk-select' %>
|
|
|
|
</p>
|
2018-07-22 15:44:29 +00:00
|
|
|
<p>
|
|
|
|
<%= form.submit class: 'uk-button uk-button-default uk-margin' %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2018-07-29 19:06:32 +00:00
|
|
|
|
|
|
|
<% case @software.repository_type %>
|
|
|
|
<% when 'Github' %>
|
|
|
|
<h4>Github</h4>
|
|
|
|
<%= form_with(
|
|
|
|
scope: :repository,
|
|
|
|
url: @repository_form_path,
|
|
|
|
class: 'uk-form-horizontal uk-form-width-large',
|
|
|
|
model: @repository,
|
|
|
|
local: true
|
|
|
|
) do |form|
|
|
|
|
%>
|
|
|
|
<p>
|
|
|
|
<%= form.label :repository, class: 'uk-form-label' %><br>
|
|
|
|
<%= form.text_field :name, value: @repository.name, class: 'uk-input' %>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<%= form.hidden_field :software_id, value: @software.id %>
|
|
|
|
<%= form.submit class: 'uk-button uk-button-default uk-margin' %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|