Code Monkey home page Code Monkey logo

modules-holiday's Introduction

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-holiday's People

Contributors

sasquatch58 avatar

Watchers

 avatar

modules-holiday's Issues

Can not delete holidays when added without a description

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 />

Admin can not edit user holidays

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')) {

V3.1-pre compatibility

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.