Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FontAwesome upgrade and rental template #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/bookingsync_portal/admin/help/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<article>
<header>
<%= link_to icon("times", t('.close')), admin_root_path, class: "pull-right" %>
<%= link_to icon("fa", "times", t('.close')), admin_root_path, class: "pull-right" %>
<h1><%=t '.title' %></h1>
</header>
<%= render 'help' %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
class: ["btn", "btn-xs", "remove-connection", rental.remote_rental.synchronized? ? "btn-success" : "btn-warning"],
data: { disable_with: t('.disconnecting_rental') }, method: :delete, remote: true do %>
<% unless rental.remote_rental.synchronized? %>
<span class="hover_hide"><%= icon('spinner') %></span>
<span class="hover_hide"><%= icon("fa", "spinner") %></span>
<% else %>
<span class="hover_hide"><%= icon('check') %></span>
<span class="hover_hide"><%= icon("fa", "check") %></span>
<% end %>
<span class="hover_show"><%= t('.disconnect_rental') %></span>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= link_to new_admin_remote_account_path, class: "btn btn-default" do %>
<%= icon :plus %> <%= t '.connect_accounts' %>
<%= icon "fa", "plus" %> <%= t '.connect_accounts' %>
<% end %>
6 changes: 3 additions & 3 deletions app/views/bookingsync_portal/admin/rentals/_rentals.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<%- if visible_rentals.count == 0 -%>
<div class="lead text-center well">
<p><%= t('.no_published_rentals_html', id: current_account.synced_id) %></p>
<p><%= t(".no_published_rentals_html", id: current_account.synced_id) %></p>
</div>
<%- elsif not_connected_rentals.count > 0 -%>
<% not_connected_rentals.each do |rental| %>
<%= render rental %>
<% end %>
<%- else -%>
<div class="lead text-center well">
<p class=""><%= icon 'thumbs-up fa-lg' %></p>
<p><%=t '.all_synchronized' %></p>
<p class=""><%= icon "fa", "thumbs-up fa-lg" %></p>
<p><%=t ".all_synchronized" %></p>
</div>
<%- end -%>
4 changes: 2 additions & 2 deletions app/views/bookingsync_portal/admin/rentals/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%- content_for :navbar_right do -%>
<ul class="nav navbar-nav">
<li><%= link_to icon("life-ring", t('.help')), admin_help_path %></li>
<li><%= link_to icon("fa", "life-ring", t('.help')), admin_help_path %></li>
</ul>
<%- end -%>
<div class="rentals-container row">
Expand Down Expand Up @@ -39,7 +39,7 @@
<% end %>
<%- elsif !BookingsyncPortal.create_remote_rental -%>
<div class="lead text-center well">
<p class=""><%= icon 'info fa-lg' %></p>
<p class=""><%= icon "fa", "info fa-lg" %></p>
<p><%=t '.create_listings_first', portal_name: BookingsyncPortal.portal_name %></p>
</div>
<%- end -%>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/bookingsync_portal/_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</button>
<%- end -%>
<div>
<%= link_to icon("globe", BookingsyncPortal.portal_name), admin_root_path,
<%= link_to icon("fa", "globe", BookingsyncPortal.portal_name), admin_root_path,
class: "navbar-brand h1",
data: { toggle: "dropdown" } %>
</a>
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/templates/models/rental.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Rental < BookingsyncPortal::Rental
local_attributes: [:position, :published_at],
include: [:availability],
delegate_attributes: [:name, :sleeps, :sleeps_max, :bedrooms_count, :bathrooms_count,
:surface, :surface_symbol]
:surface, :surface_unit]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZenCocoon ,
hm, is this kind of the hotfix? Is it possible we have issues on bsa-channel apps?


def surface_unit_symbol
surface_unit == "imperial" ? "ft²" : "m²"
Expand Down