Links, mainly...
This commit is contained in:
parent
fd42a3f173
commit
21ab02d647
69 changed files with 2258 additions and 155 deletions
5
app/views/link_categories/_form.html.erb
Normal file
5
app/views/link_categories/_form.html.erb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<%= bootstrap_form_with(model: link_category) do |form| %>
|
||||
<%= form.text_field :name %>
|
||||
<%= form.rich_text_area :description_html %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
12
app/views/link_categories/_link_category.html.erb
Normal file
12
app/views/link_categories/_link_category.html.erb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<div id="<%= dom_id link_category %>">
|
||||
<p>
|
||||
<strong>Name:</strong>
|
||||
<%= link_category.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Description:</strong>
|
||||
<%= link_category.description_html %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
2
app/views/link_categories/_link_category.json.jbuilder
Normal file
2
app/views/link_categories/_link_category.json.jbuilder
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
json.extract! link_category, :id, :name, :description, :rich_text, :created_at, :updated_at
|
||||
json.url link_category_url(link_category, format: :json)
|
||||
8
app/views/link_categories/edit.html.erb
Normal file
8
app/views/link_categories/edit.html.erb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<h1><%= t("scaffold.pagetitle_edit", model: LinkCategory.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", link_category: @link_category %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_show", model: LinkCategory.model_name.human), @link_category %>
|
||||
<%= link_to t("scaffold.link_index", model: LinkCategory.model_name.human(count: 2)), link_categories_path %>
|
||||
</div>
|
||||
29
app/views/link_categories/index.html.erb
Normal file
29
app/views/link_categories/index.html.erb
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<h1><%= t("scaffold.pagetitle_index", model: LinkCategory.model_name.human(count: 2)) %></h1>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= LinkCategory.human_attribute_name(:id) %></th>
|
||||
|
||||
<th><%= LinkCategory.human_attribute_name(:name) %></th>
|
||||
|
||||
<th><%= LinkCategory.human_attribute_name(:description) %></th>
|
||||
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @link_categories.each do |link_category| %>
|
||||
<tr>
|
||||
<td><%= link_to(link_category.id, url_for(link_category)) %></td>
|
||||
|
||||
<td><%= link_to(link_category.name, url_for(link_category)) %></td>
|
||||
|
||||
<td><%= link_to(link_category.description, url_for(link_category)) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: LinkCategory.model_name.human), new_link_category_path %>
|
||||
</div>
|
||||
1
app/views/link_categories/index.json.jbuilder
Normal file
1
app/views/link_categories/index.json.jbuilder
Normal file
|
|
@ -0,0 +1 @@
|
|||
json.array! @link_categories, partial: "link_categories/link_category", as: :link_category
|
||||
7
app/views/link_categories/new.html.erb
Normal file
7
app/views/link_categories/new.html.erb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: LinkCategory.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", link_category: @link_category %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: LinkCategory.model_name.human(count: 2)), link_categories_path %>
|
||||
</div>
|
||||
9
app/views/link_categories/show.html.erb
Normal file
9
app/views/link_categories/show.html.erb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<h1><%= t("scaffold.pagetitle_show", model: @link_category.class.model_name.human) %></h1>
|
||||
|
||||
<%= render @link_category %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @link_category.model_name.human), edit_link_category_path(@link_category) %>
|
||||
<%= link_to t("scaffold.link_index", model: @link_category.model_name.human(count: 2)), link_categories_path %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @link_category.model_name.human), @link_category, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
1
app/views/link_categories/show.json.jbuilder
Normal file
1
app/views/link_categories/show.json.jbuilder
Normal file
|
|
@ -0,0 +1 @@
|
|||
json.partial! "link_categories/link_category", link_category: @link_category
|
||||
Loading…
Add table
Add a link
Reference in a new issue