synergy/client/app/partials/public/view/specification_view_2.html (218 lines of code) (raw):
<div class="custom" id="specpool_partial">
<div class="row-fluid">
<div class="span12">
<h1>{{specification.title}} <small class="pull-right">{{project.name}} {{specification.version}} Test Specification <a class="btn" data-ng-href="#/specification/{{specification.id}}/v/1" title="Switch to standard view"><i class="icon-eye-open"></i></a> </small></h1>
<br/>
<h6><small class="pull-right"><a data-ng-href="http://{{SYNERGY.baseURL}}/{{encodeURIComponent(encodeURIComponent(specification.simpleName))}}/{{specification.version}}">http://{{SYNERGY.baseURL}}/{{specification.simpleName}}/{{specification.version}}</a> Pretty link <span class="label label-warning">★</span></small></h6>
<br/><h6><small class="pull-right"><a data-ng-href="#/specification/{{specification.id}}">http://{{SYNERGY.baseURL}}/client/app/#/specification/{{specification.id}}</a> Permanent link <span class="label label-warning">★</span></small></h6>
<br/>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<h3>Description</h3>
<div class="well" data-ng-bind-html-unsafe="specification.desc">
</div>
</div>
<div class="span4">
<div >
<div class="btn-toolbar">
<div class="btn-group" >
<button data-ng-repeat="action in specification.controls" data-ng-disabled="!action.isEnabled" class="btn" data-ng-click="performSpecification(action.onClick)" title="{{action.title}}"><i class="{{action.iconName}}"></i> {{action.title}}</button>
<button class="btn" data-ng-show="SYNERGY.session.username.length > 0" data-ng-click="toggleFavorite()" title="Toggle favorite" >
<span data-ng-switch="specification.isFavorite">
<i data-ng-switch-when="1" class="icon-star"></i>
<i data-ng-switch-default class="icon-star-empty"></i>
</span>
</button>
</div>
</div>
<small data-ng-hide="!specification.isUsed" class="label label-frozen" title="Specification is used in paused test assignment and its structure cannot be changed right now">Closed for structure changes</small>
<small data-ng-hide="!specification.ext || specification.ext.removalRequests.length < 1" class="label label-important" title="Requested by: {{removalUsers}}">Requested to be removed</small>
</div>
<div class="clearfix"></div>
<h3><img src="img/clock.png" class="clockIcon" title="Estimated time to test" alt="Clock"/> {{getSpecificationDuration()}} mins.</h3>
<div>
<h3>Author: <a href="#/user/{{specification.author}}">{{specification.authorName}}</a> </h3>
<h4>Owner: <a href="#/user/{{specification.owner}}">{{specification.ownerName}}</a> <span style="cursor: pointer" data-ng-hide="!SYNERGY.session.username || SYNERGY.session.username.length < 1" data-ng-click="performSpecification('ownershipRequest')" title="Send request to owner for transferring specification ownership to you" class="badge badge-success">⋱</span> </h4>
<h5><a href="#/revisions/{{specification.id}}">History</a></h5>
<small data-ng-show="specification.lastUpdated.length > 1">Last updated: <span title="{{specification.lastUpdated}}" data-ng-bind="getLocalTime(specification.lastUpdated)"></span></small>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<h3>Content</h3>
<ol>
<li data-ng-repeat="suite in specification.testSuites" ><a href="" data-ng-click="SYNERGY.util.scrollTo('suite' + suite.id)">{{suite.title}}</a></li>
</ol>
</div>
<div class="span4">
<h3 data-ng-hide="readOnlyJobs.length == 0">Continuous jobs</h3>
<div data-ng-repeat="job in readOnlyJobs" class="jobContainer">
<a data-ng-href="{{job.url}}" title="{{job.result}}" ><span class="label label-{{job.result}}" style="font-size: 1.2em">{{job.fullDisplayName}}</span></a>
</div>
<h3 data-ng-hide="specification.similar.length ==0">Similar specifications</h3>
<ul>
<li data-ng-repeat="s in specification.similar.slice(0, 3)" data-ng-hide="s.id == specification.id"><a href="" data-ng-href="#/title/{{encodeURIComponent(encodeURIComponent(specification.simpleName))}}/{{s.version}}">{{s.title}} ({{project.name}} {{s.version}})</a></li>
</ul>
<button type="button" class="btn btn-small" data-toggle="collapse" data-ng-hide="specification.similar.length < 6" data-target="#demo">Show all</button>
<br/><br/>
<div id="demo" class="collapse out" >
<div >
<li data-ng-repeat="s in specification.similar.slice(3, specification.similar.length)" data-ng-hide="s.id == specification.id"><a href="" data-ng-href="#/title/{{encodeURIComponent(encodeURIComponent(specification.simpleName))}}/{{s.version}}">{{s.title}} ({{project.name}} {{s.version}})</a></li>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h3>Test suites
<small data-ng-switch="specification.isUsed">({{(specification.testSuites).length}})
<a data-ng-switch-when="false" data-ng-show="rights == 1" data-ng-href="#/suite/-1/{{specification.id}}/{{specification.version}}/create">[create]</a>
<span data-ng-switch-default="" data-ng-show="rights == 1" data-ng-href="#/suite/-1/{{specification.id}}/{{specification.version}}/create">[create]</span>
</small>
<small class="pull-right">Filter cases by label
<select class="input-small" data-ng-model="filterLabel" data-ng-options="l as l for l in labels"></select>
</small>
</h3>
<small class="pull-right"><span data-ng-switch="filterLabel">
<span data-ng-switch-when="All"></span>
<span data-ng-switch-default><a data-ng-href="#/specification/{{specification.id}}/v/2/{{filterLabel}}">http://{{SYNERGY.baseURL}}/client/app/#/specification/{{specification.id}}/v/2/{{filterLabel}}</a></span>
</span></small>
<div data-ng-repeat="suite in specification.testSuites" id="suite{{suite.id}}">
<h4><a href="#/suite/{{suite.id}}">{{$index + 1}}. {{suite.title}}</a>
<small data-ng-switch="specification.isUsed">Test Suite
<span data-ng-switch-when="false" data-ng-show="rights == 1 && specification.userIsRelated"><a data-ng-href="#/suite/{{suite.id}}/edit">[edit]</a> <span class="likelink" data-ng-click="performSuite('delete', suite.id)">[delete]</span> <a data-ng-href="#/case/-1/suite/{{suite.id}}/create">[add test case]</a> <span class="likelink" data-ng-click="performSuite('labels', suite.id)">[manage labels in suite]</span></span>
<span data-ng-switch-default="" data-ng-show="rights == 1 && specification.userIsRelated">
<a data-ng-href="#/suite/{{suite.id}}/edit">[edit]</a>
<span>[delete]</span>
<span>[add test case]</span>
<span>[manages labels in suite]</span></span>
</small>
</h4>
<div data-ng-show="suite.desc && suite.desc.trim().length>0">
<h5 >Setup</h5>
<div class="well" data-ng-bind-html-unsafe="suite.desc"></div>
</div>
<div>
<ol>
<li data-ng-repeat="testCase in suite.testCases|filter:hasLabel" style="margin: 2em 0 0 0" data-ng-hide="testCase.hide">
<b><a href="#/case/{{testCase.id}}/suite/{{suite.id}}/v/1">{{testCase.title}}</a> </b>
<small data-ng-switch="specification.isUsed" style="color:#999"> Test Case
<span data-ng-switch-when="false" data-ng-show="rights == 1 && specification.userIsRelated"><a data-ng-href="#/case/{{testCase.id}}/suite/{{suite.id}}/edit">[edit]</a> <span class="likelink" data-ng-click="performCase('delete', testCase.id, suite.id)">[delete]</span></span>
<span data-ng-switch-default="" data-ng-show="rights == 1 && specification.userIsRelated"><a data-ng-href="#/case/{{testCase.id}}/suite/{{suite.id}}/edit">[edit]</a> <span>[delete]</span></span>
<a class="pull-right" data-ng-href="{{SYNERGY.issues.reportLink(project.name, suite.product, suite.component, specification.version, testCase.title, testCase.id, suite.id)}}" target="_blank">Report issue ↗</a>
</small>
<ul><li><b>Steps:</b>
<span data-ng-bind-html-unsafe="testCase.steps"></span>
</li>
</ul>
<ul data-ng-hide="testCase.images.length == 0">
<li><b>Images:</b></li>
</ul>
<ul class="thumbnails">
<li class="span6" data-ng-repeat="image in testCase.images">
<div class="thumbnail">
<a href="{{image.src}}" target="_blank" title="Open in new window">
<img data-ng-src="{{image.src}}" alt="{{image.title}}">
</a>
<div class="caption">
<p>{{image.title}}</p>
</div>
</div>
</li>
</ul>
<ul>
<li><b>Result: </b><span style="color:green" class="result" data-ng-bind-html-unsafe="testCase.result"></span></li>
<li data-ng-hide="testCase.keywords.length == 0"><b>Labels: </b>
<span data-ng-repeat="keyword in testCase.keywords">
<sylabel label="keyword"></sylabel>
</span>
</li>
<li data-ng-hide="filteredIssues.length == 0"><b>Issues: </b>
<span data-ng-repeat="issue in filteredIssues = (testCase.issues|stillValidIssues)">
<syissue baseurl="SYNERGY.issues.singleIssueLink(project.name,issue.bugId)" issue="issue"></syissue>
</span>
</li>
</ul>
</li>
</ol>
</div>
<br/><br/><br/>
</div>
<h3 data-ng-hide="specification.attachments.length == 0">Attachments <small>({{(specification.attachments).length}})</small></h3>
<table>
<tr data-ng-repeat="attachment in specification.attachments">
<td><a href="{{attachmentBase}}?id={{attachment.id}}">→ {{attachment.name}} </a></td>
</tr>
</table><br/>
</div>
</div>
</div>
<div class="modal fade hide" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="deleteModalLabel"></h3>
</div>
<div class="modal-body" id="deleteModalBody">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">No</button>
<button class="btn btn-primary" id="modal_confirm_ok" data-ng-click="performAction()">Yes</button>
</div>
</div>
<div class="modal fade hide" id="dupliciteSpecModal" tabindex="-1" role="dialog" aria-labelledby="dupliciteSpecModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="addIssueModalLabel">Duplicate specification</h3>
</div>
<div class="modal-body" id="dupliciteSpecModalBody">
<form class="form-inline">
<input style="width: 40%" type="text" data-ng-model="newname" value="{{specification.title}}" >
<label for="customDropdown">Version</label>
<select width="30%" data-ng-model="cloneVersion">
<option data-ng-repeat="v in versions" value="{{v.name}}">{{v.name}}</option>
</select>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary" id="modal_confirm_ok" data-dismiss="modal" data-ng-disabled="!newname || !cloneVersion" data-ng-click="performAction();">Clone</button>
</div>
</div>
<div class="modal fade hide" id="addLabelsModal" tabindex="-1" role="dialog" aria-labelledby="addLabelsModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="addLabelsModalLabel">Manages labels in suite</h3>
</div>
<div class="modal-body" id="addLabelsModalBody">
<form class="form-inline">
Label: <input style="width: 40%" type="text" data-ng-model="newLabel" >
<button class="btn" data-ng-disabled="newLabel.length <1" data-ng-click="performAction('add');">Add</button>
</form>
<form class="form-inline">
Label: <select class="input-small" data-ng-model="removeLabel" data-ng-options="l as l for l in realLabels"></select>
<button class="btn btn-danger" data-ng-disabled="realLabels.length <1" data-ng-click="performAction('remove');">Remove</button>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary" id="modal_confirm_ok2" data-dismiss="modal">Close</button>
</div>
</div>
<div class="modal fade hide" id="ownershipRequestModal" tabindex="-1" role="dialog" aria-labelledby="ownershipRequestModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="addIssueModalLabel">Request for ownership</h3>
</div>
<div class="modal-body" id="ownershipRequestModalBody">
Please explain request for ownership
<form class="form-inline">
<textarea style="width: 80%; height: 5em" data-ng-model="requestMsg"></textarea>
</form>
<small>Characters left {{250 - requestMsg.length}}</small>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button class="btn btn-primary" id="modal_confirm_ok" data-dismiss="modal" data-ng-disabled="!requestMsg || requestMsg.length>250" data-ng-click="performAction();">Send</button>
</div>
</div>