Sha256: d39e81e47eae214c4d546b74840b5dcc16400301984785247b2353d4368707af

Contents?: true

Size: 1.85 KB

Versions: 13

Compression:

Stored size: 1.85 KB

Contents

<% content_for(:stylesheets) do %>
  <%= stylesheet_link_tag "bastion/bastion" %>
  <% Bastion.plugins.each do |name, plugin| %>
    <% if plugin[:stylesheet] %>
      <%= stylesheet_link_tag(plugin[:stylesheet]) %>
    <% end %>
  <% end %>
<% end %>

<% content_for(:javascripts) do %>
  <%= javascript_include_tag 'bastion/bastion' %>
  <% if File.exist?("#{Bastion::Engine.root}/vendor/assets/javascripts/#{Bastion.localization_path(I18n.locale)}") %>
    <%= javascript_include_tag(Bastion.localization_path(I18n.locale)) %>
  <% end %>
  <script type="text/javascript">
    angular.module('Bastion.features').value('FeatureSettings', angular.fromJson(<%= SETTINGS[:features].nil? ? {} : SETTINGS[:features].to_json.html_safe %>));
    angular.module('Bastion').value('currentLocale', '<%= I18n.locale %>');
    angular.module('Bastion').value('CurrentOrganization', "<%= Organization.current.id if Organization.current %>");
    angular.module('Bastion').value('contentAccessMode', "<%= Organization.current.try(:content_access_mode) if Organization.current %>");
    angular.module('Bastion').value('markActiveMenu', mark_active_menu);
    angular.module('Bastion').value('entriesPerPage', "<%= Setting[:entries_per_page] %>");
    angular.module('Bastion').constant('BastionConfig', angular.fromJson('<%= Bastion.config.to_json.html_safe %>'));
    angular.module('Bastion.auth').value('CurrentUser', {
        id: <%= User.current.id %>,
        admin: <%= User.current.admin || User.current.usergroups.any? { |group| group.admin } %>
    });
    angular.module('Bastion.auth').value('Permissions', angular.fromJson('<%= User.current.cached_roles.collect { |role| role.permissions }.flatten.to_json.html_safe %>'));
  </script>
  <% Bastion.plugins.each do |name, plugin| %>
    <%= javascript_include_tag(plugin[:javascript]) %>
  <% end %>
<% end %>

<%= render file: "layouts/base" %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bastion-5.1.1 app/views/bastion/layouts/assets.html.erb
bastion-5.1.0 app/views/bastion/layouts/assets.html.erb
bastion-5.0.10 app/views/bastion/layouts/assets.html.erb
bastion-5.0.9 app/views/bastion/layouts/assets.html.erb
bastion-5.0.8 app/views/bastion/layouts/assets.html.erb
bastion-5.0.7 app/views/bastion/layouts/assets.html.erb
bastion-5.0.6 app/views/bastion/layouts/assets.html.erb
bastion-5.0.5 app/views/bastion/layouts/assets.html.erb
bastion-5.0.4 app/views/bastion/layouts/assets.html.erb
bastion-5.0.3 app/views/bastion/layouts/assets.html.erb
bastion-5.0.2 app/views/bastion/layouts/assets.html.erb
bastion-5.0.1 app/views/bastion/layouts/assets.html.erb
bastion-5.0.0 app/views/bastion/layouts/assets.html.erb