Skip to content

Commit

Permalink
Bugfix. Add blog plugin work now.
Browse files Browse the repository at this point in the history
  • Loading branch information
uzulla committed Aug 8, 2021
1 parent aed5690 commit 2262b8d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
15 changes: 13 additions & 2 deletions app/twig_templates/admin/blog_plugins/plugin_search.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,21 @@
<td>{{ t(plugin.title, 20) }}</td>
<td>{{ plugin.body|nl2br }}</td>
<td class="center">
<a href="{{ url(req, 'blog_plugins', 'download', {id: plugin.id, category: plugin_category_type_id, sig: sig}) }}">{{ _('Download') }}</a>
<form action="{{ url(req, 'blog_plugins', 'download') }}" method="post">
<input type="hidden" name="id" value="{{ plugin.id }}">
<input type="hidden" name="category" value="{{ plugin_category_type_id }}">
<input type="hidden" name="sig" value="{{ sig }}">
<button>{{ _('Download') }}</button>
</form>
</td>
<td class="center">
<a href="{{ url(req, 'Entries', 'preview', {blog_id: blog.id, plugin_id: plugin.id, category: plugin_category_type_id, device_key: 1}, false, true, false) }}" target="_blank">{{ _('Preview') }}</a>
<form action="{{ url(req, 'Entries', 'preview', {}, false, true, false) }}" method="post" target="_blank">
<input type="hidden" name="blog_id" value="{{ blog.id }}">
<input type="hidden" name="plugin_id" value="{{ plugin.id }}">
<input type="hidden" name="category" value="{{ plugin_category_type_id }}">
<input type="hidden" name="device_key" value="1">
<button>{{ _('Preview') }}</button>
</form>
</td>
{% if not is_official %}
<td class="center">
Expand Down
15 changes: 13 additions & 2 deletions app/twig_templates/admin/blog_plugins/plugin_search_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@
<h4>{{ t(plugin.title, 20) }}</h4>
<p>{{ t(plugin.body, 20) }}</p>
<div class="parallel_btn">
<a class="btn_contents touch" href="{{ url(req, 'blog_plugins', 'download', {id: plugin.id, category: plugin_category_type_id, sig: sig}) }}">{{ _('Add') }}</a>
<a class="btn_contents touch" href="{{ url(req, 'Entries', 'preview', {blog_id: blog.id, plugin_id: plugin.id, category: plugin_category_type_id, device_key: 1}, false, true) }}" target="_blank">{{ _('Preview') }}</a>
<form action="{{ url(req, 'blog_plugins', 'download') }}" method="post" style="display: inline">
<input type="hidden" name="id" value="{{ plugin.id }}">
<input type="hidden" name="category" value="{{ plugin_category_type_id }}">
<input type="hidden" name="sig" value="{{ sig }}">
<button class="btn_contents touch">{{ _('Add') }}</button>
</form>
<form action="{{ url(req, 'Entries', 'preview', {}, false, true, false) }}" method="post" target="_blank" style="display: inline">
<input type="hidden" name="blog_id" value="{{ blog.id }}">
<input type="hidden" name="plugin_id" value="{{ plugin.id }}">
<input type="hidden" name="category" value="{{ plugin_category_type_id }}">
<input type="hidden" name="device_key" value="1">
<button class="btn_contents touch">{{ _('Preview') }}</button>
</form>
</div>
</li>
{% endfor %}
Expand Down

0 comments on commit 2262b8d

Please sign in to comment.