settings controllers
This commit is contained in:
14
app/views/settings/tax_profiles/_form.html.erb
Normal file
14
app/views/settings/tax_profiles/_form.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :rate %>
|
||||
<%= f.input :inclusive %>
|
||||
<%= f.input :order_by %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,2 @@
|
||||
json.extract! settings_tax_profile, :id, :name, :rate, :inclusive, :order_by, :created_by, :created_at, :updated_at
|
||||
json.url settings_tax_profile_url(settings_tax_profile, format: :json)
|
||||
10
app/views/settings/tax_profiles/edit.html.erb
Normal file
10
app/views/settings/tax_profiles/edit.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_tax_profiles_path %>">Tax Profiles</a></li>
|
||||
<li>Edit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', settings_tax_profile: @settings_tax_profile %>
|
||||
</div>
|
||||
43
app/views/settings/tax_profiles/index.html.erb
Normal file
43
app/views/settings/tax_profiles/index.html.erb
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li>Settings</li>
|
||||
|
||||
<li>Tax Profile</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_tax_profile_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<div class="card-deck">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Rate</th>
|
||||
<th>Inclusive</th>
|
||||
<th>Order by</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="2">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @settings_tax_profiles.each do |settings_tax_profile| %>
|
||||
<tr>
|
||||
<td><%= settings_tax_profile.name %></td>
|
||||
<td><%= settings_tax_profile.rate %></td>
|
||||
<td><%= settings_tax_profile.inclusive %></td>
|
||||
<td><%= settings_tax_profile.order_by %></td>
|
||||
<td><%= settings_tax_profile.created_by %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_tax_profile_path(settings_tax_profile) %></td>
|
||||
<td><%= link_to 'Destroy', settings_tax_profile_path(:settings,settings_tax_profile ), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
1
app/views/settings/tax_profiles/index.json.jbuilder
Normal file
1
app/views/settings/tax_profiles/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @settings_tax_profiles, partial: 'settings_tax_profiles/settings_tax_profile', as: :settings_tax_profile
|
||||
5
app/views/settings/tax_profiles/new.html.erb
Normal file
5
app/views/settings/tax_profiles/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New Settings Tax Profile</h1>
|
||||
|
||||
<%= render 'form', settings_tax_profile: @settings_tax_profile %>
|
||||
|
||||
<%= link_to 'Back', settings_tax_profiles_path %>
|
||||
29
app/views/settings/tax_profiles/show.html.erb
Normal file
29
app/views/settings/tax_profiles/show.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<strong>Name:</strong>
|
||||
<%= @settings_tax_profile.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Rate:</strong>
|
||||
<%= @settings_tax_profile.rate %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Inclusive:</strong>
|
||||
<%= @settings_tax_profile.inclusive %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Order by:</strong>
|
||||
<%= @settings_tax_profile.order_by %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Created by:</strong>
|
||||
<%= @settings_tax_profile.created_by %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_settings_tax_profile_path(@settings_tax_profile) %> |
|
||||
<%= link_to 'Back', settings_tax_profiles_path %>
|
||||
1
app/views/settings/tax_profiles/show.json.jbuilder
Normal file
1
app/views/settings/tax_profiles/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "settings_tax_profiles/settings_tax_profile", settings_tax_profile: @settings_tax_profile
|
||||
Reference in New Issue
Block a user