-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26110af
commit 9c6859a
Showing
8 changed files
with
154 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends parentLayout | default("_layouts/cp") %} | ||
|
||
{% set tabs = { | ||
logs: { label: "Logs" | t('craft-commerce-back-in-stock'), url: url('back-in-stock/logs') }, | ||
settings: { label: "Settings" | t('craft-commerce-back-in-stock'), url: url('settings/plugins/craft-commerce-back-in-stock') }, | ||
} %} | ||
|
||
{% if title is not defined %} | ||
{% set title = 'Back in Stock ' ~ tabs[selectedTab].label %} | ||
{% endif %} | ||
|
||
{% block content %} | ||
{% block blockContent %} | ||
|
||
{% endblock %} | ||
|
||
<div id="plugin-footer"> | ||
<div class="footer-left"> | ||
{% block footerButton %} | ||
|
||
{% endblock %} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{% extends 'craft-commerce-back-in-stock/layout' %} | ||
|
||
{% set crumbs = [ | ||
{ label: "Back in Stock" | t('craft-commerce-back-in-stock'), url: url('back-in-stock') }, | ||
{ label: "Logs" | t('craft-commerce-back-in-stock'), url: url('back-in-stock/logs') } | ||
] %} | ||
|
||
{% set selectedTab = 'logs' %} | ||
|
||
{% block blockContent %} | ||
<table id="logs" class="data fullwidth collapsible"> | ||
<thead> | ||
<tr> | ||
<th scope="col">{{ "Email" | t('craft-commerce-back-in-stock') }}</th> | ||
<th scope="col">{{ "Product/Variant" | t('craft-commerce-back-in-stock') }}</th> | ||
<th scope="col">{{ "Locale" | t('craft-commerce-back-in-stock') }}</th> | ||
<th scope="col">{{ "Notified" | t('craft-commerce-back-in-stock') }}</th> | ||
<th scope="col">{{ "Submitted" | t('craft-commerce-back-in-stock') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for entry in logEntries %} | ||
<tr> | ||
<td class="col-label" data-title="{{ 'Email' | t('craft-commerce-back-in-stock') }}"> | ||
<span class="">{{ entry.email }}</span> | ||
</td> | ||
|
||
<td class="col-label" data-title="{{ 'Product/Variant' | t('craft-commerce-back-in-stock') }}"> | ||
<a href="{{entry.getVariant.product.cpEditUrl}}" class="log-result">{{ entry.getVariant.product.title }}/{{entry.getVariant.title}}</a> | ||
</td> | ||
|
||
<td class="col-label" data-title="{{ 'Locale' | t('craft-commerce-back-in-stock') }}"> | ||
<span class="log-result">{{ entry.locale }}</span> | ||
</td> | ||
|
||
<td class="col-label" data-title="{{ 'Notified' | t('craft-commerce-back-in-stock') }}"> | ||
{{ entry.isNotified ? '<span class="status live"></span> Yes' : '<span class="status"></span> No' }} | ||
</td> | ||
|
||
<td data-title="{{ 'Submitted' | t('craft-commerce-back-in-stock') }}"> | ||
<code> | ||
{{ entry.dateCreated | date('short') ~ ' ' ~ entry.dateCreated | time('short') }} | ||
</code> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endblock %} | ||
|
||
{% block footer %} | ||
{% if logEntries|length %} | ||
{% include "_includes/pagination" %} | ||
{% endif %} | ||
{% endblock %} |