Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timesheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web2project
timesheet
Commits
78011656
Commit
78011656
authored
Jan 22, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update index.php for web2project
parent
b4dd270f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
index.php
index.php
+19
-17
No files found.
index.php
View file @
78011656
<?php
<?php
/*
/*
* Copyright (C) 2007-20
08, M2X
* Copyright (C) 2007-20
14, M2X BV
*
*
* Authors: Jean-Paul Saman
* Authors: Jean-Paul Saman
*
*
...
@@ -19,30 +19,32 @@
...
@@ -19,30 +19,32 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
$perms
=&
$AppUI
->
acl
();
if
(
!
defined
(
'W2P_BASE_DIR'
))
{
die
(
'You should not access this file directly.'
);
}
global
$AppUI
;
$perms
=
$AppUI
->
acl
();
if
(
!
$perms
->
checkModuleItem
(
'timesheet'
,
'access'
))
{
$AppUI
->
redirect
(
ACCESS_DENIED
);
}
// Which tab do we need to show?
$tab
=
$AppUI
->
processIntState
(
'timesheetIdxTab'
,
$_GET
,
'tab'
,
0
);
// we check for permissions on this module
// we check for permissions on this module
$canRead
=
!
getDenyRead
(
$m
);
$canRead
=
$perms
->
checkModule
(
$m
,
'view'
);
$canEdit
=
!
getDenyEdit
(
$m
);
$canEdit
=
$perms
->
checkModule
(
$m
,
'edit'
);
$canDelete
=
$perms
->
checkModule
(
$m
,
'delete'
);
$canDelete
=
$perms
->
checkModule
(
$m
,
'delete'
);
// lock out users that do not have at least readPermission on this module
// lock out users that do not have at least readPermission on this module
if
(
!
$canRead
)
{
if
(
!
$canRead
)
{
$AppUI
->
redirect
(
"m=public&a=access_denied"
);
$AppUI
->
redirect
(
"m=public&a=access_denied"
);
}
}
//save the workplace state (have a footprint on this site)
$AppUI
->
savePlace
();
// saves the current tab box state
if
(
isset
(
$_GET
[
'tab'
]
))
{
$AppUI
->
setState
(
'TimesheetIdxTab'
,
$_GET
[
'tab'
]
);
}
$tab
=
$AppUI
->
getState
(
'TimesheetIdxTab'
)
!==
NULL
?
$AppUI
->
getState
(
'TimesheetIdxTab'
)
:
0
;
$active
=
intval
(
!
$AppUI
->
getState
(
'TimesheetIdxTab'
)
);
// we prepare the User Interface Design with the dPFramework
// setup the title block with Name, Icon and Help
// setup the title block with Name, Icon and Help
$titleBlock
=
new
C
TitleBlock
(
'Timesheet'
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
=
new
w2p_Theme_
TitleBlock
(
'Timesheet'
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
->
addCell
();
$titleBlock
->
addCell
();
// adding the 'add'-Button if user has writePermissions
// adding the 'add'-Button if user has writePermissions
...
@@ -54,13 +56,13 @@ if ($canEdit) {
...
@@ -54,13 +56,13 @@ if ($canEdit) {
}
}
$titleBlock
->
show
();
$titleBlock
->
show
();
// now prepare and show the tabbed information boxes
with the dPFramework
// now prepare and show the tabbed information boxes
// The Period default for the timesheets (month,week)
// The Period default for the timesheets (month,week)
// $period = $AppUI->getPref('TIMESHEET_PERIOD');
// $period = $AppUI->getPref('TIMESHEET_PERIOD');
// build new tab box object
// build new tab box object
$tabBox
=
new
CTabBox
(
"?m=
timesheet"
,
dPgetConfig
(
'root_dir'
)
.
"/modules/timesheet/"
,
$tab
);
$tabBox
=
new
CTabBox
(
"?m=
$m
"
,
W2P_BASE_DIR
.
"/modules/
$m
/"
,
$tab
);
$tabBox
->
add
(
'vw_idx_timesheets'
,
'All timesheets'
);
$tabBox
->
add
(
'vw_idx_timesheets'
,
'All timesheets'
);
$tabBox
->
add
(
'vw_idx_open'
,
'Open timesheets'
);
$tabBox
->
add
(
'vw_idx_open'
,
'Open timesheets'
);
$tabBox
->
add
(
'vw_idx_submitted'
,
'Submitted timesheets'
);
$tabBox
->
add
(
'vw_idx_submitted'
,
'Submitted timesheets'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment