aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-05-26 00:20:07 +0000
committerplegall <plg@piwigo.org>2010-05-26 00:20:07 +0000
commit5f597c2cbabc9002886a056b3e513ceed27a99bf (patch)
tree0e2cadaf603bdc234896648dfdb8687936f84a9d /admin
parent9cf8684aa0a37273f6204efe9644178325f003e3 (diff)
merge r6361 from branch 2.1 to trunk
feature 1697: ability to deactivate the synchronization method to add photos. git-svn-id: http://piwigo.org/svn/trunk@6365 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/cat_options.php5
-rw-r--r--admin/configuration.php5
-rw-r--r--admin/help.php48
-rw-r--r--admin/photos_add.php15
-rw-r--r--admin/themes/default/template/admin.tpl6
-rw-r--r--admin/themes/default/template/element_set_global.tpl2
-rw-r--r--admin/themes/default/template/footer.tpl10
-rw-r--r--admin/themes/default/template/intro.tpl3
8 files changed, 64 insertions, 30 deletions
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 2daa2a539..b36083c49 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -162,7 +162,10 @@ $tabsheet = new tabsheet();
$opt_link = $link_start.'cat_options&amp;section=';
$tabsheet->add('status', l10n('Public / Private'), $opt_link.'status');
$tabsheet->add('visible', l10n('Lock'), $opt_link.'visible');
-$tabsheet->add('upload', l10n('Upload'), $opt_link.'upload');
+if ($conf['enable_synchronization'])
+{
+ $tabsheet->add('upload', l10n('Upload'), $opt_link.'upload');
+}
$tabsheet->add('comments', l10n('Comments'), $opt_link.'comments');
if ($conf['allow_random_representative'])
{
diff --git a/admin/configuration.php b/admin/configuration.php
index 2b293a3ab..83a44004e 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -221,7 +221,10 @@ $tabsheet->add('main', l10n('Main'), $conf_link.'main');
$tabsheet->add('display', l10n('Display'), $conf_link.'display');
$tabsheet->add('history', l10n('History'), $conf_link.'history');
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
-$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
+if ($conf['enable_synchronization'])
+{
+ $tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
+}
$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
// TabSheet selection
$tabsheet->select($page['section']);
diff --git a/admin/help.php b/admin/help.php
index 6547c998e..e2eafd1e8 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -33,31 +33,33 @@ $link = get_root_url().'admin.php?page=help&section=';
$selected = null;
$help_section_title = null;
-$tabs = array(
- array(
- 'code' => 'add_photos',
- 'label' => l10n('Add Photos'),
- ),
- array(
- 'code' => 'permissions',
- 'label' => l10n('Permissions'),
- ),
- array(
- 'code' => 'groups',
- 'label' => l10n('Groups'),
- ),
- array(
+$tabs = array();
+$tabs[] = array(
+ 'code' => 'add_photos',
+ 'label' => l10n('Add Photos'),
+ );
+$tabs[] = array(
+ 'code' => 'permissions',
+ 'label' => l10n('Permissions'),
+ );
+$tabs[] = array(
+ 'code' => 'groups',
+ 'label' => l10n('Groups'),
+ );
+if ($conf['enable_synchronization'])
+{
+ $tabs[] = array(
'code' => 'user_upload',
'label' => l10n('User Upload'),
- ),
- array(
- 'code' => 'virtual_links',
- 'label' => l10n('Virtual Links'),
- ),
- array(
- 'code' => 'misc',
- 'label' => l10n('Miscellaneous'),
- ),
+ );
+}
+$tabs[] = array(
+ 'code' => 'virtual_links',
+ 'label' => l10n('Virtual Links'),
+ );
+$tabs[] = array(
+ 'code' => 'misc',
+ 'label' => l10n('Miscellaneous'),
);
if (!isset($_GET['section']))
diff --git a/admin/photos_add.php b/admin/photos_add.php
index af3b84211..54db3113c 100644
--- a/admin/photos_add.php
+++ b/admin/photos_add.php
@@ -152,12 +152,19 @@ $tabs = array(
'code' => 'ploader',
'label' => l10n('Piwigo Uploader'),
),
- array(
- 'code' => 'ftp',
- 'label' => l10n('FTP + Synchronization'),
- ),
);
+if ($conf['enable_synchronization'])
+{
+ array_push(
+ $tabs,
+ array(
+ 'code' => 'ftp',
+ 'label' => l10n('FTP + Synchronization'),
+ )
+ );
+}
+
$tab_codes = array_map(
create_function('$a', 'return $a["code"];'),
$tabs
diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl
index ac4480de1..f95173a02 100644
--- a/admin/themes/default/template/admin.tpl
+++ b/admin/themes/default/template/admin.tpl
@@ -19,7 +19,9 @@ jQuery().ready(function(){ldelim}
<dd>
<ul>
<li><a href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_WAITING}">{'Waiting'|@translate}</a></li>
+{/if}
<li><a href="{$U_RATING}">{'Rating'|@translate}</a></li>
<li><a href="{$U_TAGS}">{'Tags'|@translate}</a></li>
<li><a href="{$U_CADDIE}">{'Caddie'|@translate}</a></li>
@@ -68,10 +70,14 @@ jQuery().ready(function(){ldelim}
<dt class="rdion"><span>{'Tools'|@translate}&nbsp;</span></dt>
<dd>
<ul>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_CAT_UPDATE}">{'Synchronize'|@translate}</a></li>
<li><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
+{/if}
<li><a href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_THUMBNAILS}">{'Thumbnails'|@translate}</a></li>
+{/if}
<li><a href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
<li><a href="{$U_PENDING_COMMENTS}">{'Pending Comments'|@translate}</a></li>
</ul>
diff --git a/admin/themes/default/template/element_set_global.tpl b/admin/themes/default/template/element_set_global.tpl
index 3a5e738e0..288ceff9b 100644
--- a/admin/themes/default/template/element_set_global.tpl
+++ b/admin/themes/default/template/element_set_global.tpl
@@ -85,7 +85,9 @@
{if isset($show_delete_form) }
<fieldset>
<legend>{'Deletions'|@translate}</legend>
+{if $ENABLE_SYNCHRONIZATION}
<p style="font-style:italic">{'Note: photo deletion does not apply to photos added by synchronization. For photos added by synchronization, remove them from the filesystem and then perform another synchronization.'|@translate}</p>
+{/if}
<p>
{'target'|@translate}
<label><input type="radio" name="target_deletion" value="all"> {'all'|@translate}</label>
diff --git a/admin/themes/default/template/footer.tpl b/admin/themes/default/template/footer.tpl
index f287bab0e..16491a724 100644
--- a/admin/themes/default/template/footer.tpl
+++ b/admin/themes/default/template/footer.tpl
@@ -61,5 +61,15 @@
</script>
{/literal}
+{if not $ENABLE_SYNCHRONIZATION}
+{literal}
+<script type='text/javascript'>
+ $(document).ready(function() {
+ $("#helpSynchro").hide();
+ });
+</script>
+{/literal}
+{/if}
+
</body>
</html> \ No newline at end of file
diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl
index efebaebdb..0762c011f 100644
--- a/admin/themes/default/template/intro.tpl
+++ b/admin/themes/default/template/intro.tpl
@@ -59,7 +59,7 @@ jQuery().ready(function(){ldelim}
</dd>
</dl>
-
+{if $ENABLE_SYNCHRONIZATION}
<form name="QuickSynchro" action="{$U_CAT_UPDATE}" method="post" id="QuickSynchro" style="display: block; text-align:right;">
<div>
<input type="hidden" name="sync" value="files" checked="checked">
@@ -75,3 +75,4 @@ jQuery().ready(function(){ldelim}
<input type="submit" value="" name="submit">
</div>
</form>
+{/if} \ No newline at end of file