mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 04:30:12 +01:00
prepared the gui to remove messages
This commit is contained in:
parent
1b9e2e639d
commit
2b6e12d89a
@ -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;
|
||||
|
@ -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]
|
||||
|
@ -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;
|
||||
|
55
webui/controller/message/bulkremove.php
Normal file
55
webui/controller/message/bulkremove.php
Normal 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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!';
|
||||
|
||||
?>
|
||||
|
@ -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);
|
||||
|
@ -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> <?php print $text_search; ?></button>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>
|
@ -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 } ?>
|
||||
|
||||
|
||||
<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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
1
webui/view/theme/mobile/templates/message/bulkremove.tpl
Normal file
1
webui/view/theme/mobile/templates/message/bulkremove.tpl
Normal file
@ -0,0 +1 @@
|
||||
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user