bookingsync_portal 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70c553579d2fb8322fc661ada084195779e13da4
4
- data.tar.gz: 41663f7b076257ffb65727a9caf5df9dd35a95d0
3
+ metadata.gz: 12c181520fd6a06a79e9374fb7a0ca87ce5228aa
4
+ data.tar.gz: b7e12e4164f3e2c7e6b317a7661e42fc4bc2a4fc
5
5
  SHA512:
6
- metadata.gz: 17f5f8fc8f5d07f501b48541bd367502bf3f50695699f0a20b586d7b8321317ba4d704335cba537f51bd9390e5ea55fe03942b92ef28a65d29953a363a137473
7
- data.tar.gz: ba94728ae1ce9bca0f16b05ed59f4fd37d8a67c553ee7b397fc643d9000ad109082a29d84ff21586e7ebdbe9fdec372e53fddb8fcad3f35a7ed004ab32746e27
6
+ metadata.gz: 930e2b38ee381f07cf4124a74b741cef6ee690a2ae99425c9773f6fcf574f0c9e41c7d7f3c38d7413f88f8c4f9e87d2be57c0274fc2d93114596b7a0ef1bd344
7
+ data.tar.gz: 79d1d3023ba912134dbe57c994a103f0a4024ca8ee797430f282f7ece1133cf942355e6d1d8b16e9d675722d546fca297439609c94e71cc96f046c71a130caa0
@@ -6,6 +6,7 @@ module BookingsyncPortal
6
6
 
7
7
  def index
8
8
  @not_connected_rentals = current_account.rentals.ordered.not_connected
9
+ @rentals = current_account.rentals.ordered
9
10
  @remote_accounts = current_account.remote_accounts
10
11
  @remote_rentals_by_account = current_account.remote_rentals.ordered
11
12
  .includes(:remote_account).group_by(&:remote_account)
@@ -4,7 +4,11 @@
4
4
  <legend><%=t '.bookingsync_header', account_name: current_account.name %></legend>
5
5
  </div>
6
6
  <div class="rentals-list-scroll">
7
- <%- if @not_connected_rentals.length > 0 -%>
7
+ <%- if @rentals.count == 0 -%>
8
+ <div class="lead text-center well">
9
+ <p><%= t('.no_published_rentals_html', id: current_account.uid) %></p>
10
+ </div>
11
+ <%- elsif @not_connected_rentals.count > 0 -%>
8
12
  <% @not_connected_rentals.each do |rental| %>
9
13
  <%= render rental %>
10
14
  <% end %>
@@ -24,6 +24,7 @@ en:
24
24
  connect: Connect
25
25
  bookingsync_header: "BookingSync: %{account_name}"
26
26
  all_synchronized: Perfect! All your rentals are synchronized.
27
+ no_published_rentals_html: 'No published rentals present, please make sure to <a href="https://www.bookingsync.com/en/admin/v2/%{id}/rentals" target="_blank">fill all your rentals details</a>.'
27
28
  create_listings_first: You must create your rentals on Remote Account before you can synchronize them automatically.
28
29
  connect_accounts: Add External Portal Account
29
30
  remote_header: "Remote Account: %{account_name}"
@@ -1,3 +1,3 @@
1
1
  module BookingsyncPortal
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Marciniak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails