cityssm/parking-ticket-system

View on GitHub
views/_header.ejs

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html class="has-navbar-fixed-top is-fullwidth" lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="csrf-token" content="<%= csrfToken %>">

  <title>
    <%= headTitle %>: <%= configFunctions.getConfigProperty("application.applicationName") %>
  </title>

  <link rel="icon" href="<%= urlPrefix %>/images/favicon.png" />

  <link rel="stylesheet" href="<%= urlPrefix %>/stylesheets/style.css" />
  <link rel="stylesheet" href="<%= urlPrefix %>/fa/css/all.min.css" />
</head>

<body>
  <nav class="navbar is-light is-fixed-top is-static-print" id="cityssm-theme--navbar" role="navigation" aria-label="main navigation">
    <div class="container">
      <div class="navbar-brand">
        <a class="navbar-item" href="<%= urlPrefix %>/dashboard">
          <img class="mr-2" src="<%= urlPrefix + configFunctions.getConfigProperty("application.logoURL") %>" alt="" height="28" width="28" />
          <strong><%= configFunctions.getConfigProperty("application.applicationName") %></strong>
        </a>

        <a class="navbar-burger burger is-hidden-print" role="button" aria-label="menu" aria-expanded="false">
          <span aria-hidden="true"></span>
          <span aria-hidden="true"></span>
          <span aria-hidden="true"></span>
        </a>
      </div>

      <div class="navbar-menu">
        <div class="navbar-start">

          <a class="navbar-item" href="<%= urlPrefix %>/tickets">
            <span class="icon mr-1">
              <i class="fas fa-fw fa-file-invoice" aria-hidden="true"></i>
            </span>
            <span>Tickets</span>
          </a>

          <a class="navbar-item" href="<%= urlPrefix %>/plates">
            <span class="icon mr-1">
              <i class="fas fa-fw fa-car" aria-hidden="true"></i>
            </span>
            <span>Licence Plates</span>
          </a>

          <div class="navbar-item has-dropdown">

            <a class="navbar-link is-arrowless" href="#">
              <span>More</span>
              <span class="icon mr-1">
                <i class="fas fa-angle-down" aria-hidden="true"></i>
              </span>
            </a>
            <div class="navbar-dropdown">

              <a class="navbar-item" href="<%= urlPrefix %>/reports">
                <span class="icon mr-1">
                  <i class="fas fa-fw fa-file" aria-hidden="true"></i>
                </span>
                <span>Reports</span>
              </a>
              <hr class="navbar-divider" />

              <% if (user.isAdmin) { %>
                <a class="navbar-item" href="<%= urlPrefix %>/admin/offences">
                  <span class="icon mr-1">
                    <i class="fas fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
                  </span>
                  <span>Parking Offences</span>
                </a>
                <a class="navbar-item" href="<%= urlPrefix %>/admin/locations">
                  <span class="icon mr-1">
                    <i class="fas fa-fw fa-map-marker-alt" aria-hidden="true"></i>
                  </span>
                  <span>Parking Locations</span>
                </a>
                <a class="navbar-item" href="<%= urlPrefix %>/admin/bylaws">
                  <span class="icon mr-1">
                    <i class="fas fa-fw fa-gavel" aria-hidden="true"></i>
                  </span>
                  <span>Parking By-Laws</span>
                </a>
                <hr class="navbar-divider" />
              <% } %>

              <a class="navbar-item" href="https://cityssm.github.io/parking-ticket-system/docs/" target="_blank" rel="nofollow noreferrer">
                <span class="icon mr-1">
                  <i class="fas fa-fw fa-question-circle" aria-hidden="true"></i>
                </span>
                <span>Help</span>
              </a>
            </div>
          </div>
        </div>

        <div class="navbar-end">
          <a class="navbar-item" id="cityssm-theme--logout-button" role="button" href="#">
            <span class="icon mr-1">
              <i class="fas fa-fw fa-sign-out-alt" aria-hidden="true"></i>
            </span>
            <span>Log Out <%=user.userName %></span>
          </a>
        </div>
      </div>
    </div>
  </nav>

  <main class="container pt-2 px-3 mx-auto has-min-page-height"
    data-url-prefix="<%= configFunctions.getConfigProperty("reverseProxy.urlPrefix") %>"
    data-session-keep-alive-millis="<%= configFunctions.keepAliveMillis %>"
    data-url-prefix="<%= urlPrefix %>"
    data-can-update="<%= user.canUpdate %>"
    data-is-admin="<%= user.isAdmin %>"
    data-is-operator="<%= user.isOperator %>">