PluginProbe
ShiftController Employee Shift Scheduling / 4.9.85
ShiftController Employee Shift Scheduling v4.9.85
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / sh4 / app / html / view / admin / about.php

about.php in ShiftController Employee Shift Scheduling 4.9.85, at sh4/app/html/view/admin/about.php

100 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 #[AllowDynamicProperties]
3 class SH4_App_Html_View_Admin_About
4 {
5 public function __construct(
6 HC3_Hooks $hooks,
7 HC3_Uri $uri,
8 HC3_Ui $ui,
9 HC3_Ui_Layout1 $layout
10 )
11 {
12 $this->ui = $ui;
13 $this->layout = $layout;
14 $this->uri = $uri;
15
16 $this->self = $hooks->wrap($this);
17 }
18
19 public function render()
20 {
21 $out = array();
22
23 // $currentUrl = $this->uri->currentUrl();
24 // echo "CURRENT_URL = '" . $currentUrl . "'<br>";
25 // echo "SITE_URL = '" . site_url('/') . "'<br>";
26 // echo "GET_SITE_URL = '" . get_site_url() . "'<br>";
27 // exit;
28
29 $version = substr(SH4_VERSION, 0, 1) . '.' . substr(SH4_VERSION, 1, 1) . '.' . substr(SH4_VERSION, 2);
30 $version = $this->ui->makeBlock( $version )
31 ->tag('font-size', 5)
32 ;
33 $version = $this->ui->makeLabelled( '__Version__', $version );
34 $out[] = $version;
35
36 $addons = array();
37 if( defined('SH4_PRO_VERSION') ){
38 $version = substr(SH4_PRO_VERSION, 0, 1) . '.' . substr(SH4_PRO_VERSION, 1, 1) . '.' . substr(SH4_PRO_VERSION, 2);
39 $version = 'Pro' . ' ' . $version;
40 $version = $this->ui->makeBlock( $version )
41 ->tag('font-size', 5)
42 ;
43 $addons[] = $version;
44 }
45
46 if( ! $addons ){
47 $addons[] = '__None__';
48 }
49
50 $addons = $this->ui->makeList( $addons );
51 $addons = $this->ui->makeLabelled( '__Addons__', $addons );
52 $out[] = $addons;
53
54 // resinstall
55 $buttons = array();
56 $buttons[] = $this->ui->makeInputSubmit( '__Delete All Shifts__')
57 ->setFormAction( 'admin/reinstall/shifts' )
58 ->tag('secondary')
59 ->tag('confirm')
60 ;
61 $buttons[] = $this->ui->makeInputSubmit( '__Complete Reinstall__')
62 ->setFormAction( 'admin/reinstall' )
63 ->tag('secondary')
64 ->tag('confirm')
65 ;
66 $buttons = $this->ui->makeListInline( $buttons );
67 $form = $this->ui->makeForm(
68 'admin/reinstall',
69 $buttons
70 );
71
72 $reinstall = $this->ui->makeLabelled( '__Reinstall__', $form );
73
74 $out[] = $reinstall;
75
76 $out = $this->ui->makeList( $out );
77
78 $this->layout
79 ->setContent( $out )
80 ->setHeader( $this->self->header() )
81 ->setBreadcrumb( $this->self->breadcrumb() )
82 ;
83
84 $out = $this->layout->render();
85 return $out;
86 }
87
88 public function header()
89 {
90 $out = '__About__';
91 return $out;
92 }
93
94 public function breadcrumb()
95 {
96 $return = array();
97 $return['admin'] = array( 'admin', '__Administration__' );
98 return $return;
99 }
100 }