sasquatch58 / modules-holiday Goto Github PK
View Code? Open in Web Editor NEWweb2project holiday module. Also known as "Working Time", this has been working under w2p v2.4 and a few issues to be resolved for v3.0 or better
License: Other
web2project holiday module. Also known as "Working Time", this has been working under w2p v2.4 and a few issues to be resolved for v3.0 or better
License: Other
Holiday 2.1 Adapted for use in w2p v3.0 and above by Sasquatch - updated class calls - additions and corrections for NZ holidays as at 2013-12 Holiday 2.0 Adapted for NZ Holidays by Sasquatch Holiday 0.3 (original) CaseySoftware, LLC [email protected] The Holiday module uses the PEAR library for calculating holidays. Additionally, it features a whitelist & blacklist for adding custom holidays based on additional requirements, etc. The goal is to allow for more advanced calculation of workhours and project dates, etc. The original version of this module was developed by Vegard Fiksdal <[email protected]> of Sensorlink and acknowledged in license.txt COMPATIBLE VERSIONS ===================================== * This module is being developed specifically for Web2project v2.1+. It is unknown if it is compatible with any previous versions. It is not compatible with any version of dotProject and no future releases will support dotProject. KNOWN/PREVIOUS ISSUES ===================================== From 0.2: * This module was originally developed for dotProject in December 2008. INSTALL ===================================== 1. To install this module, please follow the standard module installation procedure. Download the latest version from github and unzip this directory into your web2project/modules directory. 2. Select to System Admin -> View Modules and you should see "holiday" near the bottom of the list. 3. On the "Holiday" row, select "install". The screen should refresh. Now select "hidden" and then "disabled" to make it display in your module navigation. 4. The Holiday module is automatically supported by w2p date class.
Modules like Timecard pick up on Public and User holidays but trhe main calendar does not as far as display is concerned.
This works (displays in calendar) in V2.4 but nothing more recent
If someone adds new holidays and does not select one of the radio buttons for holiday_description, the holidays are successfully added to the database. But it is not possible to undo this by using the "add to working days" button.
There should be several ways to fix this. I choose to add a checked="checked" string for the first element in the radio button list like this in holiday.php line 361:
<?php $first = true; ?>
<?php foreach ($user_holiday_types as $key => $user_holiday_type) { ?>
<input type="radio" name="holiday_description" <?php if($first) {$first = false; echo 'checked="checked"'; } ?> value="<?php echo $AppUI->_($user_holiday_type)?>"/><?php echo $AppUI->_($user_holiday_type)?><br />
With web2Project 3.3 an administrator can not edit user holidays. This is caused by a wrong permission check in holiday.php line 248.
The 'admin'-module is no longer available and therefor, the check always results in a missing permission.
<?php if (canEdit('admin')) {
To solve this problem just check against another edit permission, for example
<?php if (canEdit('users')) {
Current testing only gives access to the "User Holidays" tab and not the "Company Working Time" tab - a permissions issue somewhere.
Works fine in V3.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.