Esempio n. 1
0
        private string GetCssClass()
        {
            var isStateDone       = WorkItemState.IsDone(State);
            var isStateCommit     = WorkItemState.IsCommited(State);
            var isStateInProgress = WorkItemState.IsInProgress(State);

            var stateClass = isStateDone
                ? "card-outline-success"
                : (isStateCommit || isStateInProgress ? "card-outline-primary" : null);

            var cssClass = $"card work-iteration-item {stateClass}".Trim();

            return(cssClass);
        }
Esempio n. 2
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var isStateDone       = WorkItemState.IsDone(State);
            var isStateCommit     = WorkItemState.IsCommited(State);
            var isStateInProgress = WorkItemState.IsInProgress(State);

            var stateClass = isStateDone
                ? "badge-success"
                : (isStateCommit || isStateInProgress ? "badge-primary" : "badge-default");

            var htmlContent = $@"
<small>
    <span class=""badge badge-pill circle {stateClass}"">&nbsp;</span>
</small>
<code>{State}</code>";

            output.Content.SetHtmlContent(htmlContent);

            output.Attributes.RemoveAll(nameof(State));
        }