Sha256: aea482f9262e80d08ef6e15be5ec6dd4658ef83cd22a421da07abb669b7eb4fd

Contents?: true

Size: 1.88 KB

Versions: 41

Compression:

Stored size: 1.88 KB

Contents

<!-- TODO -->
<!-- This template is given as an example of the informations
and functions available on the admin panel -->
<!-- This view is designed according to the admin controller supplied -->
<div class='admin'>
  <% unless @organization %>
    <p> You need to be Admin or Super Admin in your company to access this panel.</p>
  <% else %>
    <ul>
      <li>
        Maestrano account
        <%= link_to "Disconnect your Maestrano account", maestrano_connector_rails.signout_path %>
      </li>

      <li>
        External account
        <% if @organization.oauth_uid %>
          <%= link_to "Disconnect #{@organization.name} (#{@organization.uid})", 'some_path' %>
        <% else %>
          <%= link_to "Connect #{@organization.name} (#{@organization.uid})", 'some_other_path' %>
        <% end %>
      </li>

      <li>
        <%= link_to "Force a synchronization", admin_synchronize_path, method: :post %>
      </li>
    </ul>

    <h3>Synchronized entities</h3>
    <p>You can customize which entities are synchronized by the connector.</p>
    <%= form_tag admin_update_path(id: @organization.id), method: :put do %>
      <% @organization.synchronized_entities.each do |k, v| %>
          <label for="<%= k %>">#{k.to_s.humanize}</label>
          <input checked="<%= v %>" id="<%= k %>" name="<%= k %>" type="checkbox"></input>
          <% if v  && @organization.oauth_uid %>
            <%= link_to "Force a synchronization for #{k.to_s.pluralize} only", admin_synchronize_path(opts: {only_entities: [k.to_s]}), method: :post %>
          <% end %>
      <% end %>
      <%= submit_tag :Update%>
    <% end %>

    <h3>IdMap</h3>
    <% @idmaps.each do |idmap| %>
      <%= idmap.connec_entity ? idmap.connec_entity.humanize : nil %>
      <%= idmap.connec_id %>
      <%= idmap.external_entity ? idmap.external_entity.humanize : nil %>
      <%= idmap.external_id %>
    <% end %>

  <% end %>
</div>

Version data entries

41 entries across 39 versions & 1 rubygems

Version Path
maestrano-connector-rails-0.4.4 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.4.3 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.4.2 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.4.1 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.4.0 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.13 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.12 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.11 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.10 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.9 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.8 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.7 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.6 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.5 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.4 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.3 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.2 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.1 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.3.0 spec/dummy/app/views/admin/index.html.erb
maestrano-connector-rails-0.2.20 spec/dummy/app/views/admin/index.html.erb