More core templates to core template dir
All checks were successful
Deploy to Server / deploy (push) Successful in 12s
All checks were successful
Deploy to Server / deploy (push) Successful in 12s
This commit is contained in:
parent
768e6f2111
commit
70298fdd1e
6 changed files with 61 additions and 44 deletions
108
templates/core/search_results.html
Normal file
108
templates/core/search_results.html
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Search Results for "{{ query }}"
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container" id="search-results-container">
|
||||
<h1 id="page-title">Search Results for "{{ query }}"</h1>
|
||||
{% if not results.organizations and not results.games and not results.campaigns and not results.drops and not results.benefits and not results.reward_campaigns and not results.badge_sets and not results.badges %}
|
||||
<p id="no-results">No results found.</p>
|
||||
{% else %}
|
||||
{% if results.organizations %}
|
||||
<h2 id="organizations-header">Organizations</h2>
|
||||
<ul id="organizations-list">
|
||||
{% for org in results.organizations %}
|
||||
<li id="org-{{ org.twitch_id }}">
|
||||
<a href="{% url 'twitch:organization_detail' org.twitch_id %}">{{ org.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.games %}
|
||||
<h2 id="games-header">Games</h2>
|
||||
<ul id="games-list">
|
||||
{% for game in results.games %}
|
||||
<li id="game-{{ game.twitch_id }}">
|
||||
<a href="{% url 'twitch:game_detail' game.twitch_id %}">{{ game.display_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.campaigns %}
|
||||
<h2 id="campaigns-header">Campaigns</h2>
|
||||
<ul id="campaigns-list">
|
||||
{% for campaign in results.campaigns %}
|
||||
<li id="campaign-{{ campaign.twitch_id }}">
|
||||
<a href="{% url 'twitch:campaign_detail' campaign.twitch_id %}">{{ campaign.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.drops %}
|
||||
<h2 id="drops-header">Drops</h2>
|
||||
<ul id="drops-list">
|
||||
{% for drop in results.drops %}
|
||||
<li id="drop-{{ drop.twitch_id }}">
|
||||
{% if drop.campaign and drop.campaign.twitch_id %}
|
||||
<a href="{% url 'twitch:campaign_detail' drop.campaign.twitch_id %}">{{ drop.name }}</a> (in {{ drop.campaign.name }})
|
||||
{% else %}
|
||||
{{ drop.name }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.benefits %}
|
||||
<h2 id="benefits-header">Benefits</h2>
|
||||
<ul id="benefits-list">
|
||||
{% for benefit in results.benefits %}
|
||||
<li id="benefit-{{ benefit.twitch_id }}">
|
||||
{% with first_drop=benefit.drops.first %}
|
||||
{% if first_drop and first_drop.campaign and first_drop.campaign.twitch_id %}
|
||||
<a href="{% url 'twitch:campaign_detail' first_drop.campaign.twitch_id %}">{{ benefit.name }}</a>
|
||||
{% else %}
|
||||
{{ benefit.name }}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.reward_campaigns %}
|
||||
<h2 id="reward-campaigns-header">Reward Campaigns</h2>
|
||||
<ul id="reward-campaigns-list">
|
||||
{% for campaign in results.reward_campaigns %}
|
||||
<li id="reward-campaign-{{ campaign.twitch_id }}">
|
||||
{% if campaign.brand %}
|
||||
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">{{ campaign.brand }}: {{ campaign.name }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">{{ campaign.name }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.badge_sets %}
|
||||
<h2 id="badge-sets-header">Badge Sets</h2>
|
||||
<ul id="badge-sets-list">
|
||||
{% for badge_set in results.badge_sets %}
|
||||
<li id="badge-set-{{ badge_set.set_id }}">
|
||||
<a href="{% url 'twitch:badge_set_detail' set_id=badge_set.set_id %}">{{ badge_set.set_id }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.badges %}
|
||||
<h2 id="badges-header">Chat Badges</h2>
|
||||
<ul id="badges-list">
|
||||
{% for badge in results.badges %}
|
||||
<li id="badge-{{ badge.badge_set.set_id }}-{{ badge.badge_id }}">
|
||||
<a href="{% url 'twitch:badge_set_detail' set_id=badge.badge_set.set_id %}">{{ badge.title }}</a>
|
||||
<small>({{ badge.badge_set.set_id }}/{{ badge.badge_id }})</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue