Permalink
Browse files

for 5.1.

  • Loading branch information...
1 parent 7824c32 commit a74f5132d8abbe637964ca6f446add49c9ad2d1d @koikikukan committed Apr 24, 2011
@@ -1,11 +1,19 @@
+# AssetExporter
+#
+# Release 0.01 (Aug 03, 2010)
+# Release 0.02 (Aug 19, 2010) add support same filename.
+# Release 0.10 (Apr 17, 2011) for 5.1.
+#
+# Copyright (c) 2004-2011 Yujiro Araki
+
id: PageExporter
name: PageExporter
author_link: http://www.koikikukan.com/
author_name: Yujiro Araki
plugin_link: http://www.koikikukan.com/archives/2010/02/09-015555.php
doc_link: http://www.koikikukan.com/archives/2010/02/09-015555.php
description: <__trans phrase="Exporter and Importer for pages.">
-version: 0.02
+version: 0.10
l10n_lexicon:
ja:
Exporter and Importer for pages.: ウェブページのエクスポータとインポータを提供するためのテーマフレームワーク拡張
@@ -6,6 +6,7 @@ use MT::Page;
sub condition {
my ( $blog ) = @_;
+
my $page = MT->model('page')->load({ blog_id => $blog->id }, { limit => 1 });
return defined $page ? 1 : 0;
}
@@ -32,8 +33,14 @@ sub template {
}
my %param = ( pages => \@list );
+ my $template_file;
+ if (MT->version_number < 5.1) {
+ $template_file = 'export_page_50.tmpl';
+ } else {
+ $template_file = 'export_page.tmpl';
+ }
my $plugin = MT->component('PageExporter');
- return $plugin->load_tmpl('export_page.tmpl', \%param);
+ return $plugin->load_tmpl($template_file, \%param);
}
sub export {
@@ -1,22 +1,38 @@
<mtapp:listing id="pages" loop="pages" hide_pager="1" show_actions="0" type="pages">
- <mt:if __first__>
- <thead>
- <tr>
- <th class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th>
- <th class="field-name primary-col"><__trans phrase="Name"></th>
- </tr>
- </thead>
- <tbody>
- </mt:if>
- <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>">
- <td class="cb">
- <input type="checkbox" name="plugin_default_pages_export_ids" class="select" value="<mt:var name="page_id">" <mt:if checked>checked="checked" </mt:if>/>
- </td>
- <td class="field-name"><mt:var name="page_title" escape="html"></td>
- </tr>
- <mt:if __last__>
- </tbody>
- </mt:if>
+<mt:if name="__first__">
+
+<mt:setvarblock name="table_header">
+ <tr>
+ <th class="col head cb"><span class="col-label"><input type="checkbox" name="id-head" value="all" class="select" /></span></th>
+ <th class="col head field-name primary"><span class="col-label"><__trans phrase="Name"></span></th>
+ </tr>
+</mt:setvarblock>
+
+ <thead>
+ <mt:var name="table_header">
+ </thead>
+ <tfoot>
+ <mt:var name="table_header">
+ </tfoot>
+ <tbody>
+</mt:if>
+ <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>">
+ <td class="col cb">
+ <input
+ type="checkbox"
+ name="plugin_default_pages_export_ids"
+ class="select"
+ value="<mt:var name="page_id">"
+ <mt:if checked>checked="checked" </mt:if>
+ />
+ </td>
+ <td class="col field-name">
+ <mt:var name="page_title" escape="html">
+ </td>
+ </tr>
+<mt:if name="__last__">
+ </tbody>
+</mt:if>
</mtapp:listing>
<script type="text/javascript">
jQuery.mtCheckbox();
@@ -0,0 +1,23 @@
+<mtapp:listing id="pages" loop="pages" hide_pager="1" show_actions="0" type="pages">
+ <mt:if __first__>
+ <thead>
+ <tr>
+ <th class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th>
+ <th class="field-name primary-col"><__trans phrase="Name"></th>
+ </tr>
+ </thead>
+ <tbody>
+ </mt:if>
+ <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>">
+ <td class="cb">
+ <input type="checkbox" name="plugin_default_pages_export_ids" class="select" value="<mt:var name="page_id">" <mt:if checked>checked="checked" </mt:if>/>
+ </td>
+ <td class="field-name"><mt:var name="page_title" escape="html"></td>
+ </tr>
+ <mt:if __last__>
+ </tbody>
+ </mt:if>
+</mtapp:listing>
+<script type="text/javascript">
+jQuery.mtCheckbox();
+</script>

0 comments on commit a74f513

Please sign in to comment.