PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/system/cms/modules/wysiwyg/views/image/index.php

https://bitbucket.org/viktorfabry/banditos
PHP | 120 lines | 120 code | 0 blank | 0 comment | 6 complexity | 3d08ae4b1757d770b0d01a55c3d5fdf3 MD5 | raw file
Possible License(s): CC-BY-3.0, BSD-3-Clause, MIT
  1. <div id="upload-box">
  2. <h2><?php echo lang('files:upload'); ?><span class="close ui-icon ui-icon-closethick"><?php echo lang('buttons.close'); ?></span></h2>
  3. <?php echo form_open_multipart('admin/wysiwyg/upload'); ?>
  4. <?php echo form_hidden('redirect_to', 'image'); ?>
  5. <ul>
  6. <li>
  7. <label for="name"><?php echo lang('files:name'); ?></label>
  8. <?php echo form_input('name', set_value('name'), 'id="name"'); ?>
  9. </li>
  10. <li>
  11. <label for="file">&nbsp;</label>
  12. <?php echo form_upload('userfile', 'id="file"'); ?>
  13. </li>
  14. <li>
  15. <label for="folder_id">&nbsp;</label>
  16. <?php echo form_dropdown('folder_id', array(0 => lang('files:select_folder')) + $folders_tree, 'id="folder"'); ?>
  17. </li>
  18. <li>
  19. <label for="description"><?php echo lang('files:description'); ?></label>
  20. <?php echo form_textarea('description', set_value('description'), 'id="description"'); ?>
  21. </li>
  22. <li>
  23. <?php echo form_submit('button_action', lang('buttons.save'), 'class="button"'); ?>
  24. <a href="<?php echo current_url(); ?>#" class="btn cancel"><?php echo lang('buttons.cancel'); ?></a>
  25. </li>
  26. </ul>
  27. <?php echo form_close(); ?>
  28. </div>
  29. <div id="files_browser">
  30. <div id="files_left_pane">
  31. <h3><?php echo lang('files:folders'); ?></h3>
  32. <ul id="files-nav">
  33. <?php foreach ($folders as $folder): ?>
  34. <?php if ( ! $folder->parent_id): ?>
  35. <li id="folder-id-<?php echo $folder->id; ?>" class="<?php echo $current_folder && $current_folder->id == $folder->id ? 'current' : ''; ?>">
  36. <?php echo anchor("admin/wysiwyg/image/index/{$folder->id}", $folder->name, 'title="'.$folder->slug.'"'); ?>
  37. </li>
  38. <?php endif; ?>
  39. <?php endforeach; ?>
  40. <?php if ($folders): ?>
  41. <li class="upload">
  42. <?php echo anchor("admin/wysiwyg/image/#upload", lang('files:upload'), 'title="upload"'); ?>
  43. </li>
  44. <?php endif; ?>
  45. </ul>
  46. </div>
  47. <div id="files_right_pane">
  48. <div id="files-wrapper">
  49. <?php if ($current_folder): ?>
  50. <h3><?php echo $current_folder->name; ?></h3>
  51. <!-- subfolders -->
  52. <div id="files_toolbar">
  53. <ul>
  54. <li>
  55. <label for="folder"><?php echo lang('files:subfolders'); ?>:</label>
  56. <?php echo form_dropdown('parent_id', $subfolders, $current_folder->id, 'id="parent_id" title="image"'); ?>
  57. </li>
  58. </ul>
  59. </div>
  60. <!-- image align -->
  61. <div id="radio-group">
  62. <label for="insert_float"><?php echo lang('wysiwyg.label.float'); ?></label>
  63. <div class="set">
  64. <input id="radio_left" type="radio" name="insert_float" value="left" />
  65. <label for="radio_left"><?php echo lang('wysiwyg.label.left'); ?></label>
  66. <input id="radio_right" type="radio" name="insert_float" value="right" />
  67. <label for="radio_right"><?php echo lang('wysiwyg.label.right'); ?></label>
  68. <input id="radio_none" type="radio" name="insert_float" value="none" checked="checked" />
  69. <label for="radio_none"><?php echo lang('wysiwyg.label.none'); ?></label>
  70. </div>
  71. </div>
  72. <!-- image size -->
  73. <div id="options-bar">
  74. <label for="insert_width"><?php echo lang('wysiwyg.label.insert_width'); ?></label>
  75. <input id="insert_width" data-name="<?php echo lang('wysiwyg.label.no_limit'); ?>" type="text" name="insert_width" value="0" />
  76. </div>
  77. <div id="slider"></div>
  78. <!-- folder contents -->
  79. <?php if ($current_folder->items): ?>
  80. <table class="table-list" border="0">
  81. <thead>
  82. <tr>
  83. <th><?php echo lang('files:type_i'); ?></th>
  84. <th><?php echo lang('files:name') . '/' . lang('files:description'); ?></th>
  85. <th><?php echo lang('files:filename') . '/' . lang('files:added'); ?></th>
  86. <th><?php echo lang('wysiwyg.meta.width'); ?></th>
  87. <th><?php echo lang('wysiwyg.meta.height'); ?></th>
  88. <th><?php echo lang('wysiwyg.meta.size'); ?></th>
  89. </tr>
  90. </thead>
  91. <tbody>
  92. <?php foreach ($current_folder->items as $image): ?>
  93. <tr class="<?php echo alternator('', 'alt'); ?>">
  94. <td class="image"><img class="pyro-image" src="<?php echo base_url($image->location === 'local' ? 'files/thumb/'.$image->id.'/50/50' : 'files/cloud_thumb/'.$image->id); ?>" alt="<?php echo $image->name; ?>" width="50" onclick="javascript:insertImage('<?php echo $image->id."', '".htmlentities($image->name)."', '".$image->location."', '".$image->path; ?>');" /></td>
  95. <td class="name-description">
  96. <p><?php echo $image->name; ?><p>
  97. <p><?php echo $image->description; ?></p>
  98. </td>
  99. <td class="filename">
  100. <p><?php echo $image->filename; ?></p>
  101. <p><?php echo format_date($image->date_added); ?></p>
  102. </td>
  103. <td class="meta width"><?php echo $image->width; ?></td>
  104. <td class="meta height"><?php echo $image->height; ?></td>
  105. <td class="meta size"><?php echo $image->filesize; ?></td>
  106. </tr>
  107. <?php endforeach; ?>
  108. </tbody>
  109. </table>
  110. <?php else: ?>
  111. <p><?php echo lang('files:no_files'); ?></p>
  112. <?php endif; ?>
  113. <?php else: ?>
  114. <div class="blank-slate file-folders">
  115. <h2><?php echo lang('files:no_folders_wysiwyg');?></h2>
  116. </div>
  117. <?php endif; ?>
  118. </div>
  119. </div>
  120. </div>