Skip to content

Commit

Permalink
Merge pull request #1725 from dchiller/update-bootstrap-5
Browse files Browse the repository at this point in the history
Update bootstrap 5
  • Loading branch information
dchiller authored Dec 19, 2024
2 parents 5b11019 + 59e6f44 commit 8c751fc
Show file tree
Hide file tree
Showing 70 changed files with 3,936 additions and 3,954 deletions.
11 changes: 5 additions & 6 deletions django/cantusdb_project/articles/templates/article_detail.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{% extends "base_page_with_side_cards.html" %}
{% load helper_tags %} {# for recent_articles #}
{% load helper_tags %}
{# for recent_articles #}
{% block title %}
<title>{{ article.title }} | Cantus Database</title>
<title>{{ article.title }} | Cantus Database</title>
{% endblock %}

{% block uppersidebar %}
<div class="search-bar mb-3">
<div class="search-bar mb-3 position-relative">
{% include "global_search_bar.html" %}
</div>
{% endblock %}

{% block maincontent %}
<h3>
{{ article.title }}
Expand All @@ -36,4 +35,4 @@ <h3>
{% recent_articles %}
</div>
</div>
{% endblock %}
{% endblock %}
39 changes: 21 additions & 18 deletions django/cantusdb_project/articles/templates/article_list.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
{% extends "base_page_with_side_cards.html" %}
{% load helper_tags %} {# for recent_articles #}\
{% load helper_tags %}
{# for recent_articles #}\
{% block title %}
<title>What's New | Cantus Database</title>
<title>What's New | Cantus Database</title>
{% endblock %}
{% block uppersidebar %}
<div class="search-bar mb-3">
{% include "global_search_bar.html" %}
</div>
<div class="search-bar mb-3 position-relative">
{% include "global_search_bar.html" %}
</div>
{% endblock %}
{% block maincontent %}
<h3>What's New</h3>
<h3>
What's New
</h3>
{% for article in articles %}
<div class="row">
<div class="col">
<small>{{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<h4>
<a href="{% url 'article-detail' article.id %}">{{ article.title }}</a>
</h4>
<div class="container">
<small>
{{ article.body.html|safe|truncatechars_html:3000 }}
</small>
<div class="row">
<div class="col">
<small>{{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<h4>
<a href="{% url 'article-detail' article.id %}">{{ article.title }}</a>
</h4>
<div class="container">
<small>
{{ article.body.html|safe|truncatechars_html:3000 }}
</small>
</div>
</div>
</div>
</div>
{% endfor %}
{% include "pagination.html" %}
{% endblock %}
Expand All @@ -36,4 +39,4 @@ <h4>
{% recent_articles %}
</div>
</div>
{% endblock %}
{% endblock %}
18 changes: 6 additions & 12 deletions django/cantusdb_project/main_app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ class Meta:
widgets = {
# "title": TextInputWidget(),
# "siglum": TextInputWidget(),
"holding_institution": autocomplete.ModelSelect2(
url="holding-autocomplete"
),
"shelfmark": TextInputWidget(),
"provenance": autocomplete.ModelSelect2(url="provenance-autocomplete"),
"name": TextInputWidget(),
Expand Down Expand Up @@ -334,12 +337,6 @@ class Meta:
"segment_m2m": CheckboxNameModelMultipleChoiceField,
}

holding_institution = forms.ModelChoiceField(
queryset=Institution.objects.all(),
widget=autocomplete.ModelSelect2(url="holding-autocomplete"),
required=False,
)

complete_inventory = StyledChoiceField(
choices=COMPLETE_INVENTORY_FORM_CHOICES, required=False
)
Expand Down Expand Up @@ -526,6 +523,9 @@ class Meta:
"source_completeness",
]
widgets = {
"holding_institution": autocomplete.ModelSelect2(
url="holding-autocomplete"
),
"shelfmark": TextInputWidget(),
"segment_m2m": CheckboxSelectMultiple(),
"name": TextInputWidget(),
Expand Down Expand Up @@ -567,12 +567,6 @@ class Meta:
"segment_m2m": CheckboxNameModelMultipleChoiceField,
}

holding_institution = forms.ModelChoiceField(
queryset=Institution.objects.all(),
widget=autocomplete.ModelSelect2(url="holding-autocomplete"),
required=False,
)

complete_inventory = StyledChoiceField(
choices=COMPLETE_INVENTORY_FORM_CHOICES, required=False
)
Expand Down
36 changes: 6 additions & 30 deletions django/cantusdb_project/main_app/templates/400.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,15 @@
{% extends 'base.html' %}
{% load static %}
<html lang="en">
<head>
<!-- Required meta tags -->
<meta name="google-site-verification" content="EwxpNpZ_ZOQnetVVLELGn5-aD_beT3EQqUuI6glkArI" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex">
<title>400 Bad Request | Cantus Database</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<style>
body {
margin-bottom: 30px;
/* Margin bottom by footer height */
background-image: url('{% static "background.jpg" %}');
}
</style>
</head>

<body>
<main role="main" class="content container pt-4">
{% block content %}
<div class="container">
{% block title %}<title>400 Bad Request | Cantus Database</title>{% endblock %}
{% block content %}
<div class="container error-page-container">
<div class="row">
<div class="p-3 col-12 bg-white rounded">
<h3>400</h3>
<h5>Bad Request</h5>
<br>
<br />
<p>Your request couldn't be understood by the server.</p>
</div>
</div>
</div>
{% endblock %}
</main>
</body>

</html>
{% endblock %}
37 changes: 19 additions & 18 deletions django/cantusdb_project/main_app/templates/403.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{% extends "base.html" %}
{% block title %}
<title>403 Access Denied | Cantus Database</title>
{% endblock %}

{% block title %}<title>403 Access Denied | Cantus Database</title>{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="p-3 col-12 bg-white rounded">
<h3>403</h3>
<h5>Access denied</h5>
<br>
<dl>
<dd>You are not authorized to access this page.</dd>
{% if not user.is_authenticated %}
<dd>This could be because you are not currently logged in. If you are a contributor and believe you should be able to see this page, try <a href="{% url 'login' %}?next={{ request.path }}">logging in</a>.</dd>
{% endif %}
</dl>
<div class="container error-page-container">
<div class="row">
<div class="p-3 col bg-white rounded">
<h3>403</h3>
<h5>Access denied</h5>
<br />
<dl>
<dd>
You are not authorized to access this page.
</dd>
{% if not user.is_authenticated %}
<dd>
This could be because you are not currently logged in. If you are a contributor and believe you should be able to see this page, try <a href="{% url 'login' %}?next={{ request.path }}">logging in</a>.
</dd>
{% endif %}
</dl>
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}
25 changes: 10 additions & 15 deletions django/cantusdb_project/main_app/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{% extends "base.html" %}
{% block title %}
<title>404 Not Found | Cantus Database</title>
{% endblock %}

{% block title %}<title>404 Not Found | Cantus Database</title>{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="p-3 col-12 bg-white rounded">
<h3>404</h3>
<h5>Page not found</h5>
<br>
<p>
We couldn't find a page at this address.
</p>
<div class="container error-page-container">
<div class="row">
<div class="p-3 col bg-white rounded">
<h3>404</h3>
<h5>Page not found</h5>
<br />
<p>We couldn't find a page at this address.</p>
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}
Loading

0 comments on commit 8c751fc

Please sign in to comment.