//~OPTIONS
{
  access:   ["root"],
  include:  ["fcfManagement:css/styles.css"],
}

//~TEMPLATE body
body


//~ARGUMENTS
{
  fcfTheme:    "managementTheme",
  title:       "",
  body:        fcf.argTmpl("+body"),
}

//~TEMPLATE
<html>
<head>
@{{ render.header() }}@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
%{{
  var linkDataEditorActive = route.uri == "fcfpackages/fcfManagement" ? "active" : "";
  var linkPackagesActive   = route.uri == "fcfpackages/fcfManagement/packages" ? "active" : "";
}}%
<body>
  <div class="hiblock">
    <div class="hiblock-hiline"></div>
    <div class="hiblock-controls">
      %{{
      if (fcf.count(fcf.application.getSystemVariable("fcf:languages")) > 1) { }}%
      <span class="head-item">!{{Language}}!: @{{ render.template("@controls:language-selector") }}@ </span>
      %{{ } }}%
      <span class="head-item"><a href="/">!{{Site}}!</a></span>
    </div>
    <div class="hiblock-slogan">
      <a href="/fcfpackages/fcfManagement">FCF Management</a>
    </div>
    <div style="clear:both"></div>
  </div>

  %{{
    let menuConent = await render.template("+menu");
    if (!fcf.isEmptyTag(menuConent)) {
  }}%

    <div class="fcfmangament-frame-container">
      <div class="fcfmangament-frame-left-column">
        <div class="mngr-left-menu">
          @{{ render.template("+menu"); }}@
        </div>
      </div>
      <div class="fcfmangament-frame-center-column">
          <div class="mngr-start-body">
            <h3>@{{fcf.t(args.title)}}@</h3>
            <p>@{{render.template({template: "@controls:navigator"});}}@</p>
            <br>
            ${{args.body}}$
         </div>
      </div>
    </div>
  %{{ } else  { }}%
    <div class="mngr-start-body">
      <h3>@{{fcf.t(args.title)}}@</h3>
      <p>@{{render.template({template: "@controls:navigator"});}}@</p>
      <br>
      ${{args.body}}$
    </div>
  %{{ } }}%






  <script>
    fcf.application.getEventChannel().on("fcf_error",  function(a_event) {
      fcf.log.err("APPLICATION", a_event.error);
      fcf.application.render({
        template: "@controls:dialog",
        owner: document.body,
        args: { title: fcf.t("Error"), content: a_event.error.toString()},
      })
    });
  </script>
</body>
</html>


//~TEMPLATE menu
