/ TODO
/ Replace ApplicationName
.home
.banners
.row
.col-md-10.col-md-offset-2
%h2 ApplicationName Connector
%p
Link your Maestrano account to ApplicationName to get your business in synch. Check the status of your connection on this screen.
.container
- if current_user
- unless is_admin
.row
.col-md-12.alert.alert-warning
Only administrators can modify the application settings
.row.link-step
.col-md-1.text-center.link-step-number
%span.badge.link-step-badge
1
.col-md-3.text-center
=image_tag "logos/default-white.png", class: 'logo'
.col-md-6.link-step-description
%h
Your Maestrano company #{@organization.name} (#{@organization.uid}) is currently linked
.col-md-2.text-center.link-step-action
= link_to "Disconnect", Maestrano::Connector::Rails::Engine.routes.url_helpers.maestrano_signout_path, class: "btn btn-warning btn-lg #{is_admin ? '' : 'disabled'}"
.spacer1
.row.link-step
.col-md-1.text-center.link-step-number
%span.badge.link-step-badge
2
.col-md-3.text-center
=image_tag "logos/external.png", class: 'logo'
.col-md-6.link-step-description
%h
- if @organization.oauth_uid
Your ApplicationName account #{@organization.oauth_name} (#{@organization.oauth_uid}) is currently linked
- else
Your ApplicationName account is not linked
.col-md-2.text-center.link-step-action
- if @organization.oauth_uid
/ TODO
= link_to "Disconnect", root_path, class: "btn btn-warning btn-lg #{is_admin ? '' : 'disabled'}"
- else
/ TODO
= link_to "Link to ApplicationName", root_path, class: "btn btn-warning btn-lg #{is_admin ? '' : 'disabled'}"
.spacer1
.row.link-step
.col-md-1.text-center.link-step-number
%span.badge.link-step-badge
3
.col-md-3.text-center
=image_tag "logos/sync.png", class: 'logo'
.col-md-6.link-step-description
%h
- if @organization.sync_enabled
Synchronizations are enabled
- else
Synchronizations are disabled
.col-md-2.text-center.link-step-action
= link_to "Toggle #{@organization.sync_enabled ? 'off' : 'on'}", home_toggle_sync_path, method: :put, class: "btn btn-warning btn-lg #{is_admin ? '' : 'disabled'}"
- else
.row
.col-md-4.col-md-offset-4.center
= link_to "Link your Maestrano account", Maestrano::Connector::Rails::Engine.routes.url_helpers.default_maestrano_auth_saml_index_path(tenant: :default), class: 'btn btn-warning'
- if @organization
.spacer2
.row
.col-md-12
%h1
Synchronized entities
%small You can customize which entities are synchronized by the connector
.spacer1
.row
.col-md-10.col-md-offset-1
= form_tag home_update_path(id: @organization.id), method: :put do
- @organization.synchronized_entities.each do |k, v|
.row.sync-entity
.col-md-1.link-step-action
%input{type: "checkbox", id: "#{k}", name: "#{k}", checked: v}
.col-md-7{style: 'padding-top: 5px;'}
%label{:for => "#{k}"} #{k.to_s.humanize}
-if is_admin
.col-md-4.text-right
- if v && @organization.oauth_uid
- if @organization.sync_enabled
= link_to "Force a synchronization for #{k.to_s.humanize.pluralize} only", home_synchronize_path(opts: {only_entities: [k.to_s]}), method: :post, class: "btn btn-warning btn-sm #{is_admin && @organization.sync_enabled ? '' : 'disabled'}"
- else
.btn.btn-warning.btn-sm.disabled= "Force a synchronization for #{k.to_s.humanize.pluralize} only"
-if is_admin
.spacer1
.row
.col-md-4.col-md-offset-8.text-right
=submit_tag :Save, class: "btn btn-primary"