spree_zone_pricing 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/spree/admin/zone_prices_controller.rb +1 -3
- data/app/views/spree/admin/zone_prices/_form.html.erb +0 -60
- data/app/views/spree/admin/zone_prices/edit.html.erb +0 -15
- data/app/views/spree/admin/zone_prices/index.html.erb +0 -44
- data/app/views/spree/admin/zone_prices/new.html.erb +0 -9
- metadata +1 -1
@@ -1,9 +1,7 @@
|
|
1
1
|
class Spree::Admin::ZonePricesController < Spree::Admin::BaseController
|
2
2
|
|
3
3
|
def index
|
4
|
-
|
5
|
-
@search = ZonePrice.search(search)
|
6
|
-
@zone_prices = @search.page(params[:page]||1).per(20)
|
4
|
+
@zone_prices = ZonePrice.page(params[:page]||1).per(20)
|
7
5
|
end
|
8
6
|
|
9
7
|
def new
|
@@ -1,60 +0,0 @@
|
|
1
|
-
<%= nested_form_for @press, :url => @form_target, :method => @form_method do |f| %>
|
2
|
-
|
3
|
-
<% if @press.errors.any? %>
|
4
|
-
<div class="alert-message block-message error">
|
5
|
-
<p><strong><%= pluralize(@press.errors.count, "error") %></strong> prohibited this form from being saved:</p>
|
6
|
-
<ul>
|
7
|
-
<% @press.errors.full_messages.each do |msg| %>
|
8
|
-
<li><%= msg %></li>
|
9
|
-
<% end %>
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
13
|
-
|
14
|
-
<fieldset data-hook="new_press">
|
15
|
-
|
16
|
-
<%= f.field_container :address do %>
|
17
|
-
<%= f.label :address %> <span class="required">*</span><br />
|
18
|
-
<%= f.text_field :address, :class => 'fullwidth title' %>
|
19
|
-
<%= f.error_message_on :address %>
|
20
|
-
<% end %>
|
21
|
-
|
22
|
-
<div class="clearfix" data-hook="new_press_attrs">
|
23
|
-
|
24
|
-
<div class="left">
|
25
|
-
|
26
|
-
<%= f.field_container :city do %>
|
27
|
-
<%= f.label :city %> <span class="required">*</span><br />
|
28
|
-
<%= f.text_field :city %>
|
29
|
-
<%= f.error_message_on :city %>
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<%= f.field_container :country do %>
|
33
|
-
<%= f.label :country %> <span class="required">*</span><br />
|
34
|
-
<%= f.text_field :country %>
|
35
|
-
<%= f.error_message_on :country %>
|
36
|
-
<% end %>
|
37
|
-
|
38
|
-
<%= f.field_container :geocoords do %>
|
39
|
-
<%= f.label :geocoords %> <br />
|
40
|
-
<%= f.text_field :geocoords %>
|
41
|
-
<%= f.error_message_on :geocoords %>
|
42
|
-
<% end %>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div class="right">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</div>
|
51
|
-
|
52
|
-
</div>
|
53
|
-
|
54
|
-
<div class="actions">
|
55
|
-
<%= f.submit :class => "btn primary" %>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
</fieldset>
|
59
|
-
|
60
|
-
<% end %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div data-hook="admin_press_edit_header">
|
2
|
-
<%
|
3
|
-
=begin
|
4
|
-
%>
|
5
|
-
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
|
6
|
-
<%
|
7
|
-
=end
|
8
|
-
%>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div data-hook="admin_press_edit_form">
|
12
|
-
<div id="press-form-wrapper">
|
13
|
-
<%= render :partial => 'form', :locals => { :press => @press } %>
|
14
|
-
</div>
|
15
|
-
</div>
|
@@ -1,45 +1 @@
|
|
1
|
-
<div class='toolbar order-links'>
|
2
|
-
<%= button_link_to "New Press", new_admin_press_url, :icon => 'add', :id => 'admin_new_press' %>
|
3
|
-
</div>
|
4
1
|
|
5
|
-
<h1>Listing Presses</h1>
|
6
|
-
|
7
|
-
<table class="index" id="listing_orders" data-hook>
|
8
|
-
<thead>
|
9
|
-
<tr data-hook="admin_orders_index_headers">
|
10
|
-
<th><%= sort_link @search, :title, t(:title) %></th>
|
11
|
-
<th><%= sort_link @search, :download_url, t(:download_url) %></th>
|
12
|
-
<th data-hook="admin_events_index_header_actions"></th>
|
13
|
-
</tr>
|
14
|
-
</thead>
|
15
|
-
<tbody>
|
16
|
-
<% @presses.each do |press| %>
|
17
|
-
<tr data-hook="admin_presses_index_rows">
|
18
|
-
<td><%= link_to press.title, edit_admin_press_path(press) %></td>
|
19
|
-
<td><%= press.download_url %></td>
|
20
|
-
<td class='actions' data-hook="admin_presses_index_row_actions">
|
21
|
-
<%= link_to_edit_url edit_admin_press_path(press), :title => "admin_edit_#{dom_id(press)}" %>
|
22
|
-
|
23
|
-
<a href="#" onclick="jConfirm('Are you sure?', 'Confirm Deletion', function(r) {
|
24
|
-
if(r){
|
25
|
-
$.ajax({
|
26
|
-
type: 'POST',
|
27
|
-
url: '<%= admin_press_path(press) %>',
|
28
|
-
data: ({_method: 'delete', authenticity_token: AUTH_TOKEN}),
|
29
|
-
dataType:'script',
|
30
|
-
success: function(r){ $('#spree_image_1').fadeOut('hide'); },
|
31
|
-
error: function(jqXHR, textStatus, errorThrown){ if(jqXHR.status == 500) { show_flash_error(jqXHR.responseText); } else { press.reload(); } }
|
32
|
-
});
|
33
|
-
}
|
34
|
-
});; return false;"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>
|
35
|
-
</td>
|
36
|
-
</tr>
|
37
|
-
<% end %>
|
38
|
-
</tbody>
|
39
|
-
</table>
|
40
|
-
|
41
|
-
<%= paginate @presses %>
|
42
|
-
|
43
|
-
<% content_for :sidebar do %>
|
44
|
-
|
45
|
-
<% end %>
|