PageRenderTime 59ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/admin/view/template/module/blog_list_blogs.tpl

https://bitbucket.org/vsepessarii/vsepessarii
Smarty Template | 125 lines | 102 code | 23 blank | 0 comment | 15 complexity | eb02172c65642ada19af8e7411946171 MD5 | raw file
Possible License(s): LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. <?php
  2. foreach ($mylist as $list_num=>$list) { ?>
  3. <div id="list<?php echo $list_num;?>" style="padding-left: 200px;">
  4. <input type="hidden" name="mylist[<?php echo $list_num; ?>][type]" value="<?php if (isset($list['type'])) echo $list['type']; else echo 'blogs'; ?>">
  5. <table>
  6. <tr>
  7. <td colspan="2">
  8. <div class="buttons">
  9. <a onclick="mylist_num--; $('#amytabs<?php echo $list_num;?>').remove(); $('#mytabs<?php echo $list_num;?>').remove(); $('#mytabs a').tabs(); return false; " class="mbuttonr"><?php echo $this->language->get('button_remove'); ?></a>
  10. <a onclick="
  11. mylist_num++;
  12. type_what = '<?php echo $list['type']; ?>';
  13. $.ajax({
  14. url: 'index.php?route=module/blog/ajax_list&token=<?php echo $token; ?>',
  15. type: 'post',
  16. data: { type: type_what, list: '<?php echo base64_encode($slist); ?>', num: mylist_num },
  17. dataType: 'html',
  18. beforeSend: function()
  19. {
  20. },
  21. success: function(html) {
  22. if (html) {
  23. $('#mytabs').append('<a href=\'#mytabs' + mylist_num + '\' id=\'amytabs'+mylist_num+'\'>List-' + mylist_num + '<\/a>');
  24. $('#lists').append('<div id=\'mytabs'+mylist_num+'\'>'+html+'<\/div>');
  25. $('#mytabs a').tabs();
  26. $('#amytabs' + mylist_num).click();
  27. template_auto();
  28. }
  29. $('.mbutton').removeClss();
  30. }
  31. });
  32. return false; " class="mbutton"><?php echo $this->language->get('button_clone_widget'); ?>: <?php echo $this->language->get('text_widget_'.$list['type']); ?></a>
  33. </div>
  34. </td>
  35. </tr> <?php foreach ($languages as $language) { ?>
  36. <tr>
  37. <td>
  38. <?php echo $this->language->get('entry_title_list_latest'); ?> (<?php echo ($language['name']); ?>)
  39. </td>
  40. <td>
  41. <input type="text" name="mylist[<?php echo $list_num; ?>][title_list_latest][<?php echo $language['language_id']; ?>]" value="<?php if (isset($list['title_list_latest'][$language['language_id']])) echo $list['title_list_latest'][$language['language_id']]; ?>" size="60" /><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" />
  42. </td>
  43. </tr>
  44. <?php } ?>
  45. <tr>
  46. <td class="left"><?php echo $entry_avatar_dim; ?></td>
  47. <td class="left">
  48. <input type="text" name="mylist[<?php echo $list_num; ?>][avatar][width]" value="<?php if (isset($list['avatar']['width'])) echo $list['avatar']['width']; ?>" size="3" />x
  49. <input type="text" name="mylist[<?php echo $list_num; ?>][avatar][height]" value="<?php if (isset($list['avatar']['height'])) echo $list['avatar']['height']; ?>" size="3" />
  50. </td>
  51. </tr>
  52. <tr>
  53. <td>
  54. <?php echo $this->language->get('entry_template'); ?>
  55. </td>
  56. <td>
  57. <input type="text" class="template" name="mylist[<?php echo $list_num; ?>][template]" value="<?php if (isset($list['template'])) echo $list['template']; ?>" size="60" />
  58. <input type="hidden" name="tpath" value="widgets/blogs">
  59. </td>
  60. </tr>
  61. <tr>
  62. <td class="left"><?php echo $this->language->get('entry_anchor'); ?></td>
  63. <td class="left">
  64. <input type="text" name="mylist[<?php echo $list_num; ?>][anchor]" value="<?php if (isset($list['anchor'])) echo $list['anchor']; ?>" size="30" />
  65. </td>
  66. </tr>
  67. <tr>
  68. <td><?php echo $this->language->get('entry_widget_cached'); ?></td>
  69. <td><select name="mylist[<?php echo $list_num; ?>][cached]">
  70. <?php if (isset($list['cached']) && $list['cached']) { ?>
  71. <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
  72. <option value="0"><?php echo $text_disabled; ?></option>
  73. <?php } else { ?>
  74. <option value="1"><?php echo $text_enabled; ?></option>
  75. <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
  76. <?php } ?>
  77. </select></td>
  78. </tr>
  79. <tr>
  80. <td><?php echo $this->language->get('entry_blog'); ?></td>
  81. <td><div class="scrollbox">
  82. <?php $class = 'odd'; ?>
  83. <?php foreach ($categories as $blog) { ?>
  84. <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
  85. <div class="<?php echo $class; ?>">
  86. <?php if (isset($list['blogs']) && in_array($blog['blog_id'], $list['blogs'])) { ?>
  87. <input type="checkbox" name="mylist[<?php echo $list_num; ?>][blogs][]" value="<?php echo $blog['blog_id']; ?>" checked="checked" />
  88. <?php echo $blog['name']; ?>
  89. <?php } else { ?>
  90. <input type="checkbox" name="mylist[<?php echo $list_num; ?>][blogs][]" value="<?php echo $blog['blog_id']; ?>" />
  91. <?php echo $blog['name']; ?>
  92. <?php } ?>
  93. </div>
  94. <?php } ?>
  95. </div>
  96. <a onclick="$(this).parent().find(':checkbox').attr('checked', true);"><?php echo $this->language->get('text_select_all'); ?></a> / <a onclick="$(this).parent().find(':checkbox').attr('checked', false);"><?php echo $this->language->get('text_unselect_all'); ?></a></td>
  97. </tr>
  98. </table>
  99. </div>
  100. <?php }
  101. //echo $this->request->post['list']."<br>";
  102. ?>