|
1 | | -@(runningExtractors: List[ExtractorInfo], selectedExtractors: List[String], groups: Map[String, ExtractionGroup], labels: List[ExtractorsLabel], |
2 | | - showOptional: Map[String,Boolean] = Map("additionalInfo"->false, "processTriggers"->false, "labelSection"->false, "filterSection"->true, "ratings"->false))(implicit user: Option[models.User]) |
| 1 | +@(runningExtractors: List[ExtractorInfo], selectedExtractors: List[String], groups: Map[String, ExtractionGroup], labelCategories: Map[String, List[ExtractorsLabel]], |
| 2 | + showOptional: Map[String,Boolean] = Map("additionalInfo"->false, "processTriggers"->false, "labelSection"->true, "filterSection"->true, "ratings"->false))(implicit user: Option[models.User]) |
3 | 3 | @import _root_.util.Formatters._ |
4 | 4 | @import helper._ |
5 | 5 | @import api.Permission |
@@ -29,25 +29,29 @@ <h1>Extractor Catalog</h1> |
29 | 29 | <fieldset class="labels-border"> |
30 | 30 | <legend class="labels-border">Labels</legend> |
31 | 31 |
|
32 | | - <!-- TODO: Link to Extractor Labels view iff user is server admin --> |
| 32 | + <!-- Link to Extractor Labels view iff user is server admin --> |
33 | 33 | @if(Permission.checkServerAdmin(user)) { |
34 | 34 | <a href="@routes.Extractors.manageLabels" style="margin-top:-3.0em;" class="btn btn-default btn-xs pull-right"> |
35 | 35 | <span class="glyphicon glyphicon-wrench"></span> Manage |
36 | 36 | </a> |
37 | 37 | } |
38 | 38 |
|
39 | | - <div class="control-group"> |
40 | | - <!-- TODO: Show checkbox for each label, enabled by default --> |
41 | | - <!-- TODO: Group labels together by Category (e.g. Type, Group, Other, etc) --> |
42 | | - <div class="btn-group" data-toggle="buttons"> |
43 | | - |
44 | | - <!-- Disguised checkboxes as buttons --> |
45 | | - @for(label <- labels) { |
46 | | - <label class="btn btn-primary active"> |
47 | | - <input type="checkbox" autocomplete="off" checked> @label.name |
48 | | - </label> |
49 | | - } |
50 | | - </div> |
| 39 | + <div class="row"> |
| 40 | + <!-- Disguised checkboxes as buttons --> |
| 41 | + @for((categoryName, catLabels) <- labelCategories) { |
| 42 | + <div class="col-sm-4"> |
| 43 | + <strong>@categoryName</strong> |
| 44 | + <div class="control-group"> |
| 45 | + <div class="btn-group" data-toggle="buttons"> |
| 46 | + @for(label <- catLabels) { |
| 47 | + <label class="btn btn-primary active"> |
| 48 | + <input type="checkbox" autocomplete="off" checked> @label.name |
| 49 | + </label> |
| 50 | + } |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + } |
51 | 55 | </div> |
52 | 56 | </fieldset> |
53 | 57 | } |
|
0 commit comments