prepared the gui to remove messages

This commit is contained in:
SJ 2015-07-07 14:12:35 +02:00
parent 1b9e2e639d
commit 2b6e12d89a
22 changed files with 115 additions and 2 deletions

View File

@ -44,6 +44,7 @@ server {
rewrite /audit-helper.php /index.php?route=audit/helper;
rewrite /message.php /index.php?route=message/view;
rewrite /bulkrestore.php /index.php?route=message/bulkrestore;
rewrite /bulkremove.php /index.php?route=message/bulkremove;
rewrite /bulkpdf.php /index.php?route=message/bulkpdf;
rewrite /folders.php /index.php?route=folder/list&;
rewrite /settings.php /index.php?route=user/settings;

View File

@ -8,6 +8,7 @@ RewriteRule ^search-helper.php /index.php?route=search/helper [L]
RewriteRule ^audit-helper.php /index.php?route=audit/helper [L]
RewriteRule ^message.php /index.php?route=message/view [L]
RewriteRule ^bulkrestore.php /index.php?route=message/bulkrestore [L]
RewriteRule ^bulkremove.php /index.php?route=message/bulkremove [L]
RewriteRule ^bulkpdf.php /index.php?route=message/bulkpdf [L]
RewriteRule ^folders.php /index.php?route=folder/list& [QSA,L]
RewriteRule ^settings.php /index.php?route=user/settings [L]

View File

@ -144,6 +144,7 @@ $config['MEMCACHED_ENABLED'] = 0;
$config['PASSWORD_CHANGE_ENABLED'] = 0;
$config['ENABLE_STATISTICS'] = 1;
$config['ENABLE_HISTORY'] = 1;
$config['ENABLE_DELETE'] = 0;
$config['ENABLE_REMOTE_IMAGES'] = '0';
$config['ENABLE_ON_THE_FLY_VERIFICATION'] = 0;
$config['ENABLE_LDAP_IMPORT_FEATURE'] = 0;

View File

@ -0,0 +1,55 @@
<?php
class ControllerMessageBulkremove extends Controller {
public function index(){
$this->id = "content";
$this->template = "message/bulkremove.tpl";
$this->layout = "common/layout-empty";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
$this->load->model('search/search');
$this->load->model('search/message');
//$this->load->model('message/remove');
$this->load->model('user/user');
$this->document->title = $this->data['text_message'];
if(!isset($this->request->post['idlist']) || $this->request->post['idlist'] == '') { die("no idlist parameter given"); }
$idlist = $this->model_search_search->check_your_permission_by_id_list(explode(",", $this->request->post['idlist']));
$this->data['username'] = Registry::get('username');
$this->model_search_message->connect_to_pilergetd();
foreach($idlist as $id) {
AUDIT(ACTION_REMOVE_MESSAGE, '', '', $id, '');
$piler_id = $this->model_search_message->get_piler_id_by_id($id);
syslog(LOG_INFO, "removing $piler_id");
$x = 1;
if($x == 1) { $this->data['removed']++; }
}
$this->model_search_message->disconnect_from_pilergetd();
$this->render();
}
}
?>

View File

@ -483,4 +483,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses";
$_['text_storage'] = "Storage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -479,4 +479,6 @@ $_['text_ldap_delete_confirm_message'] = 'Do you wish to delete the LDAP entry';
$_['text_customer_delete_confirm_message'] = 'Do you wish to delete the customer';
$_['text_with_selected'] = 'With Selected';
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -482,4 +482,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses";
$_['text_storage'] = "Storage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -479,4 +479,6 @@ $_['text_with_selected'] = 'Selection';
$_['text_storage'] = "Stockage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -481,4 +481,6 @@ $_['text_ldap_delete_confirm_message'] = 'T
$_['text_customer_delete_confirm_message'] = 'Törölni akarja az ügyfelet';
$_['text_with_selected'] = 'Kiválasztott levelek';
$_['text_compliance_warning'] = 'A törlés funkció engedélyezett, ezért az archívum NEM teljesíti a megfelelőséget!';
?>

View File

@ -481,4 +481,6 @@ $_['text_ldap_delete_confirm_message'] = 'Törölni akarja az LDAP bejegyzést';
$_['text_customer_delete_confirm_message'] = 'Törölni akarja az ügyfelet';
$_['text_with_selected'] = 'Kiválasztott levelek';
$_['text_compliance_warning'] = 'A törlés funkció engedélyezett, ezért az archívum NEM teljesíti a megfelelőséget!';
?>

View File

@ -472,4 +472,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses";
$_['text_storage'] = "Storage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -480,4 +480,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses";
$_['text_storage'] = "Storage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -480,4 +480,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses";
$_['text_storage'] = "Storage";
$_['text_legal_hold'] = "Legal hold";
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
?>

View File

@ -340,6 +340,27 @@ var Piler =
},
bulk_remove_messages:function(msg)
{
Piler.log("[bulk_remove_messages]");
Piler.poor_mans_keepalive_for_dummy_browsers();
var idlist = Piler.get_selected_messages_list();
if(!idlist) return;
jQuery.ajax('/bulkremove.php', {
data: { idlist: idlist },
type: "POST"
})
.done( function( a ) {})
.fail(function( a, b ) { alert("Problem retrieving XML data:" + b) });
Piler.show_message('messagebox1', msg, 0.8);
},
bulk_restore_messages:function(msg, email)
{
Piler.log("[bulk_restore_messages]", email);

View File

@ -72,7 +72,7 @@
<div class="controls row-fluid">
<div id="input-span" class="span6">
<label for="_search"><?php print $text_search; ?></label>
<input type="text" id="_search" name="_search" placeholder="<?php print $text_enter_search_terms; ?>" />
<input type="text" id="_search" name="_search" placeholder="<?php print $text_enter_search_terms; ?>" <?php if(ENABLE_DELETE == 1) { ?>style="background: #faafbe;"<?php } ?> />
</div>
<div class="span6 input-append btn-group">
<button id="button_search" class="btn btn-large btn-danger" onclick="Piler.expert(this); return false;"><i class="icon-search icon-large"></i>&nbsp;<?php print $text_search; ?></button>

View File

@ -57,6 +57,10 @@
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<?php if(ENABLE_DELETE == 1) { ?>
<p><?php print $text_compliance_warning; ?></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>

View File

@ -0,0 +1 @@
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>

View File

@ -132,9 +132,12 @@
<?php if($page < $total_pages) { ?><a href="#" class="navlink" onclick="Piler.navigation(<?php print $total_pages; ?>);"><i class="icon-double-angle-right icon-large"></i></a><?php } else { ?> <span class="navlink"><i class="icon-double-angle-right icon-large muted"></i></span><?php } ?>
&nbsp;
<i class="icon-exclamation-sign" title="<?php print $text_compliance_warning; ?>"></i>
<?php } else { print $text_none_found; } ?>
</div>
</div>
<div id="functionrow" class="span8">
<input type="hidden" id="tag_keys" name="tag_keys" value="<?php print $all_ids; ?>" />
<input type="hidden" id="_ref" name="_ref" value="<?php if(isset($_ref)) { print $_ref; } ?>" />
@ -150,6 +153,7 @@
<a href="#" class="btn btn-custom btn-inverse<?php if(Registry::get('auditor_user') == 1) { ?> confirm-delete"><?php } else { ?>" onclick="Piler.bulk_restore_messages('<?php print $text_restored; ?>', '');" title="<?php print $text_bulk_restore_selected_emails; ?>"><?php } ?><i class="icon-share-alt"></i></a>
<?php } ?>
<a href="#" class="btn btn-custom btn-inverse" onclick="Piler.download_messages();" title="<?php print $text_bulk_download; ?>"><i class="icon-download-alt"></i></a>
<?php if(ENABLE_DELETE == 1 && isAuditorUser() == 1) { ?><a href="#" class="btn btn-custom btn-inverse" onclick="Piler.bulk_remove_messages('<?php print $text_successfully_removed; ?>');" title="<?php print $text_remove; ?>"><i class="icon-remove-sign"></i></a><?php } ?>
<input type="text" id="tag_value" name="tag_value" class="tagtext" />
<a href="#" class="btn btn-custom btn-inverse" onclick="Piler.tag_search_results('<?php print $text_tagged; ?>');" title="<?php print $text_tag_selected_messages; ?>"><i class="icon-tags" title="Tag"></i></a>
</div>

