Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint fixes #2700

Merged
merged 2 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions app/kudos/templates/kudos_details.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load i18n static %}
{% load kudos_extras %}
{% load i18n static kudos_extras avatar_tags%}
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -24,7 +23,7 @@
</header>

<div class="container py-5">
<a href="/kudos/marketplace">&lt; {% trans "Kudos Marketplace" %}</a>
<a href="{% url 'kudos_marketplace' %}">&lt; {% trans "Kudos Marketplace" %}</a>
</div>

<section class="container my-5 pb-5">
Expand Down Expand Up @@ -79,7 +78,7 @@ <h3 id="kudosName" class="kudos-details__title">{{ kudos.name|humanize_name }} {
<div class="row justify-content-start pb-4">
<div class="col-12">
{% if kudos.num_clones_allowed != 0 and kudos.num_clones_available_counting_indirect_send != 0 %}
<a href="/kudos/send?id={{ kudos.id}}" class="btn btn-gc-blue">{% trans "Send Kudos" %}</a>
<a href="{% url 'kudos_send' %}?id={{ kudos.id}}" class="btn btn-gc-blue">{% trans "Send Kudos" %}</a>
{% elif kudos.num_clones_allowed != 0 and kudos.num_clones_available_counting_indirect_send == 0 %}
<button type="button" class="btn btn-gc-blue" disabled>{% trans "Not Available" %}</button>
<small class="d-block mt-2">{% trans "There are no clones available due to popularity but you can still look at this awesome badge!" %}</small>
Expand All @@ -101,8 +100,8 @@ <h3 id="kudosName" class="kudos-details__title">{{ kudos.name|humanize_name }} {
<div class="row">
<div class="col-12">
{% for handle in related_handles %}
<a href="/profile/{{ handle }}" title="{{handle}}">
<img src="/dynamic/avatar/{{handle}}" alts="{{handle}}" width="70" class="rounded-circle border m-1">
<a href="{% url 'profile' handle %}" title="{{handle}}">
<img src="{% avatar_url handle %}" alts="{{handle}}" width="70" class="rounded-circle border m-1">
</a>
{% if forloop.counter|divisibleby:5 %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/kudos/templates/shared/kudos_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% load i18n staticfiles %}
{% load kudos_extras matches %}
<div class="kd-card {% if listing.num_clones_available == 0 %}ghost{% endif %}">
<a href="/kudos/{{ listing.id }}/{{ listing.name }}" class="{% if 'cellarius' in listing.tags %}cellarius-partner{% endif %}">
<a href="{% url 'kudos_details' listing.id listing.name %}" class="{% if 'cellarius' in listing.tags %}cellarius-partner{% endif %}">
<img id="kudosImage" src="{% static listing.image %}" alt="{{ listing.name }}" class="img-thumbnail kd-shadow border-transparent" width="250">
</a>
<span class="kd-price">{{ listing.price_in_eth }} ETH</span>
Expand Down
1 change: 0 additions & 1 deletion app/kudos/templates/shared/kudos_card_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<div class="flip-card__stack-img">
{% if kudos_group.list|length > 5 %}<b>+{{kudos_group.list|length|add:"-5"}}</b>{% endif %}
{% for kt in kudos_group.list|slice:":5" %}

<img src="{% avatar_url kudos_group.list.0.from_username %}" alt="{{ kudos_group.list.0.from_username }}" class="rounded-circle" width="30" height="30">
{% endfor %}
</div>
Expand Down
21 changes: 8 additions & 13 deletions app/kudos/templates/shared/kudos_searchbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load i18n kudos_extras %}
<form action="{% url "kudos_marketplace" %}" method="get">
<form action="{% url 'kudos_marketplace' %}" method="get">
<div class="form-row align-items-center justify-content-center">
<div class="col-12 col-sm-6 my-4 ">
<div class="input-group">

<input type="text" list="kudos-suggestions" class="form-control form-control-lg" name="q" id="kudos-search" placeholder="{% trans "Search for Kudos" %}">
<datalist id="kudos-suggestions">
<!-- {% for listing in listings %}
{% for tag in listing.tags.split %}
<option>{{tag }}</option>
{% endfor %}
{% endfor %} -->
<option>rare</option>
<option>common</option>
<option>ninja</option>
Expand All @@ -39,20 +34,20 @@
<option>graphs</option>
<option>ideas</option>
<option>clean code</option>
<option>cellarius</option>
</datalist>
<div class="input-group-append">

<a href="/kudos/marketplace" class="btn btn-dark btn-lg clear-search hidden"><i class="fas fa-times"></i></a>
<a href="{% url 'kudos_marketplace' %}" class="btn btn-dark btn-lg clear-search hidden"><i class="fas fa-times"></i></a>
<button type="submit" class="btn btn-gc-blue">{% trans "Search" %}</button>
</div>
</div>
<div class="mt-3 white">
<span class="white">Search suggestions:</span>
<a href="{% url "kudos_marketplace" %}?q=rare">rare</a> -
<a href="{% url "kudos_marketplace" %}?q=common">common</a> -
<a href="{% url "kudos_marketplace" %}?q=ninja">ninja</a> -
<a href="{% url "kudos_marketplace" %}?q=soft skills">soft skills</a> -
<a href="{% url "kudos_marketplace" %}?q=programming">programming</a>
<a href="{% url 'kudos_marketplace' %}?q=rare">rare</a> -
<a href="{% url 'kudos_marketplace' %}?q=common">common</a> -
<a href="{% url 'kudos_marketplace' %}?q=ninja">ninja</a> -
<a href="{% url 'kudos_marketplace' %}?q=soft skills">soft skills</a> -
<a href="{% url 'kudos_marketplace' %}?q=programming">programming</a>
</div>
</div>
</div>
Expand Down