Fix belong-to-epic to use labels instead of pill
parent
a12047bc1c
commit
862efde74a
|
@ -1,5 +1,5 @@
|
|||
- var hash = "#";
|
||||
.belong-to-epic-pill-wrapper(tg-repeat="epic in epics track by epic.get('id')")
|
||||
span.belong-to-epic-pill-wrapper(tg-repeat="epic in epics track by epic.get('id')")
|
||||
.belong-to-epic-pill(
|
||||
ng-style="{'background': epic.get('color')}"
|
||||
title="#{hash}{{epic.get('id')}} {{epic.get('subject')}}"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
- var hash = "#";
|
||||
span.belong-to-epic-text-wrapper(tg-repeat="epic in epics track by epic.get('id')")
|
||||
.belong-to-epic-pill(
|
||||
ng-style="{'background': epic.get('color')}"
|
||||
title="#{hash}{{epic.get('id')}} {{epic.get('subject')}}"
|
||||
)
|
||||
a.belong-to-epic-text(
|
||||
href=""
|
||||
tg-nav="project-epics-detail:project=epic.getIn(['project', 'slug']),ref=epic.get('ref')"
|
||||
) #{hash}{{epic.get('id')}} {{epic.get('subject')}}
|
||||
span.belong-to-epic-label(
|
||||
ng-style="::{'background-color': epic.get('color')}"
|
||||
translate="EPICS.EPIC"
|
||||
)
|
||||
|
|
|
@ -25,19 +25,18 @@ BelongToEpicsDirective = () ->
|
|||
if scope.epics && !scope.epics.isIterable
|
||||
scope.epics = Immutable.fromJS(scope.epics)
|
||||
|
||||
scope.getTemplateUrl = () ->
|
||||
if attrs.format
|
||||
return "components/belong-to-epics/belong-to-epics-" + attrs.format + ".html"
|
||||
return "components/belong-to-epics/belong-to-epics-pill.html"
|
||||
templateUrl = (el, attrs) ->
|
||||
if attrs.format
|
||||
return "components/belong-to-epics/belong-to-epics-" + attrs.format + ".html"
|
||||
return "components/belong-to-epics/belong-to-epics-pill.html"
|
||||
|
||||
return {
|
||||
link: link,
|
||||
scope: {
|
||||
epics: '='
|
||||
},
|
||||
template : '<span ng-include="getTemplateUrl()"></span>'
|
||||
templateUrl: templateUrl
|
||||
}
|
||||
|
||||
BelongToEpicsDirective.$inject = []
|
||||
|
||||
module.directive("tgBelongToEpics", BelongToEpicsDirective)
|
||||
|
|
|
@ -25,3 +25,12 @@
|
|||
.belong-to-epic-text {
|
||||
margin-left: .25rem;
|
||||
}
|
||||
.belong-to-epic-label {
|
||||
@include font-type(light);
|
||||
@include font-size(xsmall);
|
||||
background: $grayer;
|
||||
border-radius: .25rem;
|
||||
color: $white;
|
||||
margin: 0 .5rem;
|
||||
padding: .1rem .25rem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue