-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c84adf3
commit f35e258
Showing
8 changed files
with
449 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
adserver/templates/adserver/advertiser/advertisement-bulk-create-template.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Name,Live,Link URL,Image URL,Headline,Content,Call to Action | ||
Your Ad Name (required),"Whether to make your ad immediately live (required, true or false)",Your ad landing page URL (required),"Your ad image URL (required, the size must be 240*180px)",Ad headline (optional),"Ad content(required, the length of the headline, content and CTA combined must be 100 characters or less)",Ad CTA (optional) |
57 changes: 57 additions & 0 deletions
57
adserver/templates/adserver/advertiser/advertisement-bulk-create.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% extends "adserver/advertiser/overview.html" %} | ||
{% load i18n %} | ||
{% load static %} | ||
{% load humanize %} | ||
{% load crispy_forms_tags %} | ||
|
||
|
||
{% block title %}{% trans 'Bulk create ads' %}{% endblock %} | ||
|
||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li class="breadcrumb-item"><a href="{% url 'flight_list' advertiser.slug %}">{% trans 'Flights' %}</a></li> | ||
<li class="breadcrumb-item"><a href="{% url 'flight_detail' advertiser.slug flight.slug %}">{{ flight.name }}</a></li> | ||
<li class="breadcrumb-item active">{% trans 'Bulk create ads' %}</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block content_container %} | ||
|
||
<h1>{% block heading %}{% trans 'Bulk create ads' %}{% endblock heading %}</h1> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-md-8"> | ||
|
||
{% if not preview_ads %} | ||
{% url 'advertiser_bulk_create_template' as bulk_create_template_url %} | ||
<p class="mb-2">{% blocktrans %}Create multiple ads for your flight by uploading a CSV file. Download the <a href="{{ bulk_create_template_url }}">CSV template</a> and upload it with your ads.{% endblocktrans %}</p> | ||
|
||
<p class="mb-5">{% trans 'For tips on crafting high-performing ads across EthicalAds, see our <a target="_blank" href="https://www.ethicalads.io/downloads/ethicalads-creatives-that-convert.pdf">"creatives that convert" guide</a>.' %}</p> | ||
|
||
{% crispy form form.helper %} | ||
{% else %} | ||
{% url 'advertisement_bulk_create' advertiser flight as bulk_create_url %} | ||
<p class="mb-5">{% blocktrans %}Preview and save your ads or update your CSV and <a href="{{ advertisement_bulk_create }}">upload again</a>.{% endblocktrans %}</p> | ||
|
||
<div class="mb-2"> | ||
{% for advertisement in preview_ads %} | ||
<h5>{{ advertisement.name }}</h5> | ||
{% with ad_type=preview_ad_type %} | ||
{% include "adserver/includes/ad-preview.html" %} | ||
{% endwith %} | ||
{% endfor %} | ||
</div> | ||
|
||
<form method="post"> | ||
{% csrf_token %} | ||
<input type="hidden" name="signed_advertisements" value="{{ signed_advertisements }}"> | ||
<input type="submit" class="btn btn-primary" value="{% trans 'Save your uploaded ads' %}"> | ||
</form> | ||
{% endif %} | ||
</div> | ||
|
||
</div> | ||
|
||
{% endblock content_container %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Name,Live,Link URL,Image URL,Headline,Content,Call to Action | ||
Ad1,true,http://example.com/ad1,https://ethicalads.blob.core.windows.net/media/images/2022/11/ethicalads-housead.png,Ad headline,"Ad content",Ad CTA | ||
Ad2,true,http://example.com/ad2,https://ethicalads.blob.core.windows.net/media/images/2022/11/ethicalads-housead.png,Ad headline2,"Ad content2",Ad CTA2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.