Start on the new build view
This commit is contained in:
parent
5cc1c90021
commit
e227d7e526
30 changed files with 816 additions and 11 deletions
22
static/js/directives/ui/source-commit-link.js
Normal file
22
static/js/directives/ui/source-commit-link.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* An element which displays a link to a commit in Git or Mercurial or another source control.
|
||||
*/
|
||||
angular.module('quay').directive('sourceCommitLink', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/source-commit-link.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'commitSha': '=commitSha',
|
||||
'urlTemplate': '=urlTemplate'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.getUrl = function(sha, template) {
|
||||
return template.replace('{sha}', sha);
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
Reference in a new issue