/frog/app/views/layout/edit.php

https://github.com/Doap/FrogCMS · PHP · 70 lines · 32 code · 5 blank · 33 comment · 1 complexity · caade28ba169af13e2e6ab2b2ab8b6cc MD5 · raw file

  1. <?php
  2. /**
  3. * Frog CMS - Content Management Simplified. <http://www.madebyfrog.com>
  4. * Copyright (C) 2008 Philippe Archambault <philippe.archambault@gmail.com>
  5. *
  6. * This file is part of Frog CMS.
  7. *
  8. * Frog CMS is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * Frog CMS is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with Frog CMS. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. * Frog CMS has made an exception to the GNU General Public License for plugins.
  22. * See exception.txt for details and the full text.
  23. */
  24. /**
  25. * @package frog
  26. * @subpackage views
  27. *
  28. * @author Philippe Archambault <philippe.archambault@gmail.com>
  29. * @version 0.1
  30. * @license http://www.gnu.org/licenses/gpl.html GPL License
  31. * @copyright Philippe Archambault, 2008
  32. */
  33. ?>
  34. <h1><?php echo __(ucfirst($action).' layout'); ?></h1>
  35. <form action="<?php echo $action=='edit' ? get_url('layout/edit/'. $layout->id): get_url('layout/add'); ; ?>" method="post">
  36. <div class="form-area">
  37. <p class="title">
  38. <label for="layout_name"><?php echo __('Name'); ?></label>
  39. <input class="textbox" id="layout_name" maxlength="100" name="layout[name]" size="100" type="text" value="<?php echo $layout->name; ?>" />
  40. </p>
  41. <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
  42. <tr>
  43. <td><label for="layout_content_type"><?php echo __('Content-Type'); ?></label></td>
  44. <td class="field"><input class="textbox" id="layout_content_type" maxlength="40" name="layout[content_type]" size="40" type="text" value="<?php echo $layout->content_type; ?>" /></td>
  45. </tr>
  46. </table>
  47. <p class="content">
  48. <label for="layout_content"><?php echo __('Body'); ?></label>
  49. <textarea class="textarea" cols="40" id="layout_content" name="layout[content]" rows="20" style="width: 100%" onkeydown="return allowTab(event, this);"><?php echo htmlentities($layout->content, ENT_COMPAT, 'UTF-8'); ?></textarea>
  50. </p>
  51. <?php if (isset($layout->updated_on)) { ?>
  52. <p style="clear: left"><small><?php echo __('Last updated by'); ?> <?php echo $layout->updated_by_name; ?> <?php echo __('on'); ?> <?php echo date('D, j M Y', strtotime($layout->updated_on)); ?></small></p>
  53. <?php } ?>
  54. </div>
  55. <p class="buttons">
  56. <input class="button" name="commit" type="submit" accesskey="s" value="<?php echo __('Save'); ?>" />
  57. <input class="button" name="continue" type="submit" accesskey="e" value="<?php echo __('Save and Continue Editing'); ?>" />
  58. <?php echo __('or'); ?> <a href="<?php echo get_url('layout'); ?>"><?php echo __('Cancel'); ?></a>
  59. </p>
  60. </form>
  61. <script type="text/javascript">
  62. // <![CDATA[
  63. document.getElementById('layout_name').focus();
  64. // ]]>
  65. </script>