Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up for search input box #173

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions cmp/static/cmp/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
margin-top: 5%;
font-size: 18px;
text-align: center;
</style>

}

h1, h3, h3, h4, h5, h6 {
color: #8B0000;
}
Expand All @@ -17,6 +16,7 @@
padding: 7px;
text-align: center;
}

.response-text {
font-size: 24px;
margin-top: 3%;
Expand Down Expand Up @@ -45,7 +45,11 @@
margin-right: auto;
width: 50%; /* adjust this value as needed */
}


.search-input {
padding-bottom: 24px;
}

.content-table thead tr {
background-color: #8B0000;
color: #ffffff;
Expand All @@ -55,9 +59,9 @@

}

.content-table th,
.content-table th,
.content-table td {
padding: 12px 15px;
padding: 12px;
}

.content-table tbody tr {
Expand Down
13 changes: 2 additions & 11 deletions templates/cmp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,22 @@
{% block title %} Corps of Military Police {% endblock %}
{% block content %}

<style>
body {
text-align: center;
}
</style>

<div>
<img src="{% static 'cmp/c2-rmp.svg' %}" style="width:150px; height:auto;" alt="The badge of the Royal Military Police">
<h2> Corps of Military Police</h2>
<p></p>
<h3>Casualties, Honours & Decorations, Prisoners of War</h3>
</div>
<p>
</p>
<p>
</p>
</div>
<div>
<div name="search-input" class="search-input">
<form hx-post="{% url 'index' %}" hx-trigger="submit" hx-target="#results">
{% csrf_token %}
<label for="name">Search for a soldier:</label>
<input type="text" id="name" name="name">
<input type="submit" value="Search">
</form>
<br>
</div>
<div id="results">
{% include 'cmp/soldier-results.html' %}
</div>
Expand Down
6 changes: 1 addition & 5 deletions templates/cmp/mgmt-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
<body>
<h1>Management Index</h1>
<ul>
<h3>Broken</h3>
<li><a href="/mgmt/prisoner-of-war-camps">POW Camps</a></li>
<li><a href="/mgmt/cemeteries">Cemeteries</a></li>
<br>
<h3>Working</h3>
<h3>Working Search Pages</h3>
<li><a href="/mgmt/soldiers/search/">Soldiers</a></li>
<li><a href="/mgmt/countries/search/">Countries</a></li>
<li><a href="/mgmt/ranks/search/">Ranks</a></li>
Expand Down
4 changes: 3 additions & 1 deletion templates/cmp/search-cemeteries.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
{% block title %}Cemeteries{% endblock %}
{% block content %}

<h1> Edit Cemeteries</h1>
<h1> Search Cemeteries</h1>

<div name="search-input" class="search-input">
<form method="get">
<input type="text" name="q" placeholder="Search Cemeteries to edit">
<input type="submit" value="Search">
</form>
</div>


{% for cemetery in cemeteries %}
Expand Down
4 changes: 4 additions & 0 deletions templates/cmp/search-countries.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
{% block title %}Countries{% endblock %}
{% block content %}

<h1>Search Countries</h1>

<div name="search-input" class="search-input">
<form method="get">
<input type="text" name="q" placeholder="Search Countries to edit">
<input type="submit" value="Search">
</form>
</div>


{% for country in countries %}
Expand Down
2 changes: 2 additions & 0 deletions templates/cmp/search-prisoner-of-war-camps.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

<h1>Search Prisoner of War Camps</h1>

<div name="search-input" class="search-input">
<form method="get">
<input type="text" name="q" placeholder="Search Prisoner of War Camps to edit">
<input type="submit" value="Search">
</form>
</div>

{% for powcamp in powcamps %}
<p>
Expand Down
3 changes: 2 additions & 1 deletion templates/cmp/search-ranks.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

<h1>Search Ranks</h1>

<div name="search-input" class="search-input">
<form method="get">
<input type="text" name="q" placeholder="Search ranks to edit">
<input type="submit" value="Search">
</form>

</div>

{% for rank in ranks%}
<p>
Expand Down
7 changes: 6 additions & 1 deletion templates/cmp/search-soldiers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
{% block title %}Soldiers{% endblock %}
{% block content %}

<h1>Search Soldiers</h1>

<div name="search-input" class="search-input">
<form method="get">
<input type="text" name="q" placeholder="Search soldiers to edit">
<input type="submit" value="Search">
</form>
</div>


<div>
{% for soldier in soldiers %}
<p>
<a href="{% url 'edit-soldiers' soldier.id %}">{{ soldier.surname }}</a>
</p>
{% endfor %}
</div>



Expand Down
Loading