settings controllers

This commit is contained in:
Min Zeya Phyo
2017-04-18 13:01:05 +06:30
parent dbad900cd4
commit a717791a7c
49 changed files with 7233 additions and 6080 deletions

View 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 %>

View File

@@ -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)

View 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>

View 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>

View File

@@ -0,0 +1 @@
json.array! @settings_tax_profiles, partial: 'settings_tax_profiles/settings_tax_profile', as: :settings_tax_profile

View 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 %>

View 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 %>

View File

@@ -0,0 +1 @@
json.partial! "settings_tax_profiles/settings_tax_profile", settings_tax_profile: @settings_tax_profile