Skip to content

Commit

Permalink
Address immediate sponsorship feedback (#2127)
Browse files Browse the repository at this point in the history
* Display all Packages/Years together in sponsor-list.

Fixes #2124

* Resolve #2125
  • Loading branch information
ewdurbin committed Aug 16, 2022
1 parent 96b28c9 commit 2c3c073
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sponsors/models/sponsorship.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class SponsorshipBenefit(OrderedModel):
package_only = models.BooleanField(
default=False,
verbose_name="Sponsor Package Only Benefit",
help_text="If a benefit is only available via a sponsorship package, select this option.",
help_text="If a benefit is only available via a sponsorship package and not as an add-on, select this option.",
)
new = models.BooleanField(
default=False,
Expand Down
5 changes: 3 additions & 2 deletions sponsors/templatetags/sponsors.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ def list_sponsors(logo_place, publisher=PublisherChoices.FOUNDATION.value):
if logo_place == LogoPlacementChoices.SPONSORS_PAGE.value:
sponsorships_by_package = OrderedDict()
for pkg in packages:
sponsorships_by_package[pkg] = {
sponsorships_by_package[pkg.slug] = {
"label": pkg.name,
"logo_dimension": str(pkg.logo_dimension),
"sponsorships": [
sp
for sp in sponsorships
if sp.package == pkg
if sp.package.slug == pkg.slug
]
}

Expand Down
6 changes: 3 additions & 3 deletions templates/sponsors/partials/sponsors-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ <h3 class="widget-title">Job Board Sponsors</h3>

{% for package, placement_info in sponsorships_by_package.items %}
{% if placement_info.sponsorships %}
<div title="{{ package.name }} Sponsors" align="center">
<div title="{{ package }} Sponsors" align="center">
{% with dimension=placement_info.logo_dimension %}

<h1 style="font-size: {% if forloop.first %}350%{% else %}300%{% endif %}">{{ package }} Sponsors</h1>
<h1 style="font-size: {% if forloop.first %}350%{% else %}300%{% endif %}">{{ placement_info.label }} Sponsors</h1>

<div style="display: grid; grid-gap: 2em; grid-template-columns: repeat(auto-fit, minmax({{ dimension }}px, 0fr)); grid-template-rows: repeat(1, minmax({{ dimension }}px, 0fr)); align-items: center; justify-content: center;">
{% for sponsorship in placement_info.sponsorships %}
<div id="{{ sponsorship.sponsor.slug }}">
<div id="{{ sponsorship.sponsor.slug }}" data-internal-year={{ sponsorship.year }}>
<div
data-ea-publisher="psf"
data-ea-type="psf-image-only"
Expand Down
2 changes: 1 addition & 1 deletion templates/sponsors/sponsorship_benefits_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h4 class="benefit-title">{{ benefit.name }}</h4>
data-initial-state="{% static 'img/sponsors/tick-placeholder.png' %}"
/>
<br/>
<small>Potential a la carte</small>
<small>Potential add-on</small>
{% endif %}
{% if benefit.has_tiers %}
<div><small>{% benefit_quantity_for_package benefit package %}</small></div>
Expand Down

0 comments on commit 2c3c073

Please sign in to comment.