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

CONCD-924 #2582

Merged
merged 12 commits into from
Nov 1, 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
4 changes: 2 additions & 2 deletions concordia/static/js/src/contribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ function setupPage() {
.attr('hidden', 'hidden')
.filter('#message-inprogress')
.removeAttr('hidden');
messageChildren
.filter('#message-contributors')
$('#transcription-status-display').removeAttr('hidden');
$('#message-contributors')
.removeAttr('hidden')
.find('#message-contributors-num')
.html(responseData.asset.contributors);
Expand Down
21 changes: 20 additions & 1 deletion concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ $alert-padding-x: 1rem;
@import '../../../node_modules/bootstrap/scss/nav';
@import '../../../node_modules/bootstrap/scss/navbar';
@import '../../../node_modules/bootstrap/scss/breadcrumb';
@import '../../../node_modules/bootstrap/scss/alert';
@import '../../../node_modules/bootstrap/scss/close';
@import '../../../node_modules/bootstrap/scss/carousel';

// progress
Expand Down Expand Up @@ -234,6 +236,15 @@ header.border-bottom {
color: $dark;
}
}

&.alert-success {
background-color: $green;
}
}

.alert a[type='button'] {
color: inherit;
font-size: 1.5rem;
}

.font-serif {
Expand Down Expand Up @@ -705,10 +716,13 @@ li.breadcrumb-item.active {
margin: 0 -6px;
}

.row .concordia-object-card-container {
width: 90%;
}

.concordia-object-card-container {
display: flex;
flex-wrap: wrap;
width: 90%;
padding-top: 0.25em;
}

Expand Down Expand Up @@ -996,6 +1010,11 @@ body .disabled > .page-link {
width: 14px;
}

#previous-guide,
#next-guide {
cursor: pointer;
}

.aspect-ratio-box {
height: 0;
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion concordia/templates/fragments/_filter-buttons.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if user.is_authenticated %}
<div class="col-4 mt-4 ps-5 pe-3">
<div>
<input name="radioButtons" type="radio" id="show-all" {% if do_filter %}onclick="filterAssets(false, '{{ all_url }}?{{ sublevel_qs }}')"{% else %}checked{% endif %}>
<label>Show all</label>
<input name="radioButtons" type="radio" id="filter-assets" {% if do_filter %}checked{% else %}onclick="filterAssets(true, '{{ filtered_url }}?{{ sublevel_qs }}')"{% endif %} class="ml-1">
Expand Down
8 changes: 4 additions & 4 deletions concordia/templates/fragments/recent-pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ <h2>Recent Pages Worked On</h2>
<button type="submit" class="btn btn-primary rounded-0 p-2">Go</button>
</div>
<div class="d-flex flex-row pt-1">
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1" onclick="sortDateDescending();"{% if order_by != 'date-ascending' %} checked{% endif %}>
<div>
<input type="radio" name="flexRadioDefault" id="flexRadioDefault1" onclick="sortDateDescending();"{% if order_by != 'date-ascending' %} checked{% endif %}>
<label class="form-check-label" for="flexRadioDefault1">Sort by Newest</label>
</div>
<div class="form-check" style="margin-left: 1.6rem;">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault2" onclick="sortDateAscending();"{% if order_by == 'date-ascending'%} checked{% endif %}>
<div style="margin-left: 1.6rem;">
<input type="radio" name="flexRadioDefault" id="flexRadioDefault2" onclick="sortDateAscending();"{% if order_by == 'date-ascending'%} checked{% endif %}>
<label class="form-check-label" for="flexRadioDefault2">Sort by Oldest</label>
</div>
</div>
Expand Down
28 changes: 18 additions & 10 deletions concordia/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
{% if SHOW_BANNER and banner %}
<div id="homepage-contribute-container" class="container my-4">
<div class="px-default ms-md-3 mb-5">
<div class="alert {{ banner.alert_class }} alert-dismissible w-100 text-center" id="banner-{{ banner.slug }}" role="alert">
<a class="btn {{ banner.btn_class }}" href="{{ banner.link }}"{% if banner.open_in_new_window_tab %} target="_blank"{% endif %}>
{{ banner.text }}
<div class="alert {{ banner.alert_class }} alert-dismissible w-100 d-flex justify-content-between" id="banner-{{ banner.slug }}" role="alert">
<div></div>
<div>
<a class="btn {{ banner.btn_class }}" href="{{ banner.link }}"{% if banner.open_in_new_window_tab %} target="_blank"{% endif %}>
{{ banner.text }}
</a>
<button type="button" class="btn btn-dark" id="no-interface-banner">Don't display this again</button>
</div>
<a type="button" data-bs-dismiss="alert" aria-label="Close">
<span class="fas fa-times text-white"></span>
</a>
<button type="button" class="btn btn-dark" id="no-interface-banner">Don't display this again</button>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">

