cityssm/parking-ticket-system

View on GitHub
views/dashboard.ejs

Summary

Maintainability
Test Coverage
<%- include('_header'); -%>

<div id="is-site-layout">
  <h1 class="title is-1">
    <%= configFunctions.getConfigProperty("application.applicationName") %>
  </h1>

  <div class="columns">
    <div class="column">
      <div class="card">
        <div class="card-content">
          <div class="media">
            <div class="media-left">
              <i class="fas fa-3x fa-fw fa-file-invoice" aria-hidden="true"></i>
            </div>
            <div class="media-content has-text-black">
              <h2 class="title is-4 is-marginless">
                <a href="<%= urlPrefix %>/tickets">Parking Tickets</a>
              </h2>
              <p>
                Track parking tickets.
                <% if (user.canUpdate) { %>
                  Reconcile ownership records.
                <% } %>
              </p>
            </div>
          </div>
        </div>
        <div class="card-footer">
          <a class="card-footer-item" href="<%= urlPrefix %>/tickets">
            <span class="icon">
              <i class="fas fa-search" aria-hidden="true"></i>
            </span>
            Find Tickets
          </a>
          <% if (user.canUpdate) { %>
            <a class="card-footer-item" href="<%= urlPrefix %>/tickets/new">
              <span class="icon">
                <i class="fas fa-plus" aria-hidden="true"></i>
              </span>
              New Ticket
            </a>
          <% } %>
        </div>
      </div>
    </div>
    <div class="column">
      <div class="card">
        <div class="card-content">
          <div class="media">
            <div class="media-left">
              <i class="fas fa-3x fa-fw fa-car" aria-hidden="true"></i>
            </div>
            <div class="media-content has-text-black">
              <h2 class="title is-4 is-marginless">
                <a href="<%= urlPrefix %>/plates">Licence Plate Lookup</a>
              </h2>
              <p>
                Look up licence plate owners.
                <% if (user.canUpdate && configFunctions.getConfigProperty("application.feature_mtoExportImport")) { %>
                  Manage exports to and imports from the MTO.
                <% } %>
              </p>
            </div>
          </div>
        </div>
        <div class="card-footer">
          <a class="card-footer-item" href="<%= urlPrefix %>/plates">
            <span class="icon">
              <i class="fas fa-search" aria-hidden="true"></i>
            </span>
            Find Licence Plates
          </a>
        </div>
      </div>
    </div>
  </div>

  <div class="columns">
    <div class="column">
      <div class="card">
        <div class="card-content">
          <div class="media">
            <div class="media-left">
              <i class="fas fa-3x fa-fw fa-file" aria-hidden="true"></i>
            </div>
            <div class="media-content has-text-black">
              <h2 class="title is-4 is-marginless">
                <a href="<%= urlPrefix %>/reports">Report Library</a>
              </h2>
              <p>Produce reports and export data.</p>
            </div>
          </div>
        </div>
        <div class="card-footer">
          <a class="card-footer-item" href="<%= urlPrefix %>/reports">
            <span class="icon">
              <i class="fas fa-search" aria-hidden="true"></i>
            </span>
            Find Reports
          </a>
        </div>
      </div>
    </div>
    <div class="column">
      <div class="card">
        <div class="card-content">
          <div class="media">
            <div class="media-left">
              <i class="fas fa-3x fa-fw fa-question-circle" aria-hidden="true"></i>
            </div>
            <div class="media-content has-text-black">
              <h2 class="title is-4 is-marginless">
                <a href="https://cityssm.github.io/parking-ticket-system/docs/" target="_blank" rel="nofollow noreferrer">Help Documentation</a>
              </h2>
              <p>Instructions on how to use this application.</p>
            </div>
          </div>
        </div>
        <div class="card-footer">
          <a class="card-footer-item" href="https://cityssm.github.io/parking-ticket-system/docs/" target="_blank" rel="nofollow noreferrer">
            <span class="icon">
              <i class="fas fa-question-circle" aria-hidden="true"></i>
            </span>
            Help
          </a>
          <a class="card-footer-item has-tooltip-bottom" data-tooltip="Latest Updates, Issue Tracker, Say Hello (Opens in New Window)" href="https://github.com/cityssm/parking-ticket-system" target="_blank" rel="nofollow noreferrer">
            <span class="icon">
              <i class="fab fa-github" aria-hidden="true"></i>
            </span>
            GitHub
          </a>
        </div>
      </div>
    </div>
  </div>

  <% if (user.isAdmin) { %>
    <h2 class="title is-3">Administrator Tools</h2>

    <div class="columns">
      <div class="column">
        <div class="card">
          <div class="card-content">
            <div class="media">
              <div class="media-left">
                <i class="fas fa-3x fa-fw fa-database" aria-hidden="true"></i>
              </div>
              <div class="media-content has-text-black">
                <h2 class="title is-4 is-marginless">
                  <a href="<%= urlPrefix %>/admin/cleanup">Database Cleanup</a>
                </h2>
                <p>Purge deleted records.</p>
              </div>
            </div>
          </div>
          <div class="card-footer">
            <a class="card-footer-item" href="<%= urlPrefix %>/admin/cleanup">
              <span class="icon">
                <i class="fas fa-bomb" aria-hidden="true"></i>
              </span>
              Purge Records
            </a>
          </div>
        </div>
      </div>
      <div class="column">
        <div class="card">
          <div class="card-content">
            <div class="media">
              <div class="media-left">
                <i class="fas fa-3x fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
              </div>
              <div class="media-content has-text-black">
                <h2 class="title is-4 is-marginless">
                  <a href="<%= urlPrefix %>/admin/offences">Parking Offences</a>
                </h2>
                <p>Configure parking offences, their related locations and by-laws.</p>
              </div>
            </div>
          </div>
          <div class="card-footer">
            <a class="card-footer-item" href="<%= urlPrefix %>/admin/offences">
              <span class="icon">
                <i class="fas fa-exclamation-triangle" aria-hidden="true"></i>
              </span>
              Offences
            </a>
            <a class="card-footer-item" href="<%= urlPrefix %>/admin/locations">
              <span class="icon">
                <i class="fas fa-map-marker-alt" aria-hidden="true"></i>
              </span>
              Locations
            </a>
            <a class="card-footer-item" href="<%= urlPrefix %>/admin/bylaws">
              <span class="icon">
                <i class="fas fa-gavel" aria-hidden="true"></i>
              </span>
              By-Laws
            </a>
          </div>
        </div>
      </div>
    </div>
  <% } %>
</div>

<%- include('_footerA'); -%>
<%- include('_footerB'); -%>