adcurve_spree 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70e60a51d6f99df923b18d41d39cd029bef1165d
4
- data.tar.gz: 1cac5802181d3f4566a6818e63b046d9dda570be
3
+ metadata.gz: da825a5c256dc442202d432cd7af4ebeef01d4f4
4
+ data.tar.gz: a3846238d471307b17c7fa45a03b4205097236a9
5
5
  SHA512:
6
- metadata.gz: de2d73d0e91b3e89532c74e81f01722d8f220db65756194a1cc92b53dd71a0e0b17c13bb5fdae3dfc359b27fd0a3d2fd7fa08cace816f54287aaf8dae5a6e43b
7
- data.tar.gz: 1bc3e782037a64f30e6bc4552686ad2a61fbdaec18732b3feb65e4f3d7ab4419e237cb599f63c3de4d1c39c30483c6957c16acc7c0b6ea6453071b9116bb4310
6
+ metadata.gz: f79bd8f2a6e602f0a0e466d3812c4b455098db4c4750f255b8548a946dd4110f1b446da9c81a6efd560b82f6dafe3f8374123647746c08d6771671c062e6612d
7
+ data.tar.gz: 96d74895cc4a790b3720958947efe14c6ca3ae8b10454737b1c980ffcec6d9ff99c386ab43ff6783979c1d3a3988e33d4314202e2575eca1a742d1020bb447ce
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'adcurve_spree'
5
- s.version = '0.0.11'
5
+ s.version = '0.0.12'
6
6
  s.summary = 'Adcurve Spree Integration plugin'
7
7
  s.description = 'Easy install adcurve support in to your spree ecommerce site'
8
8
  s.required_ruby_version = '>= 2.1.6'
@@ -7,4 +7,7 @@ class Spree::Admin::AdcurveTagsController < Spree::Admin::ResourceController
7
7
  def new
8
8
  end
9
9
 
10
+ def edit
11
+ @adcurve_tag = Spree::AdcurveTag.first
12
+ end
10
13
  end
@@ -1,6 +1,8 @@
1
1
  class Spree::AdcurveTag < ActiveRecord::Base
2
+ validates :adcurve_host, :adcurve_shop_id, :api_key, presence: true
2
3
  #attr_accessible :adcurve_host, :adcurve_shop_id
3
4
 
5
+
4
6
  def self.activated?
5
7
  first.present?
6
8
  end
@@ -1,10 +1,10 @@
1
- <%= f.label :adcurve_host %>
2
- <%= f.text_field :adcurve_host %>
3
- <br /><br />
4
- <%= f.label :adcurve_shop_id %>
5
- <%= f.text_field :adcurve_shop_id %>
6
- <br /><br />
7
- <%= f.label :api_key %>
8
- <%= f.text_field :api_key %>
9
- <br /><br />
10
- <%= f.submit %>
1
+ <%= f.label :adcurve_host %>
2
+ <%= f.text_field :adcurve_host, :class => 'form-control' %>
3
+ <br />
4
+ <%= f.label :adcurve_shop_id %>
5
+ <%= f.text_field :adcurve_shop_id, :class => 'form-control' %>
6
+ <br />
7
+ <%= f.label :api_key %>
8
+ <%= f.text_field :api_key, :class => 'form-control' %>
9
+ <br />
10
+ <%= f.submit 'Save', :name => 'save', :class => 'btn btn-primary'%>
@@ -0,0 +1,13 @@
1
+ <% if @adcurve_tag.errors.any? %>
2
+ <h2>Errors:</h2>
3
+ <ul>
4
+ <% @adcurve_tag.errors.full_messages.each do |message| %>
5
+ <li><%= message %></li>
6
+ <% end %>
7
+ </ul>
8
+ <% end %>
9
+
10
+
11
+ <%= form_for [:admin, @adcurve_tag] do |f| %>
12
+ <%= render :partial => "form", :locals => { :f => f } %>
13
+ <% end %>
@@ -1,13 +1,19 @@
1
1
  <h1><%= t('spree.adcurve') %></h1>
2
+ <div class="col-md-6">
3
+ <br />
4
+ <br />
5
+ <% if @adcurve_tag.new_record? %>
6
+ <%= form_for [:admin, @adcurve_tag] do |f| %>
7
+ <%= render :partial => "form", :locals => { :f => f } %>
8
+ <% end %>
2
9
 
3
- <br />
4
- <br />
5
- <% if @adcurve_tag.new_record? %>
6
- <%= form_for [:admin, @adcurve_tag] do |f| %>
7
- <%= render :partial => "form", :locals => { :f => f } %>
10
+ <% else %>
11
+ <%= form_for [:admin, @adcurve_tag], :method => :put do |f| %>
12
+ <%= render :partial => "form", :locals => { :f => f } %>
13
+ <% end %>
14
+ <br />
15
+ <% if @adcurve_tag.api_key.present? %>
16
+ <%= submit_tag 'Test Conection', :name => 'test conection', :class => 'btn btn-primary' %>
17
+ <% end %>
8
18
  <% end %>
9
- <% else %>
10
- <%= form_for [:admin, @adcurve_tag], :method => :put do |f| %>
11
- <%= render :partial => "form", :locals => { :f => f } %>
12
- <% end %>
13
- <% end %>
19
+ </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adcurve_spree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav O. Pogrebnyak
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-01 00:00:00.000000000 Z
12
+ date: 2016-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -318,6 +318,7 @@ files:
318
318
  - app/views/spree/adcurve_tag/_coversion_tag.html.erb
319
319
  - app/views/spree/adcurve_tag/_tracking_tag.html.erb
320
320
  - app/views/spree/admin/adcurve_tags/_form.html.erb
321
+ - app/views/spree/admin/adcurve_tags/edit.html.erb
321
322
  - app/views/spree/admin/adcurve_tags/index.html.erb
322
323
  - config/locales/en.yml
323
324
  - config/routes.rb