Sha256: 29eb8df9ed3eae7c6e6f8f136ad1a64b7b8537d88997c6cb903915f4a67a76ae

Contents?: true

Size: 1.65 KB

Versions: 20

Compression:

Stored size: 1.65 KB

Contents

<%
promethee_data = Promethee::Data.new master_data, localization_data: localization_data
%>

<script type="text/javascript">
  var promethee = angular
    .module('PrometheeLocalizer', ['summernote'])
    .value('data', <%= promethee_data.localization_data_to_json.html_safe %>)
    .filter('htmlSafe', ['$sce', function($sce) {
      return function(val) {
        return $sce.trustAsHtml(val);
      };
    }]);
</script>

<% promethee_util_partials.each do |partial| %>
  <%= render partial %>
<% end %>

<script type="text/javascript">
  promethee.controller('PrometheeLocalizerController', ['$scope', 'summernoteConfig', 'data', function($scope, summernoteConfig, data) {

    $scope.data = data;
    $scope.component = {children: data.components};

    $scope.summernoteConfig = summernoteConfig;
  }]);
</script>



<div id="prometheeLocalizer"
     class="promethee-localizer"
     ng-app="PrometheeLocalizer"
     ng-controller="PrometheeLocalizerController as prometheeLocalizerController">

  <script type="text/ng-template" id="promethee/localize/component">
    <ng-include src="'promethee/components/' + component.type + '/localize'"></ng-include>
  </script>

  <input type="hidden" name="<%= object_name %>[<%= method_name %>]" id="page_data" value="{{data}}" />

  <% promethee_localize_partials.each do |partial| %>
      <%= render partial %>
  <% end %>

  <% #TODO override templates from current project %>

  <div class="row">
    <div class="col-md-6"><b>Master</b></div>
    <div class="col-md-6"><b>Translation</b></div>
  </div>
  <div ng-repeat="component in component.children">
    <ng-include src="'promethee/localize/component'"></ng-include>
  </div>
</div>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
promethee-1.6.36 app/views/promethee/_localize.html.erb
promethee-1.6.35 app/views/promethee/_localize.html.erb
promethee-1.6.34 app/views/promethee/_localize.html.erb
promethee-1.6.33 app/views/promethee/_localize.html.erb
promethee-1.6.32 app/views/promethee/_localize.html.erb
promethee-1.6.31 app/views/promethee/_localize.html.erb
promethee-1.6.30 app/views/promethee/_localize.html.erb
promethee-1.6.29 app/views/promethee/_localize.html.erb
promethee-1.6.28 app/views/promethee/_localize.html.erb
promethee-1.6.27 app/views/promethee/_localize.html.erb
promethee-1.6.26 app/views/promethee/_localize.html.erb
promethee-1.6.25 app/views/promethee/_localize.html.erb
promethee-1.6.24 app/views/promethee/_localize.html.erb
promethee-1.6.23 app/views/promethee/_localize.html.erb
promethee-1.6.22 app/views/promethee/_localize.html.erb
promethee-1.6.21 app/views/promethee/_localize.html.erb
promethee-1.6.20 app/views/promethee/_localize.html.erb
promethee-1.6.19 app/views/promethee/_localize.html.erb
promethee-1.6.18 app/views/promethee/_localize.html.erb
promethee-1.6.16 app/views/promethee/_localize.html.erb