max improvement
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML>
|
||||
{% load static %}
|
||||
{% load django_htmx %}
|
||||
{% load crispy_forms_tags %}
|
||||
<html data-bs-theme="dark">
|
||||
<head>
|
||||
<title>Create Resource</title>
|
||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/widgets.css' %}" type="text/css" media="all" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{% static 'css/bootstrap-icons.css' %}">
|
||||
<script src="{% static 'js/jquery-3.7.1.min.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
||||
{% block js %}
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" href="{% static 'css/forms.css' %}">
|
||||
</head>
|
||||
<body class="p-3">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -35,7 +35,7 @@
|
||||
<a href="{% url 'atlas:case_detail' case.pk %}" style="color: inherit; text-decoration: none;">View Case</a>
|
||||
</button>
|
||||
<button class="edit-link-case btn btn-outline-warning btn-sm ms-2" style="display:none;">
|
||||
<a href="{% url 'atlas:case_update' case.pk %}" style="color: inherit; text-decoration: none;">Edit Case</a>
|
||||
<a href="{% url 'atlas:case_update' case.pk %}?next={{ request.get_full_path|urlencode }}" style="color: inherit; text-decoration: none;">Edit Case</a>
|
||||
</button>
|
||||
<br />
|
||||
<div class="pre-whitespace multi-image-block">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<a href="{% url 'atlas:case_detail' case.pk %}" style="color: inherit; text-decoration: none;">View Case</a>
|
||||
</button>
|
||||
<button class="edit-link-case btn btn-outline-warning btn-sm" style="display:none;">
|
||||
<a href="{% url 'atlas:case_update' case.pk %}" style="color: inherit; text-decoration: none;">Edit Case</a>
|
||||
<a href="{% url 'atlas:case_update' case.pk %}?next={{ request.get_full_path|urlencode }}" style="color: inherit; text-decoration: none;">Edit Case</a>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{% load crispy_forms_tags %}
|
||||
<form hx-post="{% url 'atlas:case_create_resource_inline' pk=case.pk %}"
|
||||
hx-encoding="multipart/form-data"
|
||||
hx-target="#case-resources-list"
|
||||
hx-swap="innerHTML"
|
||||
class="bg-dark p-3 rounded border border-secondary text-white my-3">
|
||||
{% csrf_token %}
|
||||
<h5>Create New Resource</h5>
|
||||
{{ form|crispy }}
|
||||
<div class="form-check mb-3">
|
||||
<input type="checkbox" name="pre_review" class="form-check-input" id="id_pre_review">
|
||||
<label class="form-check-label" for="id_pre_review">Pre-review (show before case is taken)</label>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-sm btn-success">Save and Attach</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary"
|
||||
hx-get="{% url 'atlas:resource_search_panel' %}?case_id={{ case.pk }}"
|
||||
hx-target="#resource-search-panel-placeholder"
|
||||
hx-swap="innerHTML">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -35,6 +35,14 @@
|
||||
<label class="form-check-label small" for="resource-open-access-{{ case.pk }}">Open</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto ms-auto">
|
||||
<button type="button" class="btn btn-sm btn-outline-success"
|
||||
hx-get="{% url 'atlas:case_create_resource_inline' pk=case.pk %}"
|
||||
hx-target="#resource-search-panel"
|
||||
hx-swap="outerHTML">
|
||||
+ New Resource
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resource-search-results" class="mt-2"></div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="btn-toolbar" role="toolbar" aria-label="Case actions">
|
||||
<div class="btn-group me-2 mb-2" role="group" aria-label="Primary actions">
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% url 'atlas:case_detail' pk=case.pk %}" title="View the Case">View</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_update' pk=case.pk %}" title="Edit the Case">Edit</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_update' pk=case.pk %}?next={{ request.get_full_path|urlencode }}" title="Edit the Case">Edit</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_series_update' pk=case.pk %}" title="Edit the Cases Series">Series</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_displaysets' pk=case.pk %}" title="View and edit case display sets">Display sets</a>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "atlas/base.html" %}
|
||||
{% extends base_template|default:"atlas/base.html" %}
|
||||
<!-- {% load static from static %} -->
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
@@ -5,6 +5,15 @@
|
||||
|
||||
<h2>Resources</h2>
|
||||
|
||||
<button class="btn btn-primary mb-3">
|
||||
<a href="{% url 'atlas:resource_create' %}">Create New Resource</a>
|
||||
</button>
|
||||
|
||||
{% comment %} <details>
|
||||
<summary>Search Resources</summary>
|
||||
{% include "atlas/partials/resource_search_panel.html" %}
|
||||
</details>
|
||||
{% endcomment %}
|
||||
<form>
|
||||
{% render_table table %}
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user