View File

@ -71,7 +71,7 @@
<input type="hidden" name="ref" id="ref" value="" />
<input type="hidden" name="prefix" id="prefix" value="" />
<input type="text" id="_search" name="_search" class="input-medium span6" value="" placeholder="<?php print $text_enter_search_terms; ?>" />
<input type="text" id="_search" name="_search" class="input-medium span6" value="" placeholder="<?php print $text_enter_search_terms; ?>" <?php if(ENABLE_DELETE == 1) { ?>style="background: #faafbe;"<?php } ?> />
<?php if(OUTLOOK == 0) { ?>
<a id="advsearch_caret" href="#" onclick="$('#searchpopup1').show();"><b class="caret"></b></a>

View File

@ -60,6 +60,10 @@
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<?php if(ENABLE_DELETE == 1) { ?>
<p><?php print $text_compliance_warning; ?></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>

View File

@ -0,0 +1 @@
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>

View File

@ -115,6 +115,8 @@
<button class="btn piler-right-margin<?php if(Registry::get('auditor_user') == 1) { ?> confirm-delete"><?php } else { ?>" onclick="Piler.bulk_restore_messages('<?php print $text_restored; ?>', ''); return false;"><?php } ?><?php print $text_bulk_restore_selected_emails; ?></button>
<?php } ?>
<?php if(ENABLE_DELETE == 1 && isAuditorUser() == 1) { ?><a href="#" class="btn btn-custom btn-inverse" onclick="Piler.bulk_remove_messages('<?php print $text_successfully_removed; ?>');" title="<?php print $text_remove; ?>"><i class="icon-remove-sign"></i></a><?php } ?>
<input type="text" id="tag_value" name="tag_value" class="input-xlarge" placeholder="<?php print $text_tag_selected_messages; ?>" />
<button class="btn" onclick="Piler.tag_search_results('<?php print $text_tagged; ?>'); return false;" >OK</button>
</form>