</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -74,7 +77,7 @@ <h3 class="mt-3 text-uppercase">Review</h3>
<div class="carousel-item {% if forloop.first %} active {% endif %}" {% if slide.overlay_position == "right" %} data-overlay-position="top-right" {% endif %} data-bs-title="{{ slide.headline }}" data-hero-text="{{ slide.body }}" data-link-url="{{ slide.lets_go_url }}">
<img class="d-block img-fluid" src="{{ MEDIA_URL }}{{ slide.carousel_image }}" alt="{{ slide.image_alt_text }}" width="1200" height="480">
<div class="carousel-overlay text-center d-flex flex-column justify-content-around align-items-center">
<h2 class="h1 title mb-1">{{ slide.headline }}</h2>
<h2 class="h1 title mb-1 fw-bold">{{ slide.headline }}</h2>
<p class="hero-text mx-auto">{{ slide.body }}</p>
<a class="btn btn-primary px-4" href="{{ slide.lets_go_url }}">LET'S GO!</a>
</div>
Expand Down Expand Up @@ -220,8 +223,13 @@ <h2 class="text-center font-serif mb-4">Campaigns: <small>Choose which collectio
}
}
$("#no-interface-banner").click(function(event) {
storage.setItem(event.target.parentElement.id, true);
$('#' + event.target.parentElement.id).attr("hidden", true);
var banner = event.target.parentElement.parentElement;
if (banner.hasAttribute('id')) {
storage.setItem(banner.id, true);
var element = document.getElementById(banner.id);
element.classList.remove("d-flex");
element.attr("hidden", "hidden");
}
});
</script>
{% endblock body_scripts %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Someone else is already transcribing this page</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" onclick="$('#asset-reservation-failure-modal').hide();">

</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% csrf_token %}
<input type="hidden" name="supersedes" value="{{ transcription.pk|default:'' }}" />
<div class="row justify-content-sm-between align-items-end mx-0">
<div class="col">
<div class="col ps-0">
<div id="transcription-status-message">
<div id="transcription-status-display" class="row">
<h2 id="display-submitted" {% if transcription_status != 'submitted' %}hidden{% endif %}>
Expand Down
10 changes: 5 additions & 5 deletions concordia/templates/transcriptions/asset_detail/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ <h3 class="px-2 my-1 py-1">How-To Guide</h3>
</ul>
</div>
<div class="carousel-item container">
<div class="border-bottom justify-content-center mb-3 py-1 row">
<div class="col-6 justify-self-center me-4">
<div class="border-bottom justify-content-end mb-3 py-1 d-flex">
<div class="col-7 justify-self-center me-4">
<h3>About This Campaign</h3>
</div>
<div class="col-1 pt-2">
<a class="fw-bold ms-3" id="next-guide" href="#guide-carousel" data-bs-slide="next">></a>
<a class="fw-bold ms-3" id="next-guide" data-bs-target="#guide-carousel" data-bs-slide="next">></a>
</div>
</div>
<div class="guide-body">
Expand Down Expand Up @@ -67,14 +67,14 @@ <h5 class="pt-3">Helpful Links</h5>
<div class="carousel-item container" id="pane-{{ forloop.counter }}">
<div class="border-bottom justify-content-center mb-3 py-1 row">
<div class="col-1 pt-2 prev-guide">
<a class="fw-bold" id="previous-guide" href="#guide-carousel" data-bs-slide="prev"><</a>
<a class="fw-bold" id="previous-guide" data-bs-target="#guide-carousel" data-bs-slide="prev"><</a>
</div>
<div class="col text-center ps-2">
<h3>{{ guide.title }}</h3>
</div>
<div class="col-1 pt-2 next-guide">
{% if not forloop.last %}
<a class="fw-bold" id="next-guide" href="#guide-carousel" data-bs-slide="next">></a>
<a class="fw-bold" id="next-guide" data-bs-target="#guide-carousel" data-bs-slide="next">></a>
{% endif %}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions concordia/templates/transcriptions/campaign_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ <h4 class="mb-3">Helpful Links</h4>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-12 col-lg mt-4">
<div class="d-flex justify-content-between mt-4">
<div>
<h3>Filter pages:</h2>
</div>
{% url 'transcriptions:campaign-detail' campaign.slug as all_assets %}
Expand Down
4 changes: 2 additions & 2 deletions concordia/templates/transcriptions/item_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h1>{{ item.title }}</h1>
</div>
</div>
{% include "fragments/transcription-progress-row.html" %}
<div class="row">
<div class="col-12 col-lg mt-4">
<div class="d-flex justify-content-between mt-4">
<div>
<h3>Filter pages:</h2>
</div>
{% url 'transcriptions:item-detail' campaign.slug project.slug item.item_id as all_assets %}
Expand Down
4 changes: 2 additions & 2 deletions concordia/templates/transcriptions/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ <h1>{{ project.title }}</h1>
<div class="hero-text">{{ project.description|safe }}</div>
</div>
</div>
<div class="row">
<div class="col-12 col-lg mt-4">
<div class="d-flex justify-content-between mt-4">
<div>
<h3>Filter pages:</h2>
</div>
{% url 'transcriptions:project-detail' campaign.slug project.slug as all_assets %}
Expand Down