hairyhenderson/jiraprinter

View on GitHub
public/index.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>jiraprinter</title>
    <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet" />
    <link href="style.print.css" rel="stylesheet" media="print" content="width=device-width, initial-scale=1.0" />

    <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js" type="text/javascript"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.6/angular.min.js" type="text/javascript"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.6/angular-resource.min.js" type="text/javascript"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.14.0/ui-bootstrap.min.js" type="text/javascript"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.9/ngStorage.min.js" type="text/javascript"></script>

    <script src="app.js" type="text/javascript"></script>
  </head>
  <body class="ng-scope">
    <div class="container" ng-app="JiraStoryboard">
      <div ng-controller="ApplicationController">
        <div class="row hidden-print">
          <div class="col-xs-12">
            <h1>jiraprinter</h1>
          </div>
        </div>
        <div class="row hidden-print">
          <div class="col-xs-6">
            <div class="btn-group" role="group">
              <div class="btn-group" uib-dropdown>
                <button id="apiButton" type="button" class="btn btn-default" uib-dropdown-toggle>
                  {{ apiType }} <span class="caret"></span>
                </button>
                <ul class="uib-dropdown-menu" role="menu" aria-labelledby="apiButton">
                  <li ng-repeat="api in supported_apis"><a href="#" ng-click="setApi(api)"><strong>{{ api }}</a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>

        <div class="row hidden-print">
          <div class="col-xs-6">
            <div class="btn-group" role="group">
              <button class="btn btn-info" type="button" onclick="window.print()" title="Print {{issues.length}} cards">Print <span class="badge">{{ issues.length }}</span></button>
              <!-- Filters -->
              <div class="btn-group" uib-dropdown ng-show="apiType === 'Filters'" is-open="filterStatus.isopen">
                <button id="filterButton" type="button" class="btn btn-default" uib-dropdown-toggle>
                  {{ filter.name || 'Select a filter...' }} <span class="caret"></span>
                </button>
                <ul class="uib-dropdown-menu" role="menu" aria-labelledby="filterButton">
                  <li ng-repeat="filter in filters | orderBy:'name'"><a href="#" ng-click="setFilter(filter)">{{ filter.name }}</a></li>
                </ul>
              </div>
              <!-- Boards -->
              <div class="btn-group" uib-dropdown ng-show="apiType === 'Boards'" is-open="typeStatus.isopen">
                <button id="typeButton" type="button" class="btn btn-default" uib-dropdown-toggle>
                  {{ issuetype }} <span class="caret"></span>
                </button>
                <ul class="uib-dropdown-menu" role="menu" aria-labelledby="typeButton">
                  <li class="dropdown-header">Issue types</li>
                  <li ng-repeat="type in preferred_issuetypes"><a href="#" ng-click="setType(type)"><strong>{{ type }}</strong></a></li>
                  <li class="divider"></li>
                  <li ng-repeat="type in issuetypes" class=""><a href="#" ng-click="setType(type)"><small>{{ type }}</small></a></li>
                </ul>
              </div>
              <div class="btn-group" uib-dropdown ng-show="apiType === 'Boards'" is-open="boardStatus.isopen">
                <button id="boardButton" type="button" class="btn btn-default" uib-dropdown-toggle>
                  {{ board.name || 'Select a board...' }} <span class="caret"></span>
                </button>
                <ul class="uib-dropdown-menu" role="menu" aria-labelledby="boardButton">
                  <li ng-repeat="board in boards | orderBy:'name'"><a href="#" ng-click="setBoard(board)">{{ board.name }}</a></li>
                </ul>
              </div>
              <div class="btn-group" uib-dropdown ng-show="apiType === 'Boards'" is-open="sprintStatus.isopen">
                <button id="sprintButton" type="button" class="btn btn-default" uib-dropdown-toggle>
                  {{ sprint.name }} <span class="caret"></span>
                </button>
                <ul class="uib-dropdown-menu" role="menu" aria-labelledby="sprintButton">
                  <li class="dropdown-header">Sprints</li>
                  <li ng-repeat="sprint in preferred_sprints"><a href="#" ng-click="setSprint(sprint)"><strong>{{ sprint.name }}</strong></a></li>
                  <li class="divider"></li>
                  <li ng-repeat="sprint in sprints" class=""><a href="#" ng-click="setSprint(sprint)"><small>{{ sprint.name }}</small></a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <div class="row hidden-print">
          <div class="col-xs-12">
            <hr>
          </div>
        </div>
        <div class="row">
          <div ng-hide="!!issues" class="col-xs-12 col-md-offset-3 col-md-6 alert alert-info">
            Loading...
          </div>
          <div ng-repeat="issue in issues" class="issue col-xs-12 col-md-6 col-print-6">
            <div class="panel panel-default" ng-class-odd="'odd'" ng-class-even="'even'" ng-class="issue.name">
              <div class="panel-heading" ng-class="issue.name">
                <span ng-class="issue.name + '-type'" ng-class="issue.name" class="pull-left issue-type-character">{{ issue.name[0] }}</span>
                <span class="priority pull-left" ng-class="'priority-' + issue.priority" ng-show="issue.name === 'Bug'">
                    {{ issue.priority }}
                  </span>
                <span class="panel-title" ng-class="issue.name"><img class="visible-print-inline" src="https://api.qrserver.com/v1/create-qr-code/?size=100x100&format=svg&data={{issue.url}}" ng-show="configs.printQR" />
                  {{ issue.key }}
                </span>
              </div>
              <div class="panel-body" ng-class="issue.name">
                {{ issue.summary }}
              </div>
              <div class="panel-footer" ng-class="issue.name + '-footer'">
                <div class="pull-left component" ng-show="issue.components[0]">
                  {{issue.components[0].name}}
                </div>
                <div ng-hide="!issue.estimation" class="points pull-right" ng-class="issue.name">{{ issue.estimation }} <span class="hidden-print">points</span></div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>

</html>