Skip to content

Commit 13f6170

Browse files
committed
Add template for pending moderation
1 parent 89c35cf commit 13f6170

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

website/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def ember_app(path=None):
261261
from framework.auth import Auth
262262
auth = Auth.from_kwargs(request.args.to_dict(), {})
263263
if not preprint.can_view(auth):
264-
if getattr(preprint, 'is_pending_moderation', True):
264+
if preprint.is_pending_moderation:
265265
renderer = OsfWebRenderer('pending_moderation.mako', trust=False)
266266
return renderer({
267267
'resource_type': (preprint.provider.preprint_word or 'preprint') if preprint.provider else 'preprint',
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<%inherit file="base.mako"/>
2+
<%def name="title()">Pending Moderation</%def>
3+
<%def name="description()">This ${resource_type} is pending moderation</%def>
4+
5+
<%def name="content()">
6+
<style>
7+
/* Ensure content area has enough height so the footer sticks to the bottom */
8+
.pending-wrapper {
9+
min-height: calc(100vh - 180px); /* header+footer approximate height */
10+
display: -webkit-box;
11+
display: -ms-flexbox;
12+
display: flex;
13+
-webkit-box-align: center;
14+
-ms-flex-align: center;
15+
align-items: center;
16+
}
17+
</style>
18+
19+
<div class="pending-wrapper">
20+
<div class="container">
21+
<div class='row'>
22+
<div class='col-md-12'>
23+
<div class="text-center">
24+
<h2 id='pending-moderation-message'>Pending Moderation</h2>
25+
<div class="alert alert-info">
26+
<i class="fa fa-hourglass-half"></i>
27+
<strong>This ${resource_type} is pending moderation at ${provider_name}</strong>
28+
<p>This ${resource_type} has been submitted for review and is not yet publicly available.
29+
Please check back later as moderation decisions may take some time.</p>
30+
</div>
31+
</div>
32+
</div>
33+
</div>
34+
</div>
35+
</div>
36+
</%def>
37+

0 commit comments

Comments
 (0)