/**
  * 		generates HTML for the View Registration Details Admin page
  *		@access protected
  *		@return void
  */
 protected function _registration_details()
 {
     $this->_template_args = array();
     $this->_set_registration_object();
     if (is_object($this->_registration)) {
         $transaction = $this->_registration->transaction() ? $this->_registration->transaction() : EE_Transaction::new_instance();
         $this->_session = $transaction->session_data();
         $title = __(ucwords(str_replace('_', ' ', $this->_req_action)), 'event_espresso');
         // add PRC_ID to title if editing
         $title = $this->_registration->ID() ? $title . ' # ' . $this->_registration->ID() : $title;
         $this->_template_args['reg_nmbr']['value'] = $this->_registration->ID();
         $this->_template_args['reg_nmbr']['label'] = __('Registration Number', 'event_espresso');
         $this->_template_args['reg_datetime']['value'] = $this->_registration->pretty_date('l F j, Y', 'g:i:s a');
         $this->_template_args['reg_datetime']['label'] = __('Date', 'event_espresso');
         $this->_template_args['reg_status']['value'] = $this->_registration->pretty_status();
         $this->_template_args['reg_status']['label'] = __('Registration Status', 'event_espresso');
         $this->_template_args['reg_status']['class'] = 'status-' . $this->_registration->status_ID();
         $this->_template_args['approve_decline_reg_status_buttons'] = $this->_set_approve_or_decline_reg_status_buttons();
         $this->_template_args['grand_total'] = $transaction->total();
         $this->_template_args['currency_sign'] = EE_Registry::instance()->CFG->currency->sign;
         // link back to overview
         $this->_template_args['reg_overview_url'] = REG_ADMIN_URL;
         $this->_template_args['registration'] = $this->_registration;
         // grab header
         $template_path = REG_TEMPLATE_PATH . 'reg_admin_details_header.template.php';
         $this->_template_args['admin_page_header'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
     } else {
         $this->_template_args['admin_page_header'] = $this->display_espresso_notices();
     }
     // the details template wrapper
     $this->display_admin_page_with_sidebar();
 }
 /**
  * 		_set_approve_or_decline_reg_status_buttons
  *		@access protected
  *		@return string
  */
 public function set_reg_status_buttons_metabox()
 {
     //is registration for free event OR for a completed transaction? This will determine whether the set to pending option is shown.
     $is_complete = $this->_registration->transaction()->is_completed();
     //let's get an array of all possible buttons that we can just reference
     $status_buttons = $this->_get_reg_status_buttons();
     $template_args['reg_status_value'] = $this->_registration->pretty_status();
     $template_args['reg_status_class'] = 'status-' . $this->_registration->status_ID();
     $template_args['attendee'] = $this->_registration->attendee();
     $template = REG_TEMPLATE_PATH . 'reg_status_change_buttons.template.php';
     if ($this->_set_registration_object()) {
         $current_status = $this->_registration->status_ID();
         unset($status_buttons[$current_status]);
         if ($current_status != EEM_Registration::status_id_pending_payment && $is_complete) {
             unset($status_buttons[EEM_Registration::status_id_pending_payment]);
         }
         $template_args['status_buttons'] = implode("\n", $status_buttons);
     }
     $template_args['form_url'] = REG_ADMIN_URL;
     $template_args['REG_ID'] = $this->_registration->ID();
     $template_args['nonce'] = wp_nonce_field('change_reg_status_nonce', 'change_reg_status_nonce', FALSE, FALSE);
     EEH_Template::display_template($template, $template_args);
 }