Index: trunk/extensions/Collection/Collection.templates.php |
— | — | @@ -232,18 +232,18 @@ |
233 | 233 | <?php |
234 | 234 | foreach($this->data['collection']['items'] as $index => $item) { |
235 | 235 | if ($item['type'] == 'article') { ?> |
236 | | - <li id="item-<?php echo $index ?>" class="article"> |
237 | | - <a onclick="return coll_remove_item(<?php echo $index ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'remove_item/', 'index=' . $index)) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a><a> |
| 236 | + <li id="item-<?php echo intval( $index ) ?>" class="article"> |
| 237 | + <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'remove_item/', 'index=' . $index)) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a><a> |
238 | 238 | <noscript> |
239 | 239 | <?php if ($index == 0) { ?> |
240 | 240 | <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" /> |
241 | 241 | <?php } else { ?> |
242 | | - <a onclick="return coll_move_item(<?php echo $index . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=-1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a> |
| 242 | + <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=-1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a> |
243 | 243 | <?php } |
244 | 244 | if ($index == count($this->data['collection']['items']) - 1) { ?> |
245 | 245 | <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" /> |
246 | 246 | <?php } else { ?> |
247 | | - <a onclick="return coll_move_item(<?php echo $index . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a> |
| 247 | + <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a> |
248 | 248 | <?php } ?> |
249 | 249 | </noscript> |
250 | 250 | <?php if ($item['currentVersion'] == 0) { |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | $url = $item['url']; |
254 | 254 | } |
255 | 255 | ?> |
256 | | - <a href="<?php echo $url ?>" title="<?php $this->msg('coll-show') ?>"><img src="<?php echo htmlspecialchars($mediapath . "show.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-show') ?>" /></a> |
| 256 | + <a href="<?php echo htmlspecialchars( $url ) ?>" title="<?php $this->msg('coll-show') ?>"><img src="<?php echo htmlspecialchars($mediapath . "show.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-show') ?>" /></a> |
257 | 257 | <span class="title sortableitem" style="margin-left: 1em;"> |
258 | 258 | <?php if (isset($item['displaytitle']) && $item['displaytitle'] != '') { |
259 | 259 | echo htmlspecialchars($item['displaytitle']); |
— | — | @@ -262,23 +262,23 @@ |
263 | 263 | </span> |
264 | 264 | </li> |
265 | 265 | <?php } else if ($item['type'] == 'chapter') { ?> |
266 | | - <li id="item-<?php echo $index ?>" class="chapter" style="margin-top:0.3em;"> |
267 | | - <a onclick="return coll_remove_item(<?php echo $index ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'remove_item/', 'index=' . $index)) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a> |
| 266 | + <li id="item-<?php echo intval( $index ) ?>" class="chapter" style="margin-top:0.3em;"> |
| 267 | + <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'remove_item/', 'index=' . $index)) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a> |
268 | 268 | <noscript> |
269 | 269 | <?php if ($index == 0) { ?> |
270 | 270 | <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" /> |
271 | 271 | <?php } else { ?> |
272 | | - <a onclick="return coll_move_item(<?php echo $index . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=-1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a> |
| 272 | + <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=-1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a> |
273 | 273 | <?php } |
274 | 274 | if ($index == count($this->data['collection']['items']) - 1) { ?> |
275 | 275 | <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" /> |
276 | 276 | <?php } else { ?> |
277 | | - <a onclick="return coll_move_item(<?php echo $index . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a> |
| 277 | + <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'move_item/', 'delta=1&index=' . $index)) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a> |
278 | 278 | <?php } ?> |
279 | 279 | </noscript> |
280 | 280 | <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" /> |
281 | 281 | <strong class="title sortableitem" style="margin-left: 0.2em;"><?php echo htmlspecialchars($item['title']) ?></strong> |
282 | | - <a class="makeVisible" <?php if (!isset($this->data['is_ajax'])) { echo 'style="display:none"'; } ?> onclick="return coll_rename_chapter(<?php echo $index . ', \'' . $item['title'] . '\''; ?>)" href="javascript:void(0)">[<?php $this->msg('coll-rename') ?>]</a> |
| 282 | + <a class="makeVisible" <?php if (!isset($this->data['is_ajax'])) { echo 'style="display:none"'; } ?> onclick="return coll_rename_chapter(<?php echo intval( $index ) . ', \'' . $item['title'] . '\''; ?>)" href="javascript:void(0)">[<?php $this->msg('coll-rename') ?>]</a> |
283 | 283 | </li> |
284 | 284 | <?php } |
285 | 285 | } ?> |