source: trunk/admin/themes/default/template/intro.tpl @ 10538

Last change on this file since 10538 was 10538, checked in by patdenice, 13 years ago

feature:2271
Add pwg.extensions.checkUpdates method to webservices.
Add a warning message on intro page if update is availble for piwigo or extensions.
Add an "Ignore All" button on extensions update page.

  • Property svn:eol-style set to LF
File size: 3.8 KB
Line 
1{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
2
3{footer_script require='jquery.cluetip'}
4var piwigo_need_update_msg = '<a href="admin.php?page=updates">{"A new version of Piwigo is available."|@translate|@escape:"javascript"}</a>';
5var ext_need_update_msg = '<a href="admin.php?page=updates&amp;tab=ext">{"Some upgrades are available for extensions."|@translate|@escape:"javascript"}</a>';
6
7{literal}
8jQuery().ready(function(){
9        jQuery('.cluetip').cluetip({
10                width: 300,
11                splitTitle: '|',
12                positionBy: 'bottomTop'
13        });
14  jQuery.ajax({
15    type: 'GET',
16    url: 'ws.php',
17    dataType: 'json',
18    data: { method: 'pwg.extensions.checkUpdates', format: 'json' },
19    timeout: 5000,
20    success: function (data) {
21      if (data['stat'] != 'ok')
22        return;
23      piwigo_update = data['result']['piwigo_need_update'];
24      ext_update = data['result']['ext_need_update']
25      if ((piwigo_update || ext_update) && !jQuery(".warnings").is('div'))
26        jQuery("#content").prepend('<div class="warnings"><ul></ul></div>');
27      if (piwigo_update)
28        jQuery(".warnings ul").append('<li>'+piwigo_need_update_msg+'</li>');
29      if (ext_update)
30        jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>');
31    }
32  }); 
33});
34{/literal}
35{/footer_script}
36
37<h2>{'Piwigo Administration'|@translate}</h2>
38<dl style="padding-top: 30px;">
39  <dt>{'Piwigo version'|@translate}</dt>
40  <dd>
41    <ul>
42      <li><a href="{$PHPWG_URL}" class="externalLink">Piwigo</a> {$PWG_VERSION}</li>
43      <li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
44{if isset($SUBSCRIBE_BASE_URL)}
45      <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|htmlspecialchars|nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li>
46{/if}
47    </ul>
48  </dd>
49
50  <dt>{'Environment'|@translate}</dt>
51  <dd>
52    <ul>
53      <li>{'Operating system'|@translate}: {$OS}</li>
54      <li>PHP: {$PHP_VERSION} (<a href="{$U_PHPINFO}" class="externalLink">{'Show info'|@translate}</a>)  [{$PHP_DATATIME}]</li>
55      <li>{$DB_ENGINE}: {$DB_VERSION} [{$DB_DATATIME}]</li>
56    </ul>
57  </dd>
58
59  <dt>{'Database'|@translate}</dt>
60  <dd>
61    <ul>
62      <li>
63        {$DB_ELEMENTS}
64        {if isset($first_added)}
65        ({$first_added.DB_DATE})
66        {/if}
67      </li>
68      <li>{$DB_CATEGORIES} ({$DB_IMAGE_CATEGORY})</li>
69      <li>{$DB_TAGS} ({$DB_IMAGE_TAG})</li>
70      <li>{$DB_USERS}</li>
71      <li>{$DB_GROUPS}</li>
72      <li>
73        {$DB_COMMENTS}
74        {if isset($unvalidated)}
75        (<a href="{$unvalidated.URL}">{$unvalidated.INFO}</a>)
76        {/if}
77      </li>
78    </ul>
79  </dd>
80</dl>
81
82{if $ENABLE_SYNCHRONIZATION}
83<form name="QuickSynchro" action="{$U_CAT_UPDATE}" method="post" id="QuickSynchro" style="display: block; text-align:right;">
84<div>
85<input type="hidden" name="sync" value="files" checked="checked">
86<input type="hidden" name="display_info" value="1" checked="checked">
87<input type="hidden" name="add_to_caddie" value="1" checked="checked">
88<input type="hidden" name="privacy_level" value="0" checked="checked">
89<input type="hidden" name="sync_meta" checked="checked">
90<input type="hidden" name="simulate" value="0">
91<input type="hidden" name="subcats-included" value="1" checked="checked">
92</div>
93<div class="bigbutton">
94<span class="bigtext">{'Quick Local Synchronization'|@translate}</span>
95<input type="submit" value="" name="submit">
96</div>
97</form>
98{/if}
Note: See TracBrowser for help on using the repository browser.