Skip to content

Commit f48e0ee

Browse files
committed
Count the whole collection in the hero and lead with Newspapers
The hero's Items figure counted articles, Islamic publications, audiovisual and documents — photographs (class 58) were counted nowhere and the 867 references sat outside it on their own card, so the homepage total disagreed with the Collection Overview page's definition of the collection. Items now spans every record a visitor can open as an item page: content, photographs and the bibliography. The freed lead slot goes to the corpus's defining fact: 81 distinct press titles across articles and Islamic publications, read from the data snapshot's `newspapers` aggregate and linked to the collection-overview dashboard whose coverage panel lists them. References stay visible in the depth row (`references_count`) — a curated bibliography of this field is rare enough to be worth naming — and "Unique sources" becomes "Archives consulted" so dcterms:source no longer reads as a second, smaller newspapers count.
1 parent 5724299 commit f48e0ee

10 files changed

Lines changed: 74 additions & 43 deletions

File tree

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ authors:
2929
given-names: Frédérick
3030
orcid: "https://orcid.org/0000-0003-0959-2092"
3131
affiliation: "University of Bayreuth"
32-
version: "2.15.0"
32+
version: "2.16.0"
3333
date-released: "2026-08-27"
3434
license: GPL-3.0-or-later
3535
repository-code: "https://github.com/fmadore/IWAC-theme"

asset/sass/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Theme URI: https://github.com/fmadore/IWAC-theme
44
Author: Frédérick Madore
55
Author URI: https://www.frederickmadore.com/
66
Description: Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection
7-
Version: 2.15.0
7+
Version: 2.16.0
88
Omeka Version Constraint: ^4.2.0
99
Requires PHP: ^8.1
1010
License: GNU General Public License v3 or later

config/theme.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[info]
22
name = "IWAC Theme"
3-
version = "2.15.0"
3+
version = "2.16.0"
44
author = "Frédérick Madore"
55
description = "Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection at ZMO Berlin. Features light/dark mode toggle and multilingual support."
66
theme_link = "https://github.com/fmadore/IWAC-theme"

