Skip to content

Commit

Permalink
Show calls to action when logged out too.
Browse files Browse the repository at this point in the history
The messages previously shown are more suited for the hosting service at
sayit.mysociety.org - this way, when you install the code yourself, you
are immediately given things to do.

Fixes #411.
  • Loading branch information
dracos committed Dec 13, 2014
1 parent 2c6df3c commit 64cfb57
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
14 changes: 7 additions & 7 deletions speeches/templates/speeches/_home.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ <h2>{% block instance_search_title %}{% trans 'Search speeches and statements' %
{% else %}

<div class="nothing-here-yet-message">
{% if request.is_user_instance %}
{% block nothing-here-yet %}
<h1>{% trans 'Brilliant!' %}</h1>
<p class="lead">{% trans 'Now you&rsquo;ve got your own public database for speeches and statements.' %}</p>
<p class="lead">{% trans 'However, it&rsquo;s totally empty. Let&rsquo;s get started by adding something.' %}</p>
<p><a href="{% url "speeches:speech-add" %}" class="button">{% trans 'Add your first statement' %}</a></p>
{% else %}
<h1>{% trans 'This is a brand new SayIt site.' %}</h1>
<p class="lead">{% trans 'Its creator hasn&rsquo;t yet added any speeches or statements for you to see.' %}</p>
<p><a href="http://sayit.mysociety.org" class="button">{% trans 'Learn more about SayIt' %}</a></p>
{% endif %}
<p>
<a href="{% url "speeches:speech-add" %}" class="button">{% trans 'Add your first statement' %}</a>
<a href="{% url "speeches:speaker-add" %}" class="button">{% trans 'Add your first speaker' %}</a>
<a href="{% url 'speeches:import-popolo' %}" class="button">{% trans "Import speakers" %}</a>
</p>
{% endblock %}
</div>

{% endif %}
Expand Down
14 changes: 6 additions & 8 deletions speeches/templates/speeches/parentless_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@

{% block content %}

{% if section_list or speech_list %}

{% if section_list or speech_list or request.is_user_instance %}
<div class="page-header">
{% if request.is_user_instance %}
<a href="{% url "speeches:speech-add" %}" class="button small right">{% trans "Add a new speech" %}</a>
<a href="{% url "speeches:section-add" %}" class="button secondary small right">{% trans "Add a section" %}</a>
{% endif %}
<h1>{% trans "Speeches" %}</h1>
</div>
{% endif %}

{% if section_list or speech_list %}

{% if section_list %}
<ul class="unstyled">
Expand Down Expand Up @@ -53,15 +55,11 @@ <h2>{% trans 'Speeches not in a section' %}</h2>
{% else %}

<div class="nothing-here-yet-message">
{% if request.is_user_instance %}
{% block nothing-here-yet %}
<h1>{% trans 'You haven&rsquo;t added any speeches or statements yet' %}</h1>
<p class="lead">{% trans 'Once you have, you&rsquo;ll be able to browse speeches and organise them into sections here.' %}</p>
<p><a href="{% url "speeches:speech-add" %}" class="button">{% trans 'Add your first statement' %}</a></p>
{% else %}
<h1>{% trans 'This is a brand new SayIt site.' %}</h1>
<p class="lead">{% trans 'Its creator hasn&rsquo;t yet added any speeches or statements for you to see.' %}</p>
<p><a href="http://sayit.mysociety.org" class="button">{% trans 'Learn more about SayIt' %}</a></p>
{% endif %}
{% endblock %}
</div>

{% endif %}
Expand Down
15 changes: 6 additions & 9 deletions speeches/templates/speeches/speaker_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block content %}


{% if speaker_list or request.is_user_instance %}
<div class="page-header">
{% if request.is_user_instance %}
<a href="{% url "speeches:speaker-add" %}" class="button small right">{% trans "Add a new speaker" %}</a>
Expand All @@ -18,6 +18,7 @@
<h1>{% trans "All Speakers" %}</h1>
{% endif %}
</div>
{% endif %}

{% if speaker_list %}

Expand All @@ -40,19 +41,15 @@ <h1>{% trans "All Speakers" %}</h1>
{% else %}

<div class="nothing-here-yet-message">
{% if request.is_user_instance %}
{% block nothing-here-yet %}
<h1>{% trans 'You haven&rsquo;t added any speeches or statements yet' %}</h1>
<p class="lead">{% trans 'Once you have, this page will contain a list of all the different people who made each statement in this SayIt site.' %}</p>
<p>
<a href="{% url "speeches:speech-add" %}" class="button">{% trans 'Add your first statement' %}</a>
<a href="{% url "speeches:speaker-add" %}" class="button">{% trans 'Add your first speaker' %}</a>
<a href="{% url "speeches:import-popolo" %}" class="button">{% trans "Import speakers" %}</a>
<a href="{% url "speeches:speech-add" %}" class="button secondary">{% trans 'Add your first statement' %}</a>
</p>

{% else %}
<h1>{% trans 'This is a brand new SayIt site.' %}</h1>
<p class="lead">{% trans 'Its creator hasn&rsquo;t yet added any speeches or statements for you to see.' %}</p>
<p><a href="http://sayit.mysociety.org" class="button">{% trans 'Learn more about SayIt' %}</a></p>
{% endif %}
{% endblock %}
</div>

{% endif %}
Expand Down

0 comments on commit 64cfb57

Please sign in to comment.