Skip to content

Commit

Permalink
Standardizes migration screens and adds a wizard-like link at the bot…
Browse files Browse the repository at this point in the history
…tom to move to the next step. Though it doesn't act as a true "wizard"

[#67 state:open]
  • Loading branch information
dleffler committed Mar 30, 2011
1 parent ea6b98e commit 2a8fe81
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ public function migrate_files() {
$db->insertObject($file,'expFiles');
$oldfile->exists = file_exists(BASE.$oldfile->directory."/".$oldfile->filename);
}
assign_to_template(array('files'=>$oldfiles));
assign_to_template(array('count'=>count($oldfiles)));
assign_to_template(array('files'=>$oldfiles,'count'=>count($oldfiles)));
}

// gather info about all modules in old site for user selection
Expand Down Expand Up @@ -451,7 +450,6 @@ public function manage_users() {
$user->exists = false;
}
}
assign_to_template(array('users'=>$users));

$groups = $old_db->selectObjects('group');
foreach($groups as $group) {
Expand All @@ -461,7 +459,7 @@ public function manage_users() {
$group->exists = false;
}
}
assign_to_template(array('groups'=>$groups));
assign_to_template(array('users'=>$users,'groups'=>$groups));
}

// copy selected users/groups over from old site
Expand Down
11 changes: 6 additions & 5 deletions framework/modules/migration/views/migration/configure.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*}

<div id="migrationconfig" class="module migration configure">
<h1>{"Database Settings to Migrate Your Old Site"|gettext}</h1>
<p>
This is where you enter the database connection information for your
old Exponent v1 site you want to migrate data from.
</p>
{form action=saveconfig}
<h2>{"Database Settings to Migrate Your Old Site"|gettext}</h2>
<p>
This is where you enter the database connection information for your
old Exponent v1 site you want to migrate data from.
</p>
{control type=text name=server label="Server Name" value=$config.server}
{control type="text" name="database" label="Database Name" value=$config.database}
{control type="text" name="username" label="Username" value=$config.username}
Expand All @@ -29,4 +29,5 @@
{control type="text" name="prefix" label="Exponent Table Prefix" value=$config.prefix}
{control type=buttongroup submit="Save Config" cancel="Cancel"}
{/form}
<a class="admin" href="{link module=migration action=manage_users}">Next Step -> Migrate Users & Groups</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<p>
The following is a list of modules we found in the database {$config.database}.
</p>

{form action="migrate_content"}
<table class="exp-skin-table">
<thead>
Expand Down Expand Up @@ -50,4 +49,5 @@
{control type="checkbox" name="wipe_content" label="Erase all current content before import?" value=1 checked=false}
{control type="buttongroup" submit="Migrate Content" cancel="Cancel"}
{/form}
<div class="admin">This is the Final Migration Step</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
{br}WARNING: This process will wipe out all current file records in the database.
</span>
</p>

{form action="migrate_files"}
<table>
<tbody>
Expand All @@ -33,4 +32,5 @@
</table>
{control type="buttongroup" submit="Migrate Files" cancel="Cancel"}
{/form}
<a class="admin" href="{link module=migration action=manage_content}">Next Step -> Migrate Content</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
The following is a list of pages we found in the database {$config.database}.
Select the pages you would like to pull over from {$config.database}.
</p>

{form action="migrate_pages"}
<table class="exp-skin-table">
<thead>
Expand Down Expand Up @@ -59,4 +58,5 @@
{control type="checkbox" name="wipe_pages" label="Erase all current pages and then try again?" value=1 checked=false}
{control type="buttongroup" submit="Migrate Pages" cancel="Cancel"}
{/form}
<a class="admin" href="{link module=migration action=manage_files}">Next Step -> Migrate Files</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
Select the users and groups you would like to pull over from {$config.database}.
User and group permissions will NOT be migrated.
</p>

{form action="migrate_users"}
<table class="exp-skin-table">
<thead>
Expand Down Expand Up @@ -116,4 +115,5 @@
</table>
{control type="buttongroup" submit="Migrate Users/Groups" cancel="Cancel"}
{/form}
<a class="admin" href="{link module=migration action=manage_pages}">Next Step -> Migrate Pages</a>
</div>
17 changes: 7 additions & 10 deletions framework/modules/migration/views/migration/migrate_content.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@
{/css}

<div class="module migration migrate_content">
<h1>{"Content Migration Report"|gettext}</h1>
{if $msg.clearedcontent}
<p>
{br} After clearing the database of content:
</p>
{/if}
<table border="0" cellspacing="0" cellpadding="0" class="exp-skin-table">
<thead>
<tr>
<th>
{"Content Migration Report"|gettext}
{if $msg.clearedcontent}
{br} After clearing the database of content:
{/if}
</th>
</tr>
</thead>
<tbody>
<tr><td>Migrated {if $msg.locationref}{$msg.locationref} total locations and {/if}{if $msg.container}{$msg.container} total containers{/if} which included:</td></tr>
{foreach from=$msg.migrated item=val key=key}
Expand All @@ -45,4 +41,5 @@
{/foreach}
</tbody>
</table>
<div class="admin">This is the Final Migration Step</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
Note: this only properly copied over the records from the old database into the Exponent v2 database.
Make sure you manually copy the "files" directory over to this installation.
</p>

<ul>
<li class=\"mig-msg\">
Emptied the expFiles table before the file import
Expand Down Expand Up @@ -59,4 +58,5 @@
{/foreach}
</tbody>
</table>
<a class="admin" href="{link module=migration action=manage_content}">Next Step -> Migrate Content</a>
</div>

0 comments on commit 2a8fe81

Please sign in to comment.