This repository was archived by the owner on Apr 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
src/Cake.Issues.Reporting.Generic Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,20 @@ public enum HtmlDxDataGridOption
201
201
/// </summary>
202
202
RuleSortOrder ,
203
203
204
+ /// <summary>
205
+ /// Flag if the <see cref="ReportColumn.RuleUrl"/> column should be visible or not.
206
+ /// Either <c>true</c> or <c>false</c>.
207
+ /// Default value is <c>false</c>.
208
+ /// </summary>
209
+ RuleUrlVisible ,
210
+
211
+ /// <summary>
212
+ /// Sort order of the <see cref="ReportColumn.RuleUrl"/> column if it is part of <see cref="SortedColumns"/>.
213
+ /// See <see cref="ColumnSortOrder"/> for possible values.
214
+ /// Default value is <see cref="ColumnSortOrder.Ascending"/>.
215
+ /// </summary>
216
+ RuleUrlSortOrder ,
217
+
204
218
/// <summary>
205
219
/// Flag if the <see cref="ReportColumn.Message"/> column should be visible or not.
206
220
/// Either <c>true</c> or <c>false</c>.
Original file line number Diff line number Diff line change 35
35
ColumnSortOrder lineSortOrder = ViewBagHelper .ValueOrDefault (ViewBag .LineSortOder , ColumnSortOrder .Ascending );
36
36
bool ruleVisible = ViewBagHelper .ValueOrDefault (ViewBag .RuleVisible , true );
37
37
ColumnSortOrder ruleSortOrder = ViewBagHelper .ValueOrDefault (ViewBag .RuleSortOder , ColumnSortOrder .Ascending );
38
+ bool ruleUrlVisible = ViewBagHelper .ValueOrDefault (ViewBag .RuleUrlVisible , true );
39
+ ColumnSortOrder ruleUrlSortOrder = ViewBagHelper .ValueOrDefault (ViewBag .RuleUrlSortOder , ColumnSortOrder .Ascending );
38
40
bool messageVisible = ViewBagHelper .ValueOrDefault (ViewBag .MessageVisible , true );
39
41
ColumnSortOrder messageSortOrder = ViewBagHelper .ValueOrDefault (ViewBag .MessageSortOder , ColumnSortOrder .Ascending );
40
42
var groupedColumns = ViewBagHelper .ValueOrDefault (ViewBag .GroupedColumns , new List <ReportColumn > { ReportColumn .ProviderName });
354
356
},
355
357
< / text>
356
358
}
359
+ @if (ruleUrlVisible)
360
+ {
361
+ < text>
362
+ {
363
+ dataField: " RuleUrl" ,
364
+ @if (groupedColumns .Contains (ReportColumn .RuleUrl ))
365
+ {
366
+ @: groupIndex: @groupedColumns .IndexOf (ReportColumn .RuleUrl ),
367
+ }
368
+ @if (sortedColumns .Contains (ReportColumn .RuleUrl ))
369
+ {
370
+ @: sortIndex: @sortedColumns .IndexOf (ReportColumn .RuleUrl ),
371
+ @: sortOrder: " @ruleUrlSortOrder.ToShortString()" ,
372
+ }
373
+ cellTemplate : function (container , options ) {
374
+ if (options .data [" RuleUrl" ]) {
375
+ $ (' <a>' , {
376
+ text: options .value ,
377
+ href: options .data [" RuleUrl" ],
378
+ target: " _blank"
379
+ }).appendTo (container);
380
+ }
381
+ }
382
+ },
383
+ < / text>
384
+ }
357
385
@if (messageVisible)
358
386
{
359
387
< text>
You can’t perform that action at this time.
0 commit comments