Skip to content

Commit 39bc28b

Browse files
authored
Restyle org request page (#18776)
1 parent 657a33c commit 39bc28b

File tree

10 files changed

+216
-102
lines changed

10 files changed

+216
-102
lines changed

warehouse/admin/templates/admin/organization_applications/detail.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ <h4 class="modal-title" id="declineModalLabel">
336336
</div>
337337
</div>
338338

339-
{% set information_requests = organization_application.information_requests %}
339+
{% set information_requests = organization_application.information_requests|reverse %}
340340
{% set outstanding_information_requests = organization_application.information_requests|selectattr("additional", "defined")|map(attribute="additional")|selectattr("response", "undefined")|list %}
341341
<div class="col-md-7 col-lg-6">
342342
<div class="card">
@@ -490,7 +490,7 @@ <h3 class="card-title">Information Requests</h3>
490490
</div>
491491
<div class="card-body">
492492
{% for information_request in information_requests %}
493-
<div class="card {% if information_request.additional.response %}card-neutral{% else %}card-warning{% endif %} card-outline direct-chat direct-chat-primary"</div>
493+
<div class="card {% if information_request.additional.response %}card-neutral{% else %}card-warning{% endif %} direct-chat direct-chat-primary"</div>
494494
<div class="card-body">
495495
<div class="direct-chat-messages unset-height">
496496
<div class="direct-chat-msg">

warehouse/locale/messages.pot

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,7 @@ msgid ""
22802280
msgstr ""
22812281

22822282
#: warehouse/templates/email/new-organization-requested/body.html:7
2283+
#: warehouse/templates/manage/organization/application.html:30
22832284
#: warehouse/templates/manage/organizations.html:168
22842285
msgid "You will receive an email when the organization has been approved"
22852286
msgstr ""
@@ -4481,6 +4482,7 @@ msgstr ""
44814482
msgid "This Organization request has been declined"
44824483
msgstr ""
44834484

4485+
#: warehouse/templates/manage/organization/application.html:20
44844486
#: warehouse/templates/manage/organizations.html:162
44854487
msgid "Declined"
44864488
msgstr ""
@@ -4545,7 +4547,7 @@ msgstr ""
45454547
msgid "Name of your business, product, or project"
45464548
msgstr ""
45474549

4548-
#: warehouse/templates/manage/organization/application.html:20
4550+
#: warehouse/templates/manage/organization/application.html:43
45494551
#: warehouse/templates/manage/organization/settings.html:62
45504552
#: warehouse/templates/manage/organizations.html:257
45514553
msgid "️Organization URL"
@@ -5391,46 +5393,72 @@ msgstr ""
53915393
msgid "Manage '%(organization_application_name)s' Organization Request"
53925394
msgstr ""
53935395

5394-
#: warehouse/templates/manage/organization/application.html:9
5395-
msgid "Organization request"
5396+
#: warehouse/templates/manage/organization/application.html:10
5397+
#, python-format
5398+
msgid "Organization request for %(org_name)s"
5399+
msgstr ""
5400+
5401+
#: warehouse/templates/manage/organization/application.html:17
5402+
msgid "Request status"
5403+
msgstr ""
5404+
5405+
#: warehouse/templates/manage/organization/application.html:22
5406+
msgid "This organization request has been declined"
5407+
msgstr ""
5408+
5409+
#: warehouse/templates/manage/organization/application.html:24
5410+
msgid "More information needed"
53965411
msgstr ""
53975412

5398-
#: warehouse/templates/manage/organization/application.html:12
5413+
#: warehouse/templates/manage/organization/application.html:26
5414+
msgid "Please provide more information below"
5415+
msgstr ""
5416+
5417+
#: warehouse/templates/manage/organization/application.html:28
5418+
msgid "Request submitted"
5419+
msgstr ""
5420+
5421+
#: warehouse/templates/manage/organization/application.html:35
53995422
#: warehouse/templates/manage/organization/settings.html:14
54005423
msgid "Organization account name"
54015424
msgstr ""
54025425

5403-
#: warehouse/templates/manage/organization/application.html:16
5426+
#: warehouse/templates/manage/organization/application.html:39
54045427
#: warehouse/templates/manage/organization/settings.html:33
54055428
msgid "Organization display name"
54065429
msgstr ""
54075430

5408-
#: warehouse/templates/manage/organization/application.html:24
5431+
#: warehouse/templates/manage/organization/application.html:47
54095432
msgid "️Organization description"
54105433
msgstr ""
54115434

5412-
#: warehouse/templates/manage/organization/application.html:28
5435+
#: warehouse/templates/manage/organization/application.html:51
54135436
#: warehouse/templates/manage/organization/settings.html:111
54145437
msgid "️Organization type"
54155438
msgstr ""
54165439

5417-
#: warehouse/templates/manage/organization/application.html:32
5440+
#: warehouse/templates/manage/organization/application.html:55
54185441
msgid "️Organization membership size"
54195442
msgstr ""
54205443

5421-
#: warehouse/templates/manage/organization/application.html:38
5444+
#: warehouse/templates/manage/organization/application.html:59
54225445
msgid "️Anticipated usage"
54235446
msgstr ""
54245447

5425-
#: warehouse/templates/manage/organization/application.html:42
5448+
#: warehouse/templates/manage/organization/application.html:63
54265449
msgid "Date submitted"
54275450
msgstr ""
54285451

5429-
#: warehouse/templates/manage/organization/application.html:67
5430-
msgid "️Your Response"
5452+
#: warehouse/templates/manage/organization/application.html:76
5453+
msgid "️PyPI Staff"
5454+
msgstr ""
5455+
5456+
#: warehouse/templates/manage/organization/application.html:84
5457+
#: warehouse/templates/manage/organization/application.html:96
5458+
msgid "️Your response"
54315459
msgstr ""
54325460

5433-
#: warehouse/templates/manage/organization/application.html:78
5461+
#: warehouse/templates/manage/organization/application.html:108
54345462
msgid "Submit"
54355463
msgstr ""
54365464

warehouse/static/sass/blocks/_callout-block.scss

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
</div>
2323
2424
Modifiers:
25+
- neutral: Makes border grey
2526
- danger: Makes border red
2627
- warning: Makes border brown
2728
- success: Makes border green
29+
- message: Custom styles for messaging UI
2830
- bottom-margin: Adds extra margin below the callout
2931
3032
// Collapsible
@@ -48,7 +50,6 @@
4850
margin: 15px 0;
4951
position: relative;
5052
border-radius: 4px;
51-
display: inline-block;
5253

5354
&__dismiss {
5455
@include dismiss-button;
@@ -98,18 +99,6 @@
9899
}
99100
}
100101