helper/BannerStats.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@
99
final class BannerStats extends AbstractHelper
1010
{
1111
private const RESOURCE_CLASSES = [
12-
'items' => [36, 60, 38, 49],
12+
// "Items" is every record a visitor can open as an item page: press
13+
// articles (36), Islamic publications (60), audiovisual (38),
14+
// documents (49), photographs (58), and the nine bibliographic
15+
// reference classes. Authority records (the index) are the one
16+
// deliberate exclusion — they describe the items, they are not items.
17+
'items' => [36, 60, 38, 49, 58, 35, 43, 88, 40, 82, 178, 52, 77, 305],
1318
'index' => [94, 9, 96, 54, 244],
14-
'references' => [35, 43, 88, 40, 82, 178, 52, 77, 305],
1519
];
1620

1721
private const SUMMARY_KEYS = [
22+
'newspapers',
23+
'references_count',
1824
'total_words',
1925
'total_pages',
2026
'unique_sources',

language/fr.mo

45 Bytes
Binary file not shown.

language/fr.po

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ msgid_plural "Archived web pages"
5454
msgstr[0] "Page web archivée"
5555
msgstr[1] "Pages web archivées"
5656

57-
#: view/common/banner.phtml:187
57+
#: view/common/banner.phtml:202
58+
msgid "Archives consulted"
59+
msgstr "Archives consultées"
60+
61+
#: view/common/banner.phtml:204
5862
msgid "Audiovisual minutes"
5963
msgstr "Minutes audiovisuelles"
6064

@@ -106,7 +110,7 @@ msgstr "Fermer la visionneuse"
106110
msgid "Collapse the full text"
107111
msgstr "Réduire le texte intégral"
108112

109-
#: view/common/banner.phtml:216
113+
#: view/common/banner.phtml:233
110114
msgid "Collection at a glance"
111115
msgstr "La collection en un coup d’œil"
112116

@@ -122,11 +126,11 @@ msgstr "Copié"
122126
msgid "Copy"
123127
msgstr "Copier"
124128

125-
#: view/common/banner.phtml:232
129+
#: view/common/banner.phtml:249
126130
msgid "Corpus in depth"
127131
msgstr "Le corpus en détail"
128132

129-
#: view/common/banner.phtml:174
133+
#: view/common/banner.phtml:186
130134
msgid "Countries"
131135
msgstr "Pays"
132136

@@ -146,7 +150,7 @@ msgstr ""
146150
msgid "Default"
147151
msgstr "Par défaut"
148152

149-
#: view/common/banner.phtml:186
153+
#: view/common/banner.phtml:203
150154
msgid "Document types"
151155
msgstr "Types de documents"
152156

@@ -218,7 +222,7 @@ msgstr "Image %1 sur %2"
218222
msgid "Image viewer"
219223
msgstr "Visionneuse d’images"
220224

221-
#: view/common/banner.phtml:172
225+
#: view/common/banner.phtml:177
222226
msgid "Index"
223227
msgstr "Index"
224228

@@ -242,11 +246,11 @@ msgstr ""
242246
msgid "Item: %s"
243247
msgstr "Document : %s"
244248

245-
#: view/common/banner.phtml:171 view/common/linked-resources.phtml:19 view/omeka/site/index/search.phtml:27 view/omeka/site/item/browse.phtml:38 view/omeka/site/item/browse.phtml:40
249+
#: view/common/banner.phtml:176 view/common/linked-resources.phtml:19 view/omeka/site/index/search.phtml:27 view/omeka/site/item/browse.phtml:38 view/omeka/site/item/browse.phtml:40
246250
msgid "Items"
247251
msgstr ""
248252

249-
#: view/common/banner.phtml:188
253+
#: view/common/banner.phtml:205
250254
msgid "Languages"
251255
msgstr "Langues"
252256

@@ -286,6 +290,10 @@ msgstr "Média : %s"
286290
msgid "Newest first"
287291
msgstr "Plus récents d’abord"
288292

293+
#: view/common/banner.phtml:184
294+
msgid "Newspapers"
295+
msgstr "Journaux"
296+
289297
#: view/common/pagination.phtml:41
290298
msgid "Next"
291299
msgstr ""
@@ -366,7 +374,7 @@ msgstr ""
366374
msgid "Read the full text — %s more words"
367375
msgstr "Lire le texte intégral — %s mots restants"
368376

369-
#: view/common/banner.phtml:173
377+
#: view/common/banner.phtml:198
370378
msgid "References"
371379
msgstr "Références"
372380

@@ -462,22 +470,18 @@ msgstr "Titre (Z-A)"
462470
msgid "Toggle submenu"
463471
msgstr "Afficher ou masquer le sous-menu"
464472

465-
#: view/common/banner.phtml:184
473+
#: view/common/banner.phtml:194
466474
msgid "Total pages"
467475
msgstr "Pages totales"
468476

469-
#: view/common/banner.phtml:183
477+
#: view/common/banner.phtml:193
470478
msgid "Total words"
471479
msgstr "Mots totaux"
472480

473481
#: view/common/linked-resources-table.phtml:105 view/common/linked-resources-table.phtml:37
474482
msgid "Type"
475483
msgstr ""
476484

477-
#: view/common/banner.phtml:185
478-
msgid "Unique sources"
479-
msgstr "Sources uniques"
480-
481485
#: view/common/resource-values.phtml:280
482486
msgid "Value Annotations"
483487
msgstr "Annotations de valeur"

language/template.pot

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ msgid_plural "Archived web pages"
5656
msgstr[0] ""
5757
msgstr[1] ""
5858

59-
#: view/common/banner.phtml:187
59+
#: view/common/banner.phtml:202
60+
msgid "Archives consulted"
61+
msgstr ""
62+
63+
#: view/common/banner.phtml:204
6064
msgid "Audiovisual minutes"
6165
msgstr ""
6266

@@ -108,7 +112,7 @@ msgstr ""
108112
msgid "Collapse the full text"
109113
msgstr ""
110114

111-
#: view/common/banner.phtml:216
115+
#: view/common/banner.phtml:233
112116
msgid "Collection at a glance"
113117
msgstr ""
114118

@@ -124,11 +128,11 @@ msgstr ""
124128
msgid "Copy"
125129
msgstr ""
126130

127-
#: view/common/banner.phtml:232
131+
#: view/common/banner.phtml:249
128132
msgid "Corpus in depth"
129133
msgstr ""
130134

131-
#: view/common/banner.phtml:174
135+
#: view/common/banner.phtml:186
132136
msgid "Countries"
133137
msgstr ""
134138

@@ -148,7 +152,7 @@ msgstr ""
148152
msgid "Default"
149153
msgstr ""
150154

151-
#: view/common/banner.phtml:186
155+
#: view/common/banner.phtml:203
152156
msgid "Document types"
153157
msgstr ""
154158

@@ -220,7 +224,7 @@ msgstr ""
220224
msgid "Image viewer"
221225
msgstr ""
222226

223-
#: view/common/banner.phtml:172
227+
#: view/common/banner.phtml:177
224228
msgid "Index"
225229
msgstr ""
226230

@@ -244,11 +248,11 @@ msgstr ""
244248
msgid "Item: %s"
245249
msgstr ""
246250

247-
#: view/common/banner.phtml:171 view/common/linked-resources.phtml:19 view/omeka/site/index/search.phtml:27 view/omeka/site/item/browse.phtml:38 view/omeka/site/item/browse.phtml:40
251+
#: view/common/banner.phtml:176 view/common/linked-resources.phtml:19 view/omeka/site/index/search.phtml:27 view/omeka/site/item/browse.phtml:38 view/omeka/site/item/browse.phtml:40
248252
msgid "Items"
249253
msgstr ""
250254

251-
#: view/common/banner.phtml:188
255+
#: view/common/banner.phtml:205
252256
msgid "Languages"
253257
msgstr ""
254258

@@ -288,6 +292,10 @@ msgstr ""
288292
msgid "Newest first"
289293
msgstr ""
290294

295+
#: view/common/banner.phtml:184
296+
msgid "Newspapers"
297+
msgstr ""
298+
291299
#: view/common/pagination.phtml:41
292300
msgid "Next"
293301
msgstr ""
@@ -368,7 +376,7 @@ msgstr ""
368376
msgid "Read the full text — %s more words"
369377
msgstr ""
370378

371-
#: view/common/banner.phtml:173
379+
#: view/common/banner.phtml:198
372380
msgid "References"
373381
msgstr ""
374382

@@ -464,22 +472,18 @@ msgstr ""
464472
msgid "Toggle submenu"
465473
msgstr ""
466474

467-
#: view/common/banner.phtml:184
475+
#: view/common/banner.phtml:194
468476
msgid "Total pages"
469477
msgstr ""
470478

471-
#: view/common/banner.phtml:183
479+
#: view/common/banner.phtml:193
472480
msgid "Total words"
473481
msgstr ""
474482

475483
#: view/common/linked-resources-table.phtml:105 view/common/linked-resources-table.phtml:37
476484
msgid "Type"
477485
msgstr ""
478486

479-
#: view/common/banner.phtml:185
480-
msgid "Unique sources"
481-
msgstr ""
482-
483487
#: view/common/resource-values.phtml:280
484488
msgid "Value Annotations"
485489
msgstr ""

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iwac-theme",
3-
"version": "2.15.0",
3+
"version": "2.16.0",
44
"description": "Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection.",
55
"main": "gulpfile.js",
66
"scripts": {

view/common/banner.phtml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ if ($compact) {
148148
$statPageSlugs = [
149149
'items' => ['browse', 'parcourir'],
150150
'index' => ['index'],
151-
'references' => ['references'],
151+
// The newspapers figure opens the collection-overview
152+
// dashboard: its newspaper-coverage panel lists exactly the
153+
// titles the figure counts.
154+
'newspapers' => ['collection-overview', 'vue-d-ensemble'],
152155
];
153156
foreach ($statPageSlugs as $statKey => $slugs) {
154157
foreach ($slugs as $slug) {
@@ -165,24 +168,38 @@ if ($compact) {
165168
$statPageUrls = [];
166169
}
167170

171+
$summary = $bannerStats['summary'];
172+
168173
$stats = null;
169174
if ($counts) {
170175
$stats = [
171176
['n' => $counts['items'], 'label' => $translate('Items'), 'featured' => true, 'url' => $statPageUrls['items'] ?? null],
172177
['n' => $counts['index'], 'label' => $translate('Index'), 'url' => $statPageUrls['index'] ?? null],
173-
['n' => $counts['references'], 'label' => $translate('References'), 'url' => $statPageUrls['references'] ?? null],
174-
['n' => $counts['countries'], 'label' => $translate('Countries')],
175178
];
179+
// Distinct press titles across articles and Islamic publications.
180+
// This one rides the data snapshot rather than the live API — a
181+
// distinct-values aggregate the core Omeka API cannot count in one
182+
// query. Without a snapshot the row simply degrades to three figures.
183+
if (isset($summary['newspapers'])) {
184+
$stats[] = ['n' => $summary['newspapers'], 'label' => $translate('Newspapers'), 'url' => $statPageUrls['newspapers'] ?? null];
185+
}
186+
$stats[] = ['n' => $counts['countries'], 'label' => $translate('Countries')];
176187
}
177188
$thin = "\xE2\x80\xAF"; // U+202F narrow no-break space — locale-neutral digit grouping
178189

179-
$summary = $bannerStats['summary'];
180190
$substats = null;
181191
if ($summary) {
182192
$depthFields = [
183193
'total_words' => $translate('Total words'),
184194
'total_pages' => $translate('Total pages'),
185-
'unique_sources' => $translate('Unique sources'),
195+
// Counted inside the Items figure above; surfaced on its own
196+
// because a curated bibliography of this field is rare enough
197+
// to be worth naming.
198+
'references_count' => $translate('References'),
199+
// dcterms:source — the archives, libraries and personal
200+
// collections the material was gathered from. Labelled to keep
201+
// it from reading as a second, smaller newspapers count.
202+
'unique_sources' => $translate('Archives consulted'),
186203
'document_types' => $translate('Document types'),
187204
'audiovisual_minutes' => $translate('Audiovisual minutes'),
188205
'languages' => $translate('Languages'),

0 commit comments

Comments
 (0)