| {#- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| -#} |
| {% set hide_left_bar = True %} |
| {% extends g.theme.master %} |
| |
| {% block title %}Trove categories{% endblock %} |
| |
| {% block header %}Managing trove categories{% endblock %} |
| |
| {% block content %} |
| <div class="grid-20"> |
| {% if selected_cat %} |
| <div class="grid-20"> |
| <a href="/categories">Top-level categories</a> |
| {% for cat in hierarchy %} |
| > <a href="/categories/{{cat.shortname}}">{{cat.fullname}}</a> |
| {% endfor %} |
| > {{selected_cat.fullname}} |
| </div> |
| <h2> |
| Sub-categories of {{selected_cat.fullname}} |
| </h2> |
| {% else %} |
| <h2> |
| List of all top-level categories |
| <a href="/categories/browse">(browse all categories)</a> |
| </h2> |
| {% endif %} |
| |
| {% if categories|length > 0 %} |
| <table> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Actions</th> |
| </tr> |
| </thead> |
| <tbody> |
| {% for cat in categories %} |
| {{g.theme.remove_trove_category.display(category=cat)}} |
| {% endfor %} |
| </tbody> |
| </table> |
| {% else %} |
| <div class="grid-20"> |
| There are no categories in this list. |
| </div> |
| {% endif %} |
| </div> |
| |
| <div class="grid-20"> |
| <h2>Create a new item in this category</h2> |
| {% if selected_cat %} |
| {{g.theme.add_trove_category.display(uppercategory_id=selected_cat.trove_cat_id)}} |
| {% else %} |
| {{g.theme.add_trove_category.display(uppercategory_id=0)}} |
| {% endif %} |
| <div class="grid-20" style="margin-bottom:10px;"> |
| Are you done creating new categories? <a href="/auth/user_info/skills/{{selected_cat.shortname}}">Click here</a> to configure your skills! |
| </div> |
| |
| </div> |
| {% endblock %} |