101-
&--full-width {
102-
width: 100%;
103-
}
104-
105-
&--bottom-margin {
106-
margin-bottom: $half-spacing-unit;
107-
}
108-
109-
&--dismissed {
110-
display: none;
111-
}
112-
113102
&--neutral {
114103
border-color: $border-color;
115104

@@ -181,4 +170,22 @@
181170
@include link-focus-state($success-color);
182171
}
183172
}
173+
174+
&--message {
175+
display: inline-block;
176+
max-width: 75%;
177+
margin: 10px 0;
178+
179+
@media only screen and (max-width: $mobile) {
180+
max-width: 85%;
181+
}
182+
}
183+
184+
&--bottom-margin {
185+
margin-bottom: $half-spacing-unit;
186+
}
187+
188+
&--dismissed {
189+
display: none;
190+
}
184191
}

warehouse/static/sass/blocks/_form-group.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616

1717
.form-group {
18-
margin-bottom: $half-spacing-unit;
18+
margin-bottom: $spacing-unit;
1919
max-width: 350px;
2020

2121
&__label {
2222
display: block;
23-
font-weight: bold;
23+
font-weight: $bold-font-weight;
2424
}
2525

2626
&__label:not(:first-child) {
@@ -32,9 +32,10 @@
3232
font-weight: normal;
3333
}
3434

35-
&__wide {
35+
&--wide {
3636
margin-bottom: $half-spacing-unit;
3737
max-width: unset;
38+
width: 100%;
3839
}
3940

4041
:where(
@@ -62,6 +63,10 @@
6263
width: 350px;
6364
margin-top: 4px;
6465
max-width: 100%;
66+
67+
&--full-width {
68+
width: 100%;
69+
}
6570
}
6671

6772
&__text {

warehouse/static/sass/blocks/_table.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- Use a th and add 'scope="row"' for row headings
3030
3131
Modifiers:
32+
- information: table for displaying table data - ideally with row level headings
3233
- downloads: specific styles for downloads table on project detail page
3334
- releases: specific styles for releases table on manage project page
3435
- files: specific styles for files table on releases tab
@@ -122,6 +123,10 @@
122123
padding: 10px;
123124
}
124125

126+
tbody tr th {
127+
font-weight: $bold-font-weight;
128+
}
129+
125130
th,
126131
td {
127132
border-bottom: 1px solid $base-grey;
@@ -154,13 +159,30 @@
154159
text-align: right;
155160
}
156161

162+
157163
&__mobile-label {
158164
display: none;
159165
font-weight: $bold-font-weight;
160166
}
161167

162168
// Custom table styles
163169

170+
&--information {
171+
th {
172+
width: 1%;
173+
white-space: nowrap;
174+
}
175+
176+
td,
177+
th {
178+
vertical-align: baseline;
179+
}
180+
181+
@media only screen and (max-width: $mobile) {
182+
@include mobile-friendly-table;
183+
}
184+
}
185+
164186
&--downloads {
165187
word-wrap: break-word;
166188
margin-top: $half-spacing-unit;

warehouse/static/sass/layout-helpers/_containers.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@
3434
padding: 0 $half-spacing-unit;
3535
}
3636
}
37+
38+
/*
39+
Reduce the size of the content to a single column:
40+
<div class="single-column"></div>
41+
*/
42+
43+
.single-column {
44+
max-width: $site-container / 2;
45+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
.float-left {
4+
float: left;
5+
}
6+
7+
.float-right {
8+
float: right;
9+
}
10+
11+
.clearfix {
12+
@include clearfix;
13+
}

warehouse/static/sass/warehouse.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
@import "layout-helpers/banner";
4343
@import "layout-helpers/columns";
4444
@import "layout-helpers/containers";
45+
@import "layout-helpers/floats";
4546
@import "layout-helpers/left-layout";
4647
@import "layout-helpers/split-layout";
4748
@import "layout-helpers/stick-to-top";

warehouse/templates/manage/organization/activate_subscription.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h2>{% trans %}Activate Subscription{% endtrans %}</h2>
88
<form method="post"
99
data-controller="organization-terms-of-service-accepted">
10-
<div class="form-group__wide">
10+
<div class="form-group form-group--wide">
1111
<p class="form-group__text">
1212
{% trans %}Company accounts require an active subscription. Please enter up-to-date billing information to enable the account.{% endtrans %}
1313
</p>
@@ -16,7 +16,7 @@ <h2>{% trans %}Activate Subscription{% endtrans %}</h2>
1616
type="hidden"
1717
value="{{ request.session.get_csrf_token() }}">
1818
{{ form_errors(form) }}
19-
<div class="form-group__wide">
19+
<div class="form-group form-group--wide">
2020
<label for="terms_of_service_agreement" class="form-group__label">
2121
{% trans %}Terms of Service{% endtrans %}
2222
<span class="form-group__required">{% trans %}(required){% endtrans %}</span>
@@ -36,7 +36,7 @@ <h2>{% trans %}Activate Subscription{% endtrans %}</h2>
3636
{% endif %}
3737
</div>
3838
</div>
39-
<div class="form-group__wide">
39+
<div class="form-group form-group--wide">
4040
<a href="{{ request.route_path('manage.organizations') }}"
4141
class="button">{% trans %}Cancel{% endtrans %}</a>
4242
<input value="{% trans %}Activate Subscription{% endtrans %}"

0 commit comments

Comments
 (0)