06/15 Phase 4 + 5 codes
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
</div>
|
||||
<button class="btn" type="submit">{{ _('Apply') }}</button>
|
||||
</form>
|
||||
{% set slot = "sidebar" %}{% include "ads/_slot.html" %}
|
||||
</aside>
|
||||
|
||||
<section class="results">
|
||||
@@ -41,6 +42,9 @@
|
||||
{% if not results %}<p class="muted">{{ _('No listings found.') }}</p>{% endif %}
|
||||
<div class="grid">
|
||||
{% for l, dist in results %}
|
||||
{% if loop.index % 6 == 0 %}
|
||||
{% set slot = "inline" %}{% include "ads/_slot.html" %}
|
||||
{% endif %}
|
||||
<a class="tile card" href="{{ url_for('listings.detail', listing_id=l.id) }}">
|
||||
{% if l.cover %}<img class="thumb" src="{{ url_for('listings.media', rel=l.cover.thumb_path) }}" alt="">
|
||||
{% else %}<div class="thumb noimg">{{ _('No photo') }}</div>{% endif %}
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
</div>
|
||||
{% if is_owner %}
|
||||
<a class="btn" href="{{ url_for('listings.edit', listing_id=listing.id) }}">{{ _('Edit') }}</a>
|
||||
<a class="btn ghost" href="{{ url_for('payments.boost_listing', listing_id=listing.id) }}">{{ _('⚡ Boost') }}</a>
|
||||
{% if listing.status.value == 'active' %}
|
||||
<form method="post" action="{{ url_for('listings.mark_sold', listing_id=listing.id) }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="btn ghost" type="submit">{{ _('Mark sold') }}</button>
|
||||
|
||||
@@ -66,11 +66,7 @@
|
||||
var groups = document.querySelectorAll('.attr-group');
|
||||
function sync(){
|
||||
groups.forEach(function(g){
|
||||
var visible = g.dataset.cat === sel.value;
|
||||
g.style.display = visible ? 'block' : 'none';
|
||||
g.querySelectorAll('input,select,textarea').forEach(function(el){
|
||||
el.disabled = !visible;
|
||||
});
|
||||
g.style.display = (g.dataset.cat === sel.value) ? 'block' : 'none';
|
||||
});
|
||||
}
|
||||
if (sel){ sel.addEventListener('change', sync); sync(); }
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
<span class="muted">{{ _('Active: %(a)s', a=active) }}{% if cap is not none %} / {{ cap }}{% else %} / ∞{% endif %}</span>
|
||||
<a class="btn" href="{{ url_for('listings.create') }}">{{ _('Post new') }}</a>
|
||||
</div>
|
||||
{% if cap is not none and active >= cap %}
|
||||
<div class="upgrade-prompt">
|
||||
{{ _("You've reached your plan's listing limit.") }}
|
||||
<a href="{{ url_for('payments.pricing') }}">{{ _('Upgrade for more') }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not items %}<p class="muted">{{ _('No listings yet.') }}</p>{% endif %}
|
||||
<table class="list">
|
||||
{% for l in items %}
|
||||
@@ -16,7 +22,10 @@
|
||||
<td>{{ l.price_display or '—' }}</td>
|
||||
<td><span class="badge {{ 'ok' if l.is_live else 'warn' }}">{{ l.status.value }}</span></td>
|
||||
<td>{{ l.view_count }} {{ _('views') }}</td>
|
||||
<td><a href="{{ url_for('listings.edit', listing_id=l.id) }}">{{ _('Edit') }}</a></td>
|
||||
<td>
|
||||
<a href="{{ url_for('listings.edit', listing_id=l.id) }}">{{ _('Edit') }}</a>
|
||||
· <a href="{{ url_for('payments.boost_listing', listing_id=l.id) }}">{{ _('Boost') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user