Skip to content

Commit

Permalink
Missing files from previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Dec 4, 2008
1 parent 8d8911c commit a2eaf7d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions frog/app/backend/models/Page.php
Expand Up @@ -228,6 +228,16 @@ public static function cloneTree($page, $parent_id)
$clone->title .= " (copy)";
$clone->save();

/* Also clone the page parts. */
$page_part = PagePart::findByPageId($page->id);
if (count($page_part)) {
foreach ($page_part as $part) {
$part->page_id = $clone->id;
$part->id = null;
$part->save();
}
}

/* This gets set only once even when called recursively. */
if (!$new_root_id) {
$new_root_id = $clone->id;
Expand Down
4 changes: 2 additions & 2 deletions frog/app/backend/views/page/children.php
Expand Up @@ -5,9 +5,9 @@
<span class="w1">
<?php if ($child->has_children): ?><img align="middle" alt="toggle children" class="expander" src="images/<?php echo $child->is_expanded ? 'collapse': 'expand'; ?>.png" title="" /><?php endif; ?>
<?php if ( ! AuthUser::hasPermission('administrator') && ! AuthUser::hasPermission('developer') && $child->is_protected): ?>
<img align="middle" class="icon" src="images/page.png" alt="page icon" /> <span class="title protected"><?php echo $child->title; ?></span> <img class="handle_reorder" src="images/drag.gif" alt="<?php echo __('Drag and Drop'); ?>" align="middle" /> <img class="handle_copy" src="images/drag.gif" alt="<?php echo __('Drag to Copy'); ?>" align="middle" />
<img align="middle" class="icon" src="images/page.png" alt="page icon" /> <span class="title protected"><?php echo $child->title; ?></span> <img class="handle_reorder" src="images/drag_to_sort.gif" alt="<?php echo __('Drag and Drop'); ?>" align="middle" /> <img class="handle_copy" src="images/drag_to_copy.gif" alt="<?php echo __('Drag to Copy'); ?>" align="middle" />
<?php else: ?>
<a href="<?php echo get_url('page/edit/'.$child->id); ?>" title="<?php echo $child->slug; ?>/"><img align="middle" class="icon" src="images/page.png" alt="page icon" /> <span class="title"><?php echo $child->title; ?></span></a> <img class="handle_reorder" src="images/drag.gif" alt="<?php echo __('Drag and Drop'); ?>" align="middle" /> <img class="handle_copy" src="images/drag.gif" alt="<?php echo __('Drag to Copy'); ?>" align="middle" />
<a href="<?php echo get_url('page/edit/'.$child->id); ?>" title="<?php echo $child->slug; ?>/"><img align="middle" class="icon" src="images/page.png" alt="page icon" /> <span class="title"><?php echo $child->title; ?></span></a> <img class="handle_reorder" src="images/drag_to_sort.gif" alt="<?php echo __('Drag and Drop'); ?>" align="middle" /> <img class="handle_copy" src="images/drag_to_copy.gif" alt="<?php echo __('Drag to Copy'); ?>" align="middle" />
<?php endif; ?>
<?php if (! empty($child->behavior_id)): ?> <small class="info">(<?php echo Inflector::humanize($child->behavior_id); ?>)</small><?php endif; ?>
<img align="middle" alt="" class="busy" id="busy-<?php echo $child->id; ?>" src="images/spinner.gif" style="display: none;" title="" />
Expand Down
2 changes: 1 addition & 1 deletion frog/app/backend/views/page/index.php
@@ -1,7 +1,7 @@
<h1><?php echo __('Pages'); ?></h1>

<div id="site-map-def">
<div class="page"><?php echo __('Page'); ?> (<a href="#" id="toggle_reorder" onclick="toggle_reorder = !toggle_reorder; $$('.handle_reorder').each(function(e) { e.style.display = toggle_reorder ? 'inline': 'none'; }); return false;"><?php echo __('reorder'); ?></a> or <a id="toggle_copy" href="#" onclick="toggle_copy = !toggle_copy; $$('.handle_copy').each(function(e) { e.style.display = toggle_copy ? 'inline': 'none'; }); return false;"><?php echo __('copy'); ?></a>)</div>
<div class="page"><?php echo __('Page'); ?> (<a href="#" id="toggle_reorder" onclick="toggle_reorder = !toggle_reorder; toggle_copy = false; $$('.handle_reorder').each(function(e) { e.style.display = toggle_reorder ? 'inline': 'none'; }); $$('.handle_copy').each(function(e) { e.style.display = toggle_copy ? 'inline': 'none'; }); return false;"><?php echo __('reorder'); ?></a> or <a id="toggle_copy" href="#" onclick="toggle_copy = !toggle_copy; toggle_reorder = false; $$('.handle_copy').each(function(e) { e.style.display = toggle_copy ? 'inline': 'none'; }); $$('.handle_reorder').each(function(e) { e.style.display = toggle_reorder ? 'inline': 'none'; }); return false;"><?php echo __('copy'); ?></a>)</div>
<div class="status"><?php echo __('Status'); ?></div>
<div class="modify"><?php echo __('Modify'); ?></div>
</div>
Expand Down

0 comments on commit a2eaf7d

Please sign in to comment.