コード例 #1
0
ファイル: workflow-inbox.php プロジェクト: andyUA/kabmin-new
<?php

global $ow_custom_statuses;
$selected_term = FALSE;
if (isset($_GET['category']) && !empty($_GET['category']) && isset($_GET['nonce']) && wp_verify_nonce($_GET['nonce'], 'category_filter')) {
    $selected_term = trim($_GET['category']);
}
// sanitize the data
$selected_user = isset($_GET['user']) && sanitize_text_field($_GET["user"]) ? intval(sanitize_text_field($_GET["user"])) : get_current_user_id();
$page_number = isset($_GET['paged']) && sanitize_text_field($_GET["paged"]) ? intval(sanitize_text_field($_GET["paged"])) : 1;
$ow_inbox_service = new OW_Inbox_Service();
$ow_process_flow = new OW_Process_Flow();
$ow_workflow_service = new OW_Workflow_Service();
// get assigned posts for selected user
$inbox_items = $ow_process_flow->get_assigned_post(null, $selected_user);
$count_posts = count($inbox_items);
$per_page = OASIS_PER_PAGE;
// TODO: see how to better look into the capabilities of current user
$is_post_editable = current_user_can('edit_others_posts');
$current_user_role = OW_Utility::instance()->get_current_user_role();
$current_user_id = get_current_user_id();
// get custom terminology
$workflow_terminology_options = get_option('oasiswf_custom_workflow_terminology');
$sign_off_label = !empty($workflow_terminology_options['signOffText']) ? $workflow_terminology_options['signOffText'] : __('Sign Off', 'oasisworkflow');
$abort_workflow_label = !empty($workflow_terminology_options['abortWorkflowText']) ? $workflow_terminology_options['abortWorkflowText'] : __('Abort Workflow', 'oasisworkflow');
?>
<div class="wrap">
	<div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
	<h2><?php 
echo __("Inbox", "oasisworkflow");
?>
コード例 #2
0
<?php

$selected_user = isset($_REQUEST['user']) && sanitize_text_field($_REQUEST["user"]) ? intval(sanitize_text_field($_REQUEST["user"])) : null;
$page_number = isset($_GET['paged']) && sanitize_text_field($_GET["paged"]) ? intval(sanitize_text_field($_GET["paged"])) : 1;
$ow_process_flow = new OW_Process_Flow();
$assigned_tasks = $ow_process_flow->get_assigned_post(null, $selected_user);
$count_posts = count($assigned_tasks);
$workflow_service = new OW_Workflow_Service();
$per_page = OASIS_PER_PAGE;
$option = get_option('oasiswf_custom_workflow_terminology');
$due_date_title = !empty($option['dueDateText']) ? $option['dueDateText'] : __('Due Date', 'oasisworkflow');
?>
<div class="wrap">
	<form id="assignment_report_form" method="post" action="<?php 
echo admin_url('admin.php?page=oasiswf-reports&tab=userAssignments');
?>
">
      <div class="tablenav">
      	<ul class="subsubsub"></ul>
      	<div class="tablenav-pages">
      		<?php 
OW_Utility::instance()->get_page_link($count_posts, $page_number, $per_page);
?>
      	</div>
      </div>
   </form>
   <table class="wp-list-table widefat fixed posts" cellspacing="0" border=0>
   	<thead>
   		<?php 
echo "<tr>";
echo "<th class='column-role'>" . __("User", "oasisworkflow") . "</th>";