aggregate.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {% extends '_base.html' %}
  2. {% load render_table from django_tables2 %}
  3. {% block title %}Aggregate: {{ aggregate }}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-md-9">
  7. <ol class="breadcrumb">
  8. <li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
  9. <li><a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a></li>
  10. <li>{{ aggregate }}</li>
  11. </ol>
  12. </div>
  13. <div class="col-md-3">
  14. <form action="{% url 'ipam:aggregate_list' %}" method="get">
  15. <div class="input-group">
  16. <input type="text" name="q" class="form-control" placeholder="Search aggregates" />
  17. <span class="input-group-btn">
  18. <button type="submit" class="btn btn-primary">
  19. <span class="fa fa-search" aria-hidden="true"></span>
  20. </button>
  21. </span>
  22. </div>
  23. </form>
  24. </div>
  25. </div>
  26. <div class="pull-right">
  27. {% if perms.ipam.change_aggregate %}
  28. <a href="{% url 'ipam:aggregate_edit' pk=aggregate.pk %}" class="btn btn-warning">
  29. <span class="fa fa-pencil" aria-hidden="true"></span>
  30. Edit this aggregate
  31. </a>
  32. {% endif %}
  33. {% if perms.ipam.delete_aggregate %}
  34. <a href="{% url 'ipam:aggregate_delete' pk=aggregate.pk %}" class="btn btn-danger">
  35. <span class="fa fa-trash" aria-hidden="true"></span>
  36. Delete this aggregate
  37. </a>
  38. {% endif %}
  39. </div>
  40. <h1>{{ aggregate }}</h1>
  41. <div class="row">
  42. <div class="col-md-6">
  43. <div class="panel panel-default">
  44. <div class="panel-heading">
  45. <strong>Aggregate</strong>
  46. </div>
  47. <table class="table table-hover panel-body">
  48. <tr>
  49. <td>Family</td>
  50. <td>{{ aggregate.get_family_display }}</td>
  51. </tr>
  52. <tr>
  53. <td>RIR</td>
  54. <td>
  55. <a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>Date Added</td>
  60. <td>
  61. {% if aggregate.date_added %}
  62. <span>{{ aggregate.date_added }}</span>
  63. {% else %}
  64. <span class="text-muted">N/A</span>
  65. {% endif %}
  66. </td>
  67. </tr>
  68. <tr>
  69. <td>Description</td>
  70. <td>
  71. {% if aggregate.description %}
  72. <span>{{ aggregate.description }}</span>
  73. {% else %}
  74. <span class="text-muted">N/A</span>
  75. {% endif %}
  76. </td>
  77. </tr>
  78. </table>
  79. </div>
  80. {% include 'inc/created_updated.html' with obj=aggregate %}
  81. </div>
  82. <div class="col-md-6">
  83. {% with aggregate.get_custom_fields as custom_fields %}
  84. {% include 'inc/custom_fields_panel.html' %}
  85. {% endwith %}
  86. </div>
  87. </div>
  88. <div class="row">
  89. <div class="col-md-12">
  90. {% include 'utilities/obj_table.html' with table=prefix_table table_template='panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
  91. </div>
  92. </div>
  93. {% endblock %}