7

Removed unused templates

Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com>
This commit is contained in:
Jasper Berghoef
2016-12-06 11:58:17 +01:00
parent 1d227c28c6
commit 7f6c759c2a
6 changed files with 1 additions and 162 deletions

View File

@ -6,8 +6,6 @@ from personalisation import views
app_name = 'segment' app_name = 'segment'
urlpatterns = [ urlpatterns = [
url(r'^segment/(\d+)/$', views.overview,
name='overview'),
url(r'^segment/(?P<segment_id>[0-9]+)/enable/$', views.enable, url(r'^segment/(?P<segment_id>[0-9]+)/enable/$', views.enable,
name='enable'), name='enable'),
url(r'^segment/(?P<segment_id>[0-9]+)/disable/$', views.disable, url(r'^segment/(?P<segment_id>[0-9]+)/disable/$', views.disable,

View File

@ -1,75 +0,0 @@
{% extends "modeladmin/create.html" %}
{% load i18n %}
{% block content %}
{% block header %}
{% include "wagtailadmin/shared/header.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon tabbed=1 merged=1 %}
{% endblock %}
<form action="{% block form_action %}{{ view.create_url }}{% endblock %}" {% if is_multipart %} enctype="multipart/form-data"
{% endif %} method="POST" novalidate>
{% csrf_token %}
{% block form %}
{{ edit_handler.render_form_content }}
<li class="object">
<h2>
<label for="id_rules">Rules</label>
</h2>
<fieldset class="">
<legend>Rules</legend>
<p>Create a set of rules to segment the users with</p>
<ul class="block_container">
<li class="block">
<h2>Time</h2>
<p>Choose a time segment in which the user visits the site.</p>
</li>
<li class="block disabled">
<h2>Page visits</h2>
<p>Choose a (set of) page(s) the user has to have seen to trigger this rule.</p>
</li>
<li class="block">
<h2>Visit count</h2>
<p>Choose the number of visits the user has to have made.</p>
</li>
<li class="block">
<h2>Referrer</h2>
<p>Define a referring page, domain or query the user has to come from.</p>
</li>
<li class="block disabled">
<h2>Device</h2>
<p>Choose a specific set of devices a user has to own before triggering this rule.</p>
</li>
<li class="block disabled">
<h2>Geolocation</h2>
<p>Pick an area the user has to be in to trigger this rule.</p>
</li>
</ul>
<div class="clearfix"></div>
<h2>Your chosen rules</h2>
</fieldset>
</li>
{% endblock %}
{% block footer %}
<footer>
<ul>
<li class="actions">
{% block form_actions %}
<div class="dropdown dropup dropdown-button match-width">
<button type="submit" class="button action-save button-longrunning" tabindex="3" data-clicked-text="{% trans 'Saving...' %}">
<span class="icon icon-spinner"></span><em>{% trans 'Save' %}</em>
</button>
</div>
{% endblock %}
</li>
</ul>
</footer>
{% endblock %}
</form>
{% endblock %}

View File

@ -27,7 +27,7 @@
<ul class="inspect segment_stats"> <ul class="inspect segment_stats">
<li class="visit_stat"> <li class="visit_stat">
<span>{{ segment.visit_count|localize }}</span> <span>{{ segment.visit_count|localize }}</span>
{% trans "Visitors are part of this segment" %} {% trans "Visits are part of this segment" %}
</li> </li>
<li class="days_stat"> <li class="days_stat">
<span>{{ segment.enable_date|days_since:segment.disable_date }}</span> <span>{{ segment.enable_date|days_since:segment.disable_date }}</span>

View File

@ -1,71 +0,0 @@
{% extends "wagtailadmin/generic/index.html" %}
{% load wagtailadmin_tags %}
{% load i18n %}
{% block titletag %}{% blocktrans with page_type=content_type.model_class.get_verbose_name %}New {{ page_type }}{% endblocktrans %}{% endblock %}
{% block bodyclass %}page-editor create-model-{{ content_type.model }}{% endblock %}
{% block content %}
<header class="merged tab-merged nice-padding">
{% include "wagtailadmin/shared/breadcrumb.html" with page=parent_page include_self=1 %}
<div class="row row-flush">
<div class="left col9">
<h1 class="icon icon-doc-empty-inverse">{% trans 'Add new variation for' %} <span>{{ content_type.model_class.get_verbose_name }}: {{ page.title }}</span> with segment <span>{{ segment }}</span></h1>
</div>
</div>
</header>
<form id="page-edit-form" action="{% url 'segment:add' page.pk segment.pk %}" method="POST"{% if form.is_multipart %} enctype="multipart/form-data" {% endif %}>
{% csrf_token %}
{{ edit_handler.render_form_content }}
{% page_permissions parent_page as parent_page_perms %}
<footer>
<ul>
<li class="actions">
<div class="dropdown dropup dropdown-button match-width">
<button type="submit" class="button action-save button-longrunning" tabindex="3" data-clicked-text="{% trans 'Saving...' %}"><span class="icon icon-spinner"></span><em>{% trans 'Save draft' %}</em></button>
<div class="dropdown-toggle icon icon-arrow-up"></div>
<ul role="menu">
{% if parent_page_perms.can_publish_subpage %}
<li>
<button type="submit" name="action-publish" value="action-publish" class="button button-longrunning" tabindex="3" data-clicked-text="{% trans 'Publishing...' %}" {% if page.locked %}disabled {% endif %}><span class="icon icon-spinner"></span><em>{% trans 'Publish' %}</em></button>
</li>
{% endif %}
<li><input type="submit" name="action-submit" value="{% trans 'Submit for moderation' %}" class="button" /></li>
</ul>
</div>
</li>
</ul>
</footer>
</form>
{% endblock %}
{% block extra_css %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_css.html" %}
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
<script>
$(function(){
$('#page-edit-form .tab-content section.active input').first().focus();
/* Make user confirm before leaving the editor if there are unsaved changes */
{% trans "This page has unsaved changes." as confirmation_message %}
enableDirtyFormCheck(
'#page-edit-form',
{
confirmationMessage: '{{ confirmation_message|escapejs }}',
{% if has_unsaved_changes %}
alwaysDirty: true,
{% endif %}
}
);
});
</script>
{% endblock %}

View File

@ -1,8 +0,0 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n staticfiles %}
{% block titletag %}{% trans "Segments" %}{% endblock %}
{% block content %}
<h1>Our segment page</h1>
{% endblock %}

View File

@ -9,11 +9,6 @@ from personalisation.forms import SegmentForm
from personalisation.models import Segment from personalisation.models import Segment
def overview(request):
"""Display segments overview. Dummy function"""
return render(request, 'wagtailadmin/segment.html')
def enable(request, segment_id): def enable(request, segment_id):
"""Enable the selected segment""" """Enable the selected segment"""
segment = get_object_or_404(Segment, pk=segment_id) segment = get_object_or_404(Segment, pk=segment_id)