Skip to content

Commit fb7f2e9

Browse files
authored
Style counts as badge (#961)
* Style counts as badge
1 parent d40eacf commit fb7f2e9

File tree

11 files changed

+48
-41
lines changed

11 files changed

+48
-41
lines changed

access/src/main/webapp/WEB-INF/jsp/fullRecord/collectionRecord.jsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<c:import url="common/thumbnail.jsp">
5252
<c:param name="size" value="large" />
5353
</c:import>
54-
<c:out value="${briefObject.title}"/> <span class="item-count">(<c:out value="${childCount}" /> items)</span>
54+
<c:out value="${briefObject.title}"/> <span class="item_container_count"><c:out value="${childCount}" /> items</span>
5555
</h2>
5656
<c:if test="${not empty briefObject.dateAdded}">
5757
<p><strong>${searchSettings.searchFieldLabels['DATE_ADDED']}:</strong> <fmt:formatDate pattern="yyyy-MM-dd" value="${briefObject.dateAdded}" /></p>

access/src/main/webapp/WEB-INF/jsp/fullRecord/folderRecord.jsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<c:import url="common/thumbnail.jsp">
5050
<c:param name="size" value="large" />
5151
</c:import>
52-
</i> <c:out value="${briefObject.title}"/> <span class="item-count">(<c:out value="${childCount}" /> items)</span>
52+
</i> <c:out value="${briefObject.title}"/> <span class="item_container_count"><c:out value="${childCount}" /> items</span>
5353
</h2>
5454
<c:if test="${not empty briefObject.dateAdded}">
5555
<p><strong>${searchSettings.searchFieldLabels['DATE_ADDED']}:</strong> <fmt:formatDate pattern="yyyy-MM-dd" value="${briefObject.dateAdded}" /></p>

static/css/admin/search_results.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
color: #8CB4C6;
320320
}
321321

322-
.res_entry.deleted .searchitem_container_count, .res_entry.moving .searchitem_container_count {
322+
.res_entry.deleted .item_container_count, .res_entry.moving .item_container_count {
323323
color: #8CB4C6;
324324
}
325325

@@ -442,7 +442,7 @@
442442
}
443443
}*/
444444

