Sha256: cf9dbb5c66a67ff819056efed08c9265ba6bda96ad00189d20bcb56ff8825038

Contents?: true

Size: 1.63 KB

Versions: 14

Compression:

Stored size: 1.63 KB

Contents

<!-- TODO -->
<!-- This template is given as an example of the informations that
can be displayed on the home page -->
<!-- This view is designed according to the home controller supplied -->
<div class='home'>
  <%= link_to 'Admin panel', admin_index_path %>
  <% unless current_user %>
    <%= link_to "Link your Maestrano account", maestrano_connector_rails.init_maestrano_auth_saml_index_path(tenant: :default) %>
    <p>Some generic information about the connector</p>

  <% else %>
    <% unless @organization.oauth_uid %>
      Not linked to external app
      <% if is_admin?(current_user, @organization) %>
        <%= link_to "Link this company to ...", 'some_path' %>
      <% end %>
    <% else %>
      Linked to external app
    <% end %>

    <% if !@organization.sync_enabled %>
      Synchronizations are currently disabled. Go to the
      <%= link_to " admin panel", admin_index_path %>
      to enable them.
    <% end %>

    <h2>Last synchronization</h2>
    <% if @synchronizations.first %>
      <%= "#{@synchronizations.first.updated_at} #{@synchronizations.first.status}" %>
      <% if @synchronizations.first.is_error? %>
        <%= @synchronizations.first.message %>
      <% elsif @synchronizations.first.is_success? && @synchronizations.first.partial? %>
        Partial synchronization
      <% end %>
    <% end %>

    <h2>Synchronizations history</h2>
    <% @synchronizations.each do |sync| %>
      <%= sync.updated_at %>
      <%= sync.status %>
      <% if sync.is_error %>
        <%= sync.message %>
      <% elsif sync.is_success? && sync.partial? %>
        Partial synchronization
      <% end %>
    <% end %>
  <% end %>
</div>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
maestrano-connector-rails-0.2.16 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.15 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.14 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.13 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.12 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.11 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.10 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.9 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.8 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.7 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.5 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.4 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.3 lib/generators/connector/templates/home_index.html.erb
maestrano-connector-rails-0.2.2 lib/generators/connector/templates/home_index.html.erb