98b9a5965218187f6ecf7140cb4229ba3fa6cdee
[acontent.git] / docs / themes / default / updater / myown_patches.tmpl.php
1 <?php\r
2 /************************************************************************/\r
3 /* AContent                                                             */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2010                                                   */\r
6 /* Inclusive Design Institute                                           */\r
7 /*                                                                      */\r
8 /* This program is free software. You can redistribute it and/or        */\r
9 /* modify it under the terms of the GNU General Public License          */\r
10 /* as published by the Free Software Foundation.                        */\r
11 /************************************************************************/\r
12 \r
13 global $_custom_css;\r
14 $_custom_css = TR_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
15 \r
16 require(TR_INCLUDE_PATH.'header.inc.php'); \r
17 ?>\r
18 \r
19 <div class="input-form">\r
20 <fieldset class="group_form"><legend class="group_form"><?php echo _AT("myown_updates"); ?></legend>\r
21 \r
22 <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
23 <table class="data" rules="rows" id="editable_table">\r
24 \r
25 <thead>\r
26 <tr>\r
27         <th scope="col">&nbsp;</th>\r
28         <th scope="col"><?php echo _AT('system_update_id'); ?></th>\r
29         <th scope="col"><?php echo _AT('transformable_version_to_apply'); ?></th>\r
30         <th scope="col"><?php echo _AT('description'); ?></th>\r
31         <th scope="col"><?php echo _AT('last_modified'); ?></th>\r
32 </tr>\r
33 </thead>\r
34 <?php if (!is_array($this->patch_rows)) { ?>\r
35 <tbody>\r
36         <tr>\r
37                 <td colspan="5"><?php echo _AT('none_found'); ?></td>\r
38         </tr>\r
39 </tbody>\r
40 <?php } else { ?>\r
41 <tfoot>\r
42 <tr>\r
43         <td colspan="5">\r
44                 <div class="row buttons">\r
45                 <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
46                 <input type="submit" name="remove" value="<?php echo _AT('remove'); ?>" /> \r
47                 </div>\r
48         </td>\r
49 </tr>\r
50 </tfoot>\r
51 <tbody>\r
52 <?php foreach ($this->patch_rows as $row) { ?>\r
53                 <tr onmousedown="document.form['m<?php echo $row['myown_patch_id']; ?>'].checked = true; trans.utility.rowselect(this);" onkeydown="document.form['m<?php echo $row['myown_patch_id']; ?>'].checked = true; trans.utility.rowselect(this);" id="r_<?php echo $row['myown_patch_id']; ?>">\r
54                         <td width="10"><input type="radio" name="myown_patch_id" value="<?php echo $row['myown_patch_id']; ?>" id="m<?php echo $row['myown_patch_id']; ?>" <?php if ($row['myown_patch_id']==$_POST['myown_patch_id']) echo 'checked'; ?> /></td>\r
55                         <td><label for="m<?php echo $row['myown_patch_id']; ?>"><span id="<?php echo 'system_patch_id-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['system_patch_id']; ?></span></label></td>\r
56                         <td><span id="<?php echo 'applied_version-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['applied_version']; ?></span></td>\r
57                         <td><span id="<?php echo 'description-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['description']; ?></span></td>\r
58                         <td><?php echo $row['last_modified']; ?></td>\r
59                 </tr>\r
60 <?php } // end of foreach ?>\r
61 </tbody>\r
62 <?php } // end of else ?>\r
63 \r
64 </table>\r
65 \r
66 </form>\r
67 \r
68 </fieldset>\r
69 </div>\r
70 \r
71 <script language="JavaScript" type="text/javascript">\r
72 //<!--\r
73 jQuery(document).ready(function () {\r
74         var tableEdit = fluid.inlineEdits("#editable_table", {\r
75                 selectors : {\r
76                         text : "span",\r
77                         editables : "td:has(span.inlineEdits)"\r
78                 },\r
79                 defaultViewText: "",\r
80                 useTooltip: true,\r
81                 listeners: {\r
82                         afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
83                                 if (newValue != oldValue)\r
84                                         rtn = jQuery.post("<?php echo TR_BASE_HREF; ?>updater/myown_patches_inline_editor_submit.php", \r
85                                           { "field":viewNode.id, "value":newValue }, \r
86                                   function(data) { handleAjaxResponse(data, viewNode, oldValue); }, \r
87                                   "json");\r
88                         }\r
89                 }\r
90         });\r
91 });\r
92 //-->\r
93 </script>\r
94 \r
95 <?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r