Fix belong-to-epic to use labels instead of pill
parent
a12047bc1c
commit
862efde74a
|
@ -1,5 +1,5 @@
|
||||||
- var hash = "#";
|
- 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(
|
.belong-to-epic-pill(
|
||||||
ng-style="{'background': epic.get('color')}"
|
ng-style="{'background': epic.get('color')}"
|
||||||
title="#{hash}{{epic.get('id')}} {{epic.get('subject')}}"
|
title="#{hash}{{epic.get('id')}} {{epic.get('subject')}}"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
- var hash = "#";
|
- var hash = "#";
|
||||||
span.belong-to-epic-text-wrapper(tg-repeat="epic in epics track by epic.get('id')")
|
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(
|
a.belong-to-epic-text(
|
||||||
href=""
|
href=""
|
||||||
tg-nav="project-epics-detail:project=epic.getIn(['project', 'slug']),ref=epic.get('ref')"
|
tg-nav="project-epics-detail:project=epic.getIn(['project', 'slug']),ref=epic.get('ref')"
|
||||||
) #{hash}{{epic.get('id')}} {{epic.get('subject')}}
|
) #{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
|
if scope.epics && !scope.epics.isIterable
|
||||||
scope.epics = Immutable.fromJS(scope.epics)
|
scope.epics = Immutable.fromJS(scope.epics)
|
||||||
|
|
||||||
scope.getTemplateUrl = () ->
|
templateUrl = (el, attrs) ->
|
||||||
if attrs.format
|
if attrs.format
|
||||||
return "components/belong-to-epics/belong-to-epics-" + attrs.format + ".html"
|
return "components/belong-to-epics/belong-to-epics-" + attrs.format + ".html"
|
||||||
return "components/belong-to-epics/belong-to-epics-pill.html"
|
return "components/belong-to-epics/belong-to-epics-pill.html"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
link: link,
|
link: link,
|
||||||
scope: {
|
scope: {
|
||||||
epics: '='
|
epics: '='
|
||||||
},
|
},
|
||||||
template : '<span ng-include="getTemplateUrl()"></span>'
|
templateUrl: templateUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
BelongToEpicsDirective.$inject = []
|
|
||||||
|
|
||||||
module.directive("tgBelongToEpics", BelongToEpicsDirective)
|
module.directive("tgBelongToEpics", BelongToEpicsDirective)
|
||||||
|
|
|
@ -25,3 +25,12 @@
|
||||||
.belong-to-epic-text {
|
.belong-to-epic-text {
|
||||||
margin-left: .25rem;
|
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