summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-19 13:47:38 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-19 13:47:38 -0700
commitfeab9cfc34d96637243eeefe22c886054caf4a9d (patch)
treeafbe84040b8f0022cc827a40937bbbbdf6ae9d0c
parentc2faf5f8c811cdab334548289a5f35c1f4e7c8bf (diff)
Give the admin/g2_import page a facelift.
-rw-r--r--modules/g2_import/views/admin_g2_import.html.php114
-rw-r--r--themes/default/css/screen.css29
2 files changed, 95 insertions, 48 deletions
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index d5e29e12..0c742962 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -1,74 +1,92 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gAdminG2Config">
+<div id="gAdminG2Import">
<h1> <?= t("Gallery 2 Import") ?> </h1>
<p>
<?= t("Import your Gallery 2 users, photos, movies, comments and tags into your new Gallery 3 installation.") ?>
- <br/>
- <?= t("<b>Note</b>: The importer is a work in progress and does not currently support permissions, and movie formats other than Flash video and MP4") ?>
- <br/>
- <?= t("<b>Note</b>: The importer has <i>known issues</i> with the eAccelerator PHP accelerator. If you're using eAccelerator, please disable it. One way to do that is to put <code>php_value eaccelerator.enable 0</code> in gallery3/.htaccess") ?>
</p>
- <?= $form ?>
-</div>
-
-<? if (g2_import::is_initialized()): ?>
-<div id="gAdminG2Import">
- <h1> <?= t("Import") ?> </h1>
- <ul id="gMessage">
- <li class="gSuccess">
- <?= t("Gallery version %version detected", array("version" => g2_import::version())) ?>
- </li>
- </ul>
- <div class="gInfo">
+ <div id="gAdminG2ImportNotes">
+ <h2> <?= t("Notes") ?> </h2>
<p>
- <?= t("Your Gallery 2 has the following importable data in it") ?>
+ <?= t("The import process is a work in progress with some known issues:") ?>
</p>
<ul>
<li>
- <?= t2("1 user", "%count users", $g2_stats["users"]) ?>
+ <?= t("Permissions are <b>not imported</b>. You will have to set them again manually (for now).") ?>
</li>
<li>
- <?= t2("1 group", "%count groups", $g2_stats["groups"]) ?>
+ <?= t("The only supported image formats are JPG, PNG and GIF. Other formats will be skipped.") ?>
</li>
<li>
- <?= t2("1 album", "%count albums", $g2_stats["albums"]) ?>
+ <?= t("The only supported movie formats are FLV and MP4. Other formats will be skipped.") ?>
</li>
<li>
- <?= t2("1 photo", "%count photos", $g2_stats["photos"]) ?>
+ <?= t("The eAccelerator PHP performance extension is known to cause issues. If you're using eAccelerator and having problems, please disable it while you do your import. One way to do that is to put <code>php_value eaccelerator.enable 0</code> in gallery3/.htaccess") ?>
</li>
- <li>
- <?= t2("1 movie", "%count movies", $g2_stats["movies"]) ?>
+ </ul>
+ </div>
+ <?= $form ?>
+
+ <? if (g2_import::is_initialized()): ?>
+ <div id="gAdminG2ImportDetails">
+ <h2> <?= t("Import") ?> </h2>
+ <ul id="gMessage">
+ <li class="gSuccess">
+ <?= t("Gallery version %version detected", array("version" => g2_import::version())) ?>
</li>
- <li>
- <?= t2("1 comment", "%count comments", $g2_stats["comments"]) ?>
+ <? if ($g2_sizes["thumb"]["size"] && $thumb_size != $g2_sizes["thumb"]["size"]): ?>
+ <li class="gWarning">
+ <?= t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
+ array("g2_pixels" => $g2_sizes["thumb"]["size"],
+ "g3_pixels" => $thumb_size,
+ "url" => url::site("admin/theme_options"))) ?>
</li>
- <li>
- <?= t2("1 tagged photo/movie/album",
- "%count tagged photos/movies/albums", $g2_stats["tags"]) ?>
+ <? endif ?>
+
+ <? if ($g2_sizes["resize"]["size"] && $resize_size != $g2_sizes["resize"]["size"]): ?>
+ <li class="gWarning">
+ <?= t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
+ array("g2_pixels" => $g2_sizes["resize"]["size"],
+ "g3_pixels" => $resize_size,
+ "url" => url::site("admin/theme_options"))) ?>
</li>
+ <? endif ?>
</ul>
- </div>
- <? if ($g2_sizes["thumb"]["size"] && $thumb_size != $g2_sizes["thumb"]["size"]): ?>
- <div class="gWarning">
- <?= t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
- array("g2_pixels" => $g2_sizes["thumb"]["size"],
- "g3_pixels" => $thumb_size,
- "url" => url::site("admin/theme_options"))) ?>
- </div>
- <? endif ?>
+ <div class="gInfo">
+ <p>
+ <?= t("Your Gallery 2 has the following importable data in it") ?>
+ </p>
+ <ul>
+ <li>
+ <?= t2("1 user", "%count users", $g2_stats["users"]) ?>
+ </li>
+ <li>
+ <?= t2("1 group", "%count groups", $g2_stats["groups"]) ?>
+ </li>
+ <li>
+ <?= t2("1 album", "%count albums", $g2_stats["albums"]) ?>
+ </li>
+ <li>
+ <?= t2("1 photo", "%count photos", $g2_stats["photos"]) ?>
+ </li>
+ <li>
+ <?= t2("1 movie", "%count movies", $g2_stats["movies"]) ?>
+ </li>
+ <li>
+ <?= t2("1 comment", "%count comments", $g2_stats["comments"]) ?>
+ </li>
+ <li>
+ <?= t2("1 tagged photo/movie/album",
+ "%count tagged photos/movies/albums", $g2_stats["tags"]) ?>
+ </li>
+ </ul>
+ </div>
- <? if ($g2_sizes["resize"]["size"] && $resize_size != $g2_sizes["resize"]["size"]): ?>
- <div class="gWarning">
- <?= t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. <a href=\"%url\">Using the same value</a> will speed up your import.",
- array("g2_pixels" => $g2_sizes["resize"]["size"],
- "g3_pixels" => $resize_size,
- "url" => url::site("admin/theme_options"))) ?>
+ <a class="gDialogLink"
+ href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>">
+ <?= t("Start importing!") ?>
+ </a>
</div>
<? endif ?>
-
- <?= t("You can begin your import on the <a href=\"%url\">maintenance page</a>",
- array("url" => url::site("admin/maintenance"))) ?>
</div>
-<? endif ?>
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css
index e97c95d5..521f3915 100644
--- a/themes/default/css/screen.css
+++ b/themes/default/css/screen.css
@@ -1012,6 +1012,7 @@ form .gError,
background-color: #cfc;
}
+
/*************** STUFF THAT NEEDS A HOME ****************/
#gProgress h1 {
font-size: 1.1em;
@@ -1071,3 +1072,31 @@ form .gError,
background-color: #cfc;
border: 1px solid #beb;
}
+
+#gAdminG2ImportNotes {
+ padding-bottom: 20px;
+}
+
+#gAdminG2ImportDetails {
+ padding-top: 20px;
+}
+
+#gAdminG2ImportDetails .gWarning {
+ margin-top: 4px;
+}
+
+#gAdminG2ImportDetails .gInfo {
+ padding: 2px;
+ border: 1px solid #999;
+}
+
+#gAdminG2ImportNotes p {
+ padding: 0px;
+ margin: 0px;
+}
+
+#gAdminG2ImportNotes ul li {
+ padding-left: 0px;
+ margin-left: 20px;
+ list-style-type: circle;
+}