445-
.searchitem_container_count {
445+
.item_container_count {
446446
color: #444;
447447
}
448448

static/css/cdr-homepage.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/cdr-ui.css

+6-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/sass/cdr-ui.scss

+16-14
Original file line numberDiff line numberDiff line change
@@ -647,18 +647,16 @@ p.spacing {
647647
padding: 25px;
648648
}
649649

650-
#list-records-display {
651-
.searchitem_container_count {
652-
background-color: $unc-blue;
653-
border: 1px solid $unc-blue;
654-
border-radius: 5px;
655-
color: white;
656-
line-height: 18px;
657-
margin-bottom: 4px;
658-
padding: 3px 8px;
659-
white-space: nowrap;
660-
width: 100%;
661-
}
650+
.item_container_count {
651+
background-color: $unc-blue;
652+
border: 1px solid $unc-blue;
653+
border-radius: 5px;
654+
color: white;
655+
line-height: 18px;
656+
margin-bottom: 4px;
657+
padding: 3px 8px;
658+
white-space: nowrap;
659+
width: 100%;
662660
}
663661

664662
.iteminfo {
@@ -721,11 +719,15 @@ p.no-search-results {
721719
margin: 15px;
722720

723721
span {
724-
color: #707070;
725722
font-size: 20px;
726723
font-weight: normal;
727724
margin-left: 10px;
728725
}
726+
727+
span.item_container_count {
728+
color: white;
729+
vertical-align: middle;
730+
}
729731
}
730732

731733
p {
@@ -751,7 +753,7 @@ p.no-search-results {
751753
width: 98%;
752754
}
753755

754-
.searchitem_container_count {
756+
.item_container_count {
755757
background-color: inherit;
756758
border: none;
757759
color: gray;

static/css/sass/cdr_ui_styles.scss

+16-14
Original file line numberDiff line numberDiff line change
@@ -203,18 +203,16 @@ p.spacing {
203203
padding: 25px;
204204
}
205205

206-
#list-records-display {
207-
.searchitem_container_count {
208-
background-color: $unc-blue;
209-
border: 1px solid $unc-blue;
210-
border-radius: 5px;
211-
color: white;
212-
line-height: 18px;
213-
margin-bottom: 4px;
214-
padding: 3px 8px;
215-
white-space: nowrap;
216-
width: 100%;
217-
}
206+
.item_container_count {
207+
background-color: $unc-blue;
208+
border: 1px solid $unc-blue;
209+
border-radius: 5px;
210+
color: white;
211+
line-height: 18px;
212+
margin-bottom: 4px;
213+
padding: 3px 8px;
214+
white-space: nowrap;
215+
width: 100%;
218216
}
219217

220218
.iteminfo {
@@ -277,11 +275,15 @@ p.no-search-results {
277275
margin: 15px;
278276

279277
span {
280-
color: #707070;
281278
font-size: 20px;
282279
font-weight: normal;
283280
margin-left: 10px;
284281
}
282+
283+
span.item_container_count {
284+
color: white;
285+
vertical-align: middle;
286+
}
285287
}
286288

287289
p {
@@ -307,7 +309,7 @@ p.no-search-results {
307309
width: 98%;
308310
}
309311

310-
.searchitem_container_count {
312+
.item_container_count {
311313
background-color: inherit;
312314
border: none;
313315
color: gray;

static/js/vue-cdr-access/src/components/listDisplay.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="column is-10">
3131
<div class="result-title">
3232
<a :class="{deleted: markedForDeletion(record)}" :href="recordUrl(record.id, linkBrowseType)">{{ record.title }}</a>
33-
<span v-if="record.type !== 'File'" class="searchitem_container_count">{{ countDisplay(record.counts.child) }}</span>
33+
<span v-if="record.type !== 'File'" class="item_container_count">{{ countDisplay(record.counts.child) }}</span>
3434
</div>
3535
<div><span class="has-text-weight-bold">Date Deposited:</span> {{ formatDate(record.added) }}</div>
3636
<div v-if="record.objectPath.length >= 3 && record.type !== 'Collection'">

static/templates/admin/collector/binList.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Deposit Bin Collector</h1>
2323
<h2>
2424
<a href="collector/details/<%= info.key %>"
2525
class="has_tooltip collect_details_link" title="View names of files available for collection."><%= info.name %></a>
26-
<span class="searchitem_container_count">
26+
<span class="item_container_count">
2727
<%= formatCounts(info.applicableCount, info.nonapplicableCount) %>
2828
</span>
2929
</h2>

static/templates/admin/resultEntry.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<a href="list/<%= metadata.id %>" class="title res_link has_tooltip"
1818
title="View contents of <%= _.escape(metadata.title) %>."><%= _.escape(metadata.title) %></a>
1919
<% if (metadata.counts && 'child' in metadata.counts) { %>
20-
<span class="searchitem_container_count">
20+
<span class="item_container_count">
2121
<%= metadata.counts.child %>
2222
</span>
2323
<% }

static/templates/admin/trashResultEntry.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<% } else { %>
2929
<a href="list/<%= metadata.id %>" class="title has_tooltip"
3030
title="View contents of <%= _.escape(metadata.title) %>."><%= _.escape(metadata.title) %></a>
31-
<span class="searchitem_container_count">
31+
<span class="item_container_count">
3232
(<%= metadata.counts && metadata.counts.child? metadata.counts.child: 0 %> item<%= metadata.counts && metadata.counts.child == 1? '' : 's' %>)
3333
</span>
3434
<% } %>

0 commit comments

Comments
 (0)