This commit is contained in:
yamin
2017-08-21 16:33:59 +06:30
28 changed files with 544 additions and 67 deletions

View File

@@ -0,0 +1,2 @@
json.extract! commission, :id, :created_at, :updated_at
json.url commission_url(commission, format: :json)

View File

@@ -0,0 +1,10 @@
<%= simple_form_for(@commission) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing Commission</h1>
<%= render 'form', commission: @commission %>
<%= link_to 'Show', @commission %> |
<%= link_to 'Back', commissions_path %>

View File

@@ -0,0 +1,25 @@
<p id="notice"><%= notice %></p>
<h1>Commissions</h1>
<table>
<thead>
<tr>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @commissions.each do |commission| %>
<tr>
<td><%= link_to 'Show', commission %></td>
<td><%= link_to 'Edit', edit_commission_path(commission) %></td>
<td><%= link_to 'Destroy', commission, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Commission', new_commission_path %>

View File

@@ -0,0 +1 @@
json.array! @commissions, partial: 'commissions/commission', as: :commission

View File

@@ -0,0 +1,5 @@
<h1>New Commission</h1>
<%= render 'form', commission: @commission %>
<%= link_to 'Back', commissions_path %>

View File

@@ -0,0 +1,4 @@
<p id="notice"><%= notice %></p>
<%= link_to 'Edit', edit_commission_path(@commission) %> |
<%= link_to 'Back', commissions_path %>

View File

@@ -0,0 +1 @@
json.partial! "commissions/commission", commission: @commission