<commit_before><%
  row = cell(:elements, :row).new
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
  code = cell(:elements, :code).new
%>

<!-- PRESENTATION -->
<%=raw row.open %>

  <%=raw block.open %>

    <%=raw cell(:elements, :title).new(label: 'General: Personalization') %>

    <p>
    Every Lato module can be customized. The first thing to do to personalize a module is
    to copy configurations files on your application:
    </p>

<%=raw code.open %>

$> rails lato_load_configs

<%=raw code.close %>

  <p>
  With this command you can find a list of files inside the <i>/config/lato</i> directory for every lato
  module you are using on the application.
  </p>

  <p>
  There is a list of configurations used on every module.
  </p>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Menu', size: 4) %>

  <p>
  The menu config is used to define the list of voices on the sidebar.
  </p>

  <p>
  Every menu voice should have an icon, a title, a relative url, a position value, the minimum and
  maximum level of user permissions to be showed.
  </p>

<%=raw code.open %>

menu:
  core_dashboard:
    icon: tachometer
    title: Dashboard
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99

<%=raw code.close %>

  <p>
  There is another optional option called "sub_items" for a menu voice used to set sub voices.
  Every sub item should have a title, a relative url, the minimum and maximum level of user permissions to be showed.
  </p>

<%=raw code.open %>

menu:
  core_dashboard:
    icon: tachometer
    title: Dashboard
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99
    sub_items:
      stat:
        title: Stat
        url: /lato/core/stat
        permission_min: 0
        permission_max: 99
      other:
        title: Other
        url: /lato/core/other
        permission_min: 0
        permission_max: 99
        
<%=raw code.close %>

  <p>
  Sometimes you need to translate the title of a menu voice. You can set on the language file a list
  of translations called "menu" and take one of its values on the menu configuration with a special title "translate[translation_key]".
  </p>

<%=raw code.open %>

# configs yaml file

menu:
  core_dashboard:
    icon: tachometer
    title: translate[dashboard]
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99

# language yaml file

menu:
  dashboard: Dashboard

<%=raw code.close %>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Assets', size: 4) %>

  <p>
  The assets config is used to define the list of assets that the application should import on the main layout.
  </p>

  <p>
  To add an assets file on the main layout you need to follow these instructions:
  <ul>
    <li>Require your assets on the file config/initializers/assets.rb</li>
    <li>Add the assets on the configuration file.</li>
  </ul>
  </p>

<%=raw code.open %>

assets:
  core_style:
    path: lato_core/application # path of assets file
    type: stylesheet # type of file (stylesheet / javascript)

<%=raw code.close %>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Widgets', size: 4) %>

  <p>
  A widget is an element on the header that can be used to open a small popup with a content.
  To add a new widget on the header you can set a widget object with an icon, the path of the code for the popup,
  the position and the title.
  </p>

<%=raw code.open %>

widgets:
  core_system_info:
    icon: info
    path: lato_core/widgets/systeminfo # path of widget partial
    position: 1
    title: Info

<%=raw row.close %><commit_msg>write small documentation for partials<commit_after><%
  row = cell(:elements, :row).new
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
  code = cell(:elements, :code).new
%>

<!-- PRESENTATION -->
<%=raw row.open %>

  <%=raw block.open %>

    <%=raw cell(:elements, :title).new(label: 'General: Personalization') %>

    <p>
    Every Lato module can be customized. The first thing to do to personalize a module is
    to copy configurations files on your application:
    </p>

<%=raw code.open %>

$> rails lato_load_configs

<%=raw code.close %>

  <p>
  With this command you can find a list of files inside the <i>/config/lato</i> directory for every lato
  module you are using on the application.
  </p>

  <p>
  There is a list of configurations used on every module.
  </p>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Menu', size: 4) %>

  <p>
  The menu config is used to define the list of voices on the sidebar.
  </p>

  <p>
  Every menu voice should have an icon, a title, a relative url, a position value, the minimum and
  maximum level of user permissions to be showed.
  </p>

<%=raw code.open %>

menu:
  core_dashboard:
    icon: tachometer
    title: Dashboard
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99

<%=raw code.close %>

  <p>
  There is another optional option called "sub_items" for a menu voice used to set sub voices.
  Every sub item should have a title, a relative url, the minimum and maximum level of user permissions to be showed.
  </p>

<%=raw code.open %>

menu:
  core_dashboard:
    icon: tachometer
    title: Dashboard
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99
    sub_items:
      stat:
        title: Stat
        url: /lato/core/stat
        permission_min: 0
        permission_max: 99
      other:
        title: Other
        url: /lato/core/other
        permission_min: 0
        permission_max: 99
        
<%=raw code.close %>

  <p>
  Sometimes you need to translate the title of a menu voice. You can set on the language file a list
  of translations called "menu" and take one of its values on the menu configuration with a special title "translate[translation_key]".
  </p>

<%=raw code.open %>

# configs yaml file

menu:
  core_dashboard:
    icon: tachometer
    title: translate[dashboard]
    url: /lato/core/dashboard
    position: 1
    permission_min: 0
    permission_max: 99

# language yaml file

menu:
  dashboard: Dashboard

<%=raw code.close %>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Assets', size: 4) %>

  <p>
  The assets config is used to define the list of assets that the application should import on the main layout.
  </p>

  <p>
  To add an assets file on the main layout you need to follow these instructions:
  <ul>
    <li>Require your assets on the file config/initializers/assets.rb</li>
    <li>Add the assets on the configuration file.</li>
  </ul>
  </p>

<%=raw code.open %>

assets:
  core_style:
    path: lato_core/application # path of assets file
    type: stylesheet # type of file (stylesheet / javascript)

<%=raw code.close %>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Widgets', size: 4) %>

  <p>
  A widget is an element on the header that can be used to open a small popup with a content.
  To add a new widget on the header you can set a widget object with an icon, the path of the code for the popup,
  the position and the title.
  </p>

<%=raw code.open %>

widgets:
  core_system_info:
    icon: info
    path: lato_core/widgets/systeminfo # path of widget partial
    position: 1
    title: Info

<%=raw code.close %>

  <br>
  <%=raw cell(:elements, :title).new(label: 'Partials', size: 4) %>

  <p>
  A partial is a part of code that can be added to every page.
  To Add a new partial you can set the partials list.
  </p>

<%=raw code.open %>

partials:
  core_gmaps:
    path: lato_core/partials/gmaps
    position: 2

<%=raw code.close %>

  <%=raw block.close %>

<%=raw row.close %>
{'fraction_non_alphanumeric': 0.10792207792207792, 'fraction_numerical': 0.007532467532467533, 'mean_word_length': 2.959383033419023, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5392496', 'n_tokens_mistral': 2633, 'n_tokens_neox': 2454, 'n_words': 978}