Works almost
This commit is contained in:
26
abac/templates/file_detail.html
Normal file
26
abac/templates/file_detail.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-3">
|
||||
<h2>{{ file.name }}</h2>
|
||||
<p>Created At: {{ file.created_at|date:"F d, Y H:i" }}</p>
|
||||
<p>Last Modified: {{ file.last_modified|date:"F d, Y H:i" }}</p>
|
||||
|
||||
<form method="post" action="{% url 'abac:create_rule' file.id %}">
|
||||
{% csrf_token %}
|
||||
<label for="rule_name">Rule Name:</label>
|
||||
<input type="text" name="rule_name" required>
|
||||
<button type="submit" class="btn btn-primary">Add Rule</button>
|
||||
</form>
|
||||
|
||||
|
||||
{% for rule in rules %}
|
||||
<div class="bg-light p-3 my-2">
|
||||
<h4>{{ rule.name }}</h4>
|
||||
<a href="{% url 'abac:rule_detail' file_id=file.id rule_id=rule.id %}">View Details</a>
|
||||
</div>
|
||||
{% empty %}
|
||||
<p>No rules have been added yet.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user