mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-09 07:23:39 +00:00
more external bind changes, added a clean up button, urls now show for external collections and added a few strings for translation
This commit is contained in:
parent
bb8bf75e8f
commit
2de1327934
@ -132,6 +132,15 @@ if ( $editor->Available() ) {
|
||||
$entryqry = new AwlQuery( 'SELECT count(*) as count from caldav_data where collection_id='.$editor->Value('collection_id') );
|
||||
$entryqry->Exec('admin-collection-edit');
|
||||
$entries = $entryqry->Fetch(); $entries = $entries->count;
|
||||
|
||||
$externalqry = new AwlQuery( 'SELECT external_url from dav_binding where bound_source_id=:id limit 1', array(':id' => $editor->Value('collection_id') ) );
|
||||
$externalqry->Exec('external-bind-url');
|
||||
$external = $externalqry->Fetch(); $external_url = $external->external_url;
|
||||
if ( $external_url ) {
|
||||
$external_bind = "\n<tr> <th class='right'>" . translate('External Url') . "</th> <td class='left'>$external_url</td> </tr>";
|
||||
} else {
|
||||
$external_bind = "";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$c->page_title = $editor->Title(translate('Create New Collection'));
|
||||
@ -315,7 +324,7 @@ label.privilege {
|
||||
</style>
|
||||
<table>
|
||||
<tr> <th class="right">$prompt_collection_id:</th> <td class="left">$value_id</td> </tr>
|
||||
<tr> <th class="right">$prompt_dav_name:</th> <td class="left">$value_dav_name</td> </tr>
|
||||
<tr> <th class="right">$prompt_dav_name:</th> <td class="left">$value_dav_name</td> </tr>$external_bind
|
||||
<tr> <th class="right">$prompt_entries:</th> <td class="left">$entries</td> </tr>
|
||||
<tr> <th class="right">$prompt_load_file:</th> <td class="left">##ics_file.file.60##
|
||||
<label class="privilege" title="Should the uploaded entries be appended to the calendar"><input type="checkbox" name="mode" value="append">Append</label>
|
||||
|
||||
@ -4,7 +4,7 @@ param_to_global( 'external_active', '([tf])', 'active' );
|
||||
$browser = new Browser(translate('External Calendars'));
|
||||
|
||||
$browser->AddColumn( 'collection_id', translate('ID'), 'right', '##collection_link##' );
|
||||
$rowurl = $c->base_url . '/admin.php?action=edit&t=external&id=';
|
||||
$rowurl = $c->base_url . '/admin.php?action=edit&t=collection&id=';
|
||||
$browser->AddHidden( 'collection_link', "'<a href=\"$rowurl' || collection_id || '\">' || collection_id || '</a>'" );
|
||||
$browser->AddColumn( 'dav_displayname', translate('Display Name') );
|
||||
$browser->AddColumn( 'refs', translate('References'),'right','','(select count(*) from dav_binding where bound_source_id=collection_id )' );
|
||||
@ -26,3 +26,13 @@ else {
|
||||
|
||||
$page_elements[] = $browser;
|
||||
|
||||
|
||||
$externalqry = new AwlQuery( "SELECT count(*) as count from collection where parent_container='/.external/' and collection_id not in ( select bound_source_id from dav_binding where external_url is not null)" );
|
||||
$externalqry->Exec('external-bind-url');
|
||||
$external = $externalqry->Fetch();
|
||||
if ( $external->count > 0 ) {
|
||||
$link = '<a href="'.$c->base_url . '/admin.php?action=edit&t=external&subaction=clean" class="submit">'.
|
||||
translate("Remove dangling external calendars").'('.$external->count.')</a>';
|
||||
$c->stylesheets[] = 'css/edit.css';
|
||||
$page_elements[] = $link;
|
||||
}
|
||||
|
||||
@ -508,6 +508,9 @@ msgstr ""
|
||||
msgid "Expires"
|
||||
msgstr ""
|
||||
|
||||
msgid "External Url"
|
||||
msgstr ""
|
||||
|
||||
msgid "Fail"
|
||||
msgstr ""
|
||||
|
||||
@ -657,6 +660,9 @@ msgstr ""
|
||||
msgid "Last used"
|
||||
msgstr ""
|
||||
|
||||
msgid "List External Calendars"
|
||||
msgstr ""
|
||||
|
||||
msgid "List Groups"
|
||||
msgstr ""
|
||||
|
||||
@ -874,6 +880,9 @@ msgstr ""
|
||||
msgid "Read/Write"
|
||||
msgstr ""
|
||||
|
||||
msgid "References"
|
||||
msgstr ""
|
||||
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user