mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
create sponsor_tier
This commit is contained in:
13
app/views/sponsor_tiers/_form.html.erb
Normal file
13
app/views/sponsor_tiers/_form.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
<%= simple_form_for(@sponsor_tier) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :tier %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
2
app/views/sponsor_tiers/_sponsor_tier.json.jbuilder
Normal file
2
app/views/sponsor_tiers/_sponsor_tier.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! sponsor_tier, :id, :tier, :created_at, :updated_at
|
||||
json.url sponsor_tier_url(sponsor_tier, format: :json)
|
||||
6
app/views/sponsor_tiers/edit.html.erb
Normal file
6
app/views/sponsor_tiers/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Sponsor Tier</h1>
|
||||
|
||||
<%= render 'form', sponsor_tier: @sponsor_tier %>
|
||||
|
||||
<%= link_to 'Show', @sponsor_tier %> |
|
||||
<%= link_to 'Back', sponsor_tiers_path %>
|
||||
27
app/views/sponsor_tiers/index.html.erb
Normal file
27
app/views/sponsor_tiers/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Sponsor Tiers</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tier</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @sponsor_tiers.each do |sponsor_tier| %>
|
||||
<tr>
|
||||
<td><%= sponsor_tier.tier %></td>
|
||||
<td><%= link_to 'Show', sponsor_tier %></td>
|
||||
<td><%= link_to 'Edit', edit_sponsor_tier_path(sponsor_tier) %></td>
|
||||
<td><%= link_to 'Destroy', sponsor_tier, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Sponsor Tier', new_sponsor_tier_path %>
|
||||
1
app/views/sponsor_tiers/index.json.jbuilder
Normal file
1
app/views/sponsor_tiers/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @sponsor_tiers, partial: "sponsor_tiers/sponsor_tier", as: :sponsor_tier
|
||||
5
app/views/sponsor_tiers/new.html.erb
Normal file
5
app/views/sponsor_tiers/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New Sponsor Tier</h1>
|
||||
|
||||
<%= render 'form', sponsor_tier: @sponsor_tier %>
|
||||
|
||||
<%= link_to 'Back', sponsor_tiers_path %>
|
||||
9
app/views/sponsor_tiers/show.html.erb
Normal file
9
app/views/sponsor_tiers/show.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<strong>Tier:</strong>
|
||||
<%= @sponsor_tier.tier %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_sponsor_tier_path(@sponsor_tier) %> |
|
||||
<%= link_to 'Back', sponsor_tiers_path %>
|
||||
1
app/views/sponsor_tiers/show.json.jbuilder
Normal file
1
app/views/sponsor_tiers/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "sponsor_tiers/sponsor_tier", sponsor_tier: @sponsor_tier
|
||||
Reference in New Issue
Block a user