fixed import error with version is ignored.
@ -32,7 +32,7 @@ Would you require more help VDM.io has a number of support plans available [visi
|
||||
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
|
||||
+ *Name*: [Component Builder] (https://www.vdm.io/joomla-component-builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 4th March, 2016
|
||||
+ *Last Build*: 10th March, 2016
|
||||
+ *Version*: 2.1.2
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
@ -45,7 +45,7 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **80445**
|
||||
+ *Line count*: **80459**
|
||||
+ *File count*: **494**
|
||||
+ *Folder count*: **97**
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_view.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_views.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage component.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage components.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_view.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_views.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dashboard.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_get.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_gets.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage field.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fields.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtype.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtypes.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_document.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_documents.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layout.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layouts.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_view.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_views.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippet.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippets.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage template.css
|
||||
|
@ -10,7 +10,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.2
|
||||
@build 4th March, 2016
|
||||
@build 10th March, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage templates.css
|
||||
|
340
admin/compiler/com_costbenefitprojection_v3_3_8__J3/LICENSE.txt
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -0,0 +1,34 @@
|
||||
# Cost Benefit Projection (3.3.8)
|
||||
|
||||
This is a [Joomla 3.x] (http://www.joomla.org/) component.
|
||||
|
||||
![Cost Benefit Projection image] (https://raw.githubusercontent.com/namibia/CBP-Joomla-3-Component/master/admin/assets/images/component-300.png "The Cost Benefit Projection")
|
||||
|
||||
[Create Epidemiological Profiles] (https://www.staffhealthcbp.com/) for diseases and risks affecting your company. Detailed information on projected work days lost and costs. Create and edit activities and wellness responses for your workplace. Access to Small Business Modelling. Results displayed by gender. Network with other companies and wellness professionals.
|
||||
|
||||
Having seen the health priorities for your workforce, the tool outputs projections for how the interventions – which you have designed - are expected to benefit the company financially.
|
||||
|
||||
Benefits are calculated based on the model projecting reductions in workdays lost due to sickness, presenteeism and death.
|
||||
|
||||
# Requirements
|
||||
|
||||
Due to the size of the permissional structure, you will need to increase max_input_vars until the permissions are able to save.
|
||||
```
|
||||
max_input_vars = 5000
|
||||
```
|
||||
# Build Details
|
||||
|
||||
+ *Company*: [Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb] (https://www.staffhealthcbp.com/)
|
||||
+ *Author*: [Llewellyn van der Merwe] (mailto:llewellyn@vdm.io)
|
||||
+ *Name*: [Cost Benefit Projection] (https://www.staffhealthcbp.com/)
|
||||
+ *First Build*: 15th June, 2012
|
||||
+ *Last Build*: 10th March, 2016
|
||||
+ *Version*: 3.3.8
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **83686**
|
||||
+ *File count*: **554**
|
||||
+ *Folder count*: **101**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
|
||||
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)
|
@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<access component="com_costbenefitprojection">
|
||||
<section name="component">
|
||||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
|
||||
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" />
|
||||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
|
||||
<action name="core.export" title="COM_COSTBENEFITPROJECTION_EXPORT_DATA" description="COM_COSTBENEFITPROJECTION_EXPORT_DATA_DESC" />
|
||||
<action name="core.import" title="COM_COSTBENEFITPROJECTION_IMPORT_DATA" description="COM_COSTBENEFITPROJECTION_IMPORT_DATA_DESC" />
|
||||
<action name="core.batch" title="COM_COSTBENEFITPROJECTION_USE_BATCH" description="COM_COSTBENEFITPROJECTION_USE_BATCH_DESC" />
|
||||
<action name="core.version" title="COM_COSTBENEFITPROJECTION_EDIT_VERSIONS" description="COM_COSTBENEFITPROJECTION_EDIT_VERSIONS_DESC" />
|
||||
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
|
||||
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
|
||||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
|
||||
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_ACCESS_EDITSTATE_DESC" />
|
||||
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
|
||||
<action name="core.edit.created_by" title="COM_COSTBENEFITPROJECTION_EDIT_CREATED_BY" description="COM_COSTBENEFITPROJECTION_EDIT_CREATED_BY_DESC" />
|
||||
<action name="core.edit.created" title="COM_COSTBENEFITPROJECTION_EDIT_CREATED_DATE" description="COM_COSTBENEFITPROJECTION_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="causerisk.access" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS_DESC" />
|
||||
<action name="causerisk.batch" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_BATCH_USE_DESC" />
|
||||
<action name="causerisk.create" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE_DESC" />
|
||||
<action name="causerisk.dashboard_add" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_ADD" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_ADD_DESC" />
|
||||
<action name="causerisk.dashboard_list" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DASHBOARD_LIST_DESC" />
|
||||
<action name="causerisk.delete" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE_DESC" />
|
||||
<action name="causerisk.edit" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_DESC" />
|
||||
<action name="causerisk.edit.own" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN_DESC" />
|
||||
<action name="causerisk.edit.state" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE_DESC" />
|
||||
<action name="causerisk.version" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION_DESC" />
|
||||
<action name="causerisk.export" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EXPORT" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EXPORT_DESC" />
|
||||
<action name="causerisk.import" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_IMPORT" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_IMPORT_DESC" />
|
||||
<action name="causerisk.submenu" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_SUBMENU" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_SUBMENU_DESC" />
|
||||
<action name="combinedresults.access" title="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS" description="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_DESC" />
|
||||
<action name="site.combinedresults.access" title="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE" description="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_ACCESS_SITE_DESC" />
|
||||
<action name="combinedresults.companies" title="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_COMPANIES_BUTTON_ACCESS" description="COM_COSTBENEFITPROJECTION_COMBINED_RESULTS_COMPANIES_BUTTON_ACCESS_DESC" />
|
||||
<action name="company.access" title="COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS" description="COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS_DESC" />
|
||||
<action name="company.batch" title="COM_COSTBENEFITPROJECTION_COMPANIES_BATCH_USE" description="COM_COSTBENEFITPROJECTION_COMPANIES_BATCH_USE_DESC" />
|
||||
<action name="company.create" title="COM_COSTBENEFITPROJECTION_COMPANIES_CREATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_CREATE_DESC" />
|
||||
<action name="company.dashboard_add" title="COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_ADD" description="COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_ADD_DESC" />
|
||||
<action name="company.dashboard_list" title="COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_COMPANIES_DASHBOARD_LIST_DESC" />
|
||||
<action name="company.delete" title="COM_COSTBENEFITPROJECTION_COMPANIES_DELETE" description="COM_COSTBENEFITPROJECTION_COMPANIES_DELETE_DESC" />
|
||||
<action name="company.edit" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DESC" />
|
||||
<action name="company.edit.causesrisks" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS_DESC" />
|
||||
<action name="company.edit.country" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY_DESC" />
|
||||
<action name="company.edit.created_by" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY_DESC" />
|
||||
<action name="company.edit.created" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="company.edit.datayear" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR_DESC" />
|
||||
<action name="company.edit.department" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT_DESC" />
|
||||
<action name="company.edit.email" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL_DESC" />
|
||||
<action name="company.edit.own" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN_DESC" />
|
||||
<action name="company.edit.per" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER_DESC" />
|
||||
<action name="company.edit.percentfemale" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE_DESC" />
|
||||
<action name="company.edit.percentmale" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE_DESC" />
|
||||
<action name="company.edit.service_provider" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER_DESC" />
|
||||
<action name="company.edit.state" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE_DESC" />
|
||||
<action name="company.edit.user" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER_DESC" />
|
||||
<action name="company.version" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION_DESC" />
|
||||
<action name="company.export" title="COM_COSTBENEFITPROJECTION_COMPANIES_EXPORT" description="COM_COSTBENEFITPROJECTION_COMPANIES_EXPORT_DESC" />
|
||||
<action name="company.import" title="COM_COSTBENEFITPROJECTION_COMPANIES_IMPORT" description="COM_COSTBENEFITPROJECTION_COMPANIES_IMPORT_DESC" />
|
||||
<action name="company.submenu" title="COM_COSTBENEFITPROJECTION_COMPANIES_SUBMENU" description="COM_COSTBENEFITPROJECTION_COMPANIES_SUBMENU_DESC" />
|
||||
<action name="companyresults.access" title="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS" description="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_DESC" />
|
||||
<action name="site.companyresults.access" title="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE" description="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_ACCESS_SITE_DESC" />
|
||||
<action name="companyresults.companies" title="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_COMPANIES_BUTTON_ACCESS" description="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_COMPANIES_BUTTON_ACCESS_DESC" />
|
||||
<action name="companyresults.edit" title="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_EDIT_BUTTON_ACCESS" description="COM_COSTBENEFITPROJECTION_COMPANY_RESULTS_EDIT_BUTTON_ACCESS_DESC" />
|
||||
<action name="country.access" title="COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS" description="COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS_DESC" />
|
||||
<action name="country.batch" title="COM_COSTBENEFITPROJECTION_COUNTRIES_BATCH_USE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_BATCH_USE_DESC" />
|
||||
<action name="country.create" title="COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE_DESC" />
|
||||
<action name="country.dashboard_list" title="COM_COSTBENEFITPROJECTION_COUNTRIES_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_COUNTRIES_DASHBOARD_LIST_DESC" />
|
||||
<action name="country.delete" title="COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE_DESC" />
|
||||
<action name="country.edit" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_DESC" />
|
||||
<action name="country.edit.own" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN_DESC" />
|
||||
<action name="country.edit.state" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE_DESC" />
|
||||
<action name="country.version" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION_DESC" />
|
||||
<action name="country.export" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EXPORT" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EXPORT_DESC" />
|
||||
<action name="country.import" title="COM_COSTBENEFITPROJECTION_COUNTRIES_IMPORT" description="COM_COSTBENEFITPROJECTION_COUNTRIES_IMPORT_DESC" />
|
||||
<action name="country.submenu" title="COM_COSTBENEFITPROJECTION_COUNTRIES_SUBMENU" description="COM_COSTBENEFITPROJECTION_COUNTRIES_SUBMENU_DESC" />
|
||||
<action name="site.cpanel.access" title="COM_COSTBENEFITPROJECTION_CPANEL_ACCESS_SITE" description="COM_COSTBENEFITPROJECTION_CPANEL_ACCESS_SITE_DESC" />
|
||||
<action name="site.createaccount.access" title="COM_COSTBENEFITPROJECTION_CREATE_ACCOUNT_GIZ_ACCESS_SITE" description="COM_COSTBENEFITPROJECTION_CREATE_ACCOUNT_GIZ_ACCESS_SITE_DESC" />
|
||||
<action name="currency.access" title="COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS" description="COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS_DESC" />
|
||||
<action name="currency.batch" title="COM_COSTBENEFITPROJECTION_CURRENCIES_BATCH_USE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_BATCH_USE_DESC" />
|
||||
<action name="currency.create" title="COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE_DESC" />
|
||||
<action name="currency.dashboard_list" title="COM_COSTBENEFITPROJECTION_CURRENCIES_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_CURRENCIES_DASHBOARD_LIST_DESC" />
|
||||
<action name="currency.delete" title="COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE_DESC" />
|
||||
<action name="currency.edit" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_DESC" />
|
||||
<action name="currency.edit.own" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN_DESC" />
|
||||
<action name="currency.edit.state" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE_DESC" />
|
||||
<action name="currency.version" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION_DESC" />
|
||||
<action name="currency.export" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EXPORT" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EXPORT_DESC" />
|
||||
<action name="currency.import" title="COM_COSTBENEFITPROJECTION_CURRENCIES_IMPORT" description="COM_COSTBENEFITPROJECTION_CURRENCIES_IMPORT_DESC" />
|
||||
<action name="currency.submenu" title="COM_COSTBENEFITPROJECTION_CURRENCIES_SUBMENU" description="COM_COSTBENEFITPROJECTION_CURRENCIES_SUBMENU_DESC" />
|
||||
<action name="health_data.access" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS_DESC" />
|
||||
<action name="health_data.batch" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_BATCH_USE_DESC" />
|
||||
<action name="health_data.create" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE_DESC" />
|
||||
<action name="health_data.dashboard_list" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DASHBOARD_LIST_DESC" />
|
||||
<action name="health_data.delete" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE_DESC" />
|
||||
<action name="health_data.edit" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_DESC" />
|
||||
<action name="health_data.edit.causerisk" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK_DESC" />
|
||||
<action name="health_data.edit.country" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY_DESC" />
|
||||
<action name="health_data.edit.femaledeath" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH_DESC" />
|
||||
<action name="health_data.edit.femaleyld" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD_DESC" />
|
||||
<action name="health_data.edit.maledeath" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH_DESC" />
|
||||
<action name="health_data.edit.maleyld" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD_DESC" />
|
||||
<action name="health_data.edit.own" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN_DESC" />
|
||||
<action name="health_data.edit.state" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE_DESC" />
|
||||
<action name="health_data.version" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION_DESC" />
|
||||
<action name="health_data.edit.year" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR_DESC" />
|
||||
<action name="health_data.export" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EXPORT" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EXPORT_DESC" />
|
||||
<action name="health_data.import" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_IMPORT" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_IMPORT_DESC" />
|
||||
<action name="health_data.submenu" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_SUBMENU" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_SUBMENU_DESC" />
|
||||
<action name="help_document.access" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS_DESC" />
|
||||
<action name="help_document.batch" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_BATCH_USE_DESC" />
|
||||
<action name="help_document.create" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE_DESC" />
|
||||
<action name="help_document.dashboard_list" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DASHBOARD_LIST_DESC" />
|
||||
<action name="help_document.delete" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE_DESC" />
|
||||
<action name="help_document.edit" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_DESC" />
|
||||
<action name="help_document.edit.own" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN_DESC" />
|
||||
<action name="help_document.edit.state" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE_DESC" />
|
||||
<action name="help_document.version" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION_DESC" />
|
||||
<action name="help_document.export" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EXPORT" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EXPORT_DESC" />
|
||||
<action name="help_document.import" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_IMPORT" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_IMPORT_DESC" />
|
||||
<action name="help_document.submenu" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_SUBMENU_DESC" />
|
||||
<action name="intervention.access" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS_DESC" />
|
||||
<action name="intervention.batch" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_BATCH_USE_DESC" />
|
||||
<action name="intervention.create" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE_DESC" />
|
||||
<action name="intervention.dashboard_add" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_ADD" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_ADD_DESC" />
|
||||
<action name="intervention.dashboard_list" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DASHBOARD_LIST_DESC" />
|
||||
<action name="intervention.delete" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE_DESC" />
|
||||
<action name="intervention.edit" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_DESC" />
|
||||
<action name="intervention.edit.own" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN_DESC" />
|
||||
<action name="intervention.edit.state" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE_DESC" />
|
||||
<action name="intervention.version" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION_DESC" />
|
||||
<action name="intervention.export" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EXPORT" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EXPORT_DESC" />
|
||||
<action name="intervention.import" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_IMPORT" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_IMPORT_DESC" />
|
||||
<action name="intervention.submenu" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_SUBMENU" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_SUBMENU_DESC" />
|
||||
<action name="site.publicresults.access" title="COM_COSTBENEFITPROJECTION_PUBLIC_RESULTS_ACCESS_SITE" description="COM_COSTBENEFITPROJECTION_PUBLIC_RESULTS_ACCESS_SITE_DESC" />
|
||||
<action name="scaling_factor.access" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS_DESC" />
|
||||
<action name="scaling_factor.batch" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_BATCH_USE_DESC" />
|
||||
<action name="scaling_factor.create" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE_DESC" />
|
||||
<action name="scaling_factor.dashboard_add" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_ADD" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_ADD_DESC" />
|
||||
<action name="scaling_factor.dashboard_list" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DASHBOARD_LIST_DESC" />
|
||||
<action name="scaling_factor.delete" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE_DESC" />
|
||||
<action name="scaling_factor.edit" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_DESC" />
|
||||
<action name="scaling_factor.edit.own" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN_DESC" />
|
||||
<action name="scaling_factor.edit.state" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE_DESC" />
|
||||
<action name="scaling_factor.version" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION_DESC" />
|
||||
<action name="scaling_factor.export" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EXPORT" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EXPORT_DESC" />
|
||||
<action name="scaling_factor.import" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_IMPORT" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_IMPORT_DESC" />
|
||||
<action name="scaling_factor.submenu" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_SUBMENU" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_SUBMENU_DESC" />
|
||||
<action name="service_provider.access" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS_DESC" />
|
||||
<action name="service_provider.batch" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_BATCH_USE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_BATCH_USE_DESC" />
|
||||
<action name="service_provider.create" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE_DESC" />
|
||||
<action name="service_provider.dashboard_add" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_ADD" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_ADD_DESC" />
|
||||
<action name="service_provider.dashboard_list" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_LIST" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DASHBOARD_LIST_DESC" />
|
||||
<action name="service_provider.delete" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE_DESC" />
|
||||
<action name="service_provider.edit" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_DESC" />
|
||||
<action name="service_provider.edit.own" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN_DESC" />
|
||||
<action name="service_provider.edit.state" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE_DESC" />
|
||||
<action name="service_provider.version" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION_DESC" />
|
||||
<action name="service_provider.export" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EXPORT" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EXPORT_DESC" />
|
||||
<action name="service_provider.import" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_IMPORT" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_IMPORT_DESC" />
|
||||
<action name="service_provider.submenu" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_SUBMENU" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_SUBMENU_DESC" />
|
||||
</section>
|
||||
<section name="company">
|
||||
<action name="company.edit" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DESC" />
|
||||
<action name="company.edit.own" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_OWN_DESC" />
|
||||
<action name="company.edit.state" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_STATE_DESC" />
|
||||
<action name="company.edit.created_by" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_BY_DESC" />
|
||||
<action name="company.edit.created" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="company.create" title="COM_COSTBENEFITPROJECTION_COMPANIES_CREATE" description="COM_COSTBENEFITPROJECTION_COMPANIES_CREATE_DESC" />
|
||||
<action name="company.delete" title="COM_COSTBENEFITPROJECTION_COMPANIES_DELETE" description="COM_COSTBENEFITPROJECTION_COMPANIES_DELETE_DESC" />
|
||||
<action name="company.access" title="COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS" description="COM_COSTBENEFITPROJECTION_COMPANIES_ACCESS_DESC" />
|
||||
<action name="company.edit.email" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_EMAIL_DESC" />
|
||||
<action name="company.edit.user" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_USER_DESC" />
|
||||
<action name="company.edit.department" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DEPARTMENT_DESC" />
|
||||
<action name="company.edit.country" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_COUNTRY_DESC" />
|
||||
<action name="company.edit.service_provider" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_SERVICE_PROVIDER_DESC" />
|
||||
<action name="company.edit.per" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PER_DESC" />
|
||||
<action name="company.edit.percentfemale" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTFEMALE_DESC" />
|
||||
<action name="company.edit.causesrisks" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_CAUSESRISKS_DESC" />
|
||||
<action name="company.edit.datayear" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_DATAYEAR_DESC" />
|
||||
<action name="company.edit.percentmale" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_PERCENTMALE_DESC" />
|
||||
<action name="company.version" title="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_COMPANIES_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="service_provider">
|
||||
<action name="service_provider.edit" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_DESC" />
|
||||
<action name="service_provider.edit.own" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_OWN_DESC" />
|
||||
<action name="service_provider.edit.state" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_STATE_DESC" />
|
||||
<action name="service_provider.create" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_CREATE_DESC" />
|
||||
<action name="service_provider.delete" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_DELETE_DESC" />
|
||||
<action name="service_provider.access" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_ACCESS_DESC" />
|
||||
<action name="service_provider.version" title="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="country">
|
||||
<action name="country.edit" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_DESC" />
|
||||
<action name="country.edit.own" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_OWN_DESC" />
|
||||
<action name="country.edit.state" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_STATE_DESC" />
|
||||
<action name="country.create" title="COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_CREATE_DESC" />
|
||||
<action name="country.delete" title="COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE" description="COM_COSTBENEFITPROJECTION_COUNTRIES_DELETE_DESC" />
|
||||
<action name="country.access" title="COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS" description="COM_COSTBENEFITPROJECTION_COUNTRIES_ACCESS_DESC" />
|
||||
<action name="country.version" title="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_COUNTRIES_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="causerisk">
|
||||
<action name="causerisk.edit" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_DESC" />
|
||||
<action name="causerisk.edit.own" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_OWN_DESC" />
|
||||
<action name="causerisk.edit.state" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_STATE_DESC" />
|
||||
<action name="causerisk.create" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_CREATE_DESC" />
|
||||
<action name="causerisk.delete" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_DELETE_DESC" />
|
||||
<action name="causerisk.access" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_ACCESS_DESC" />
|
||||
<action name="causerisk.version" title="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_CAUSESRISKS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="health_data">
|
||||
<action name="health_data.edit" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_DESC" />
|
||||
<action name="health_data.edit.own" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_OWN_DESC" />
|
||||
<action name="health_data.edit.state" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_STATE_DESC" />
|
||||
<action name="health_data.create" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_CREATE_DESC" />
|
||||
<action name="health_data.delete" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_DELETE_DESC" />
|
||||
<action name="health_data.access" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_ACCESS_DESC" />
|
||||
<action name="health_data.edit.causerisk" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_CAUSERISK_DESC" />
|
||||
<action name="health_data.edit.year" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_YEAR_DESC" />
|
||||
<action name="health_data.edit.country" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_COUNTRY_DESC" />
|
||||
<action name="health_data.edit.femaledeath" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEDEATH_DESC" />
|
||||
<action name="health_data.edit.maleyld" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEYLD_DESC" />
|
||||
<action name="health_data.edit.maledeath" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_MALEDEATH_DESC" />
|
||||
<action name="health_data.edit.femaleyld" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_FEMALEYLD_DESC" />
|
||||
<action name="health_data.version" title="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="scaling_factor">
|
||||
<action name="scaling_factor.edit" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_DESC" />
|
||||
<action name="scaling_factor.edit.own" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_OWN_DESC" />
|
||||
<action name="scaling_factor.edit.state" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_STATE_DESC" />
|
||||
<action name="scaling_factor.create" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_CREATE_DESC" />
|
||||
<action name="scaling_factor.delete" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_DELETE_DESC" />
|
||||
<action name="scaling_factor.access" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_ACCESS_DESC" />
|
||||
<action name="scaling_factor.version" title="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_SCALING_FACTORS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="intervention">
|
||||
<action name="intervention.edit" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_DESC" />
|
||||
<action name="intervention.edit.own" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_OWN_DESC" />
|
||||
<action name="intervention.edit.state" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_STATE_DESC" />
|
||||
<action name="intervention.create" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_CREATE_DESC" />
|
||||
<action name="intervention.delete" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_DELETE_DESC" />
|
||||
<action name="intervention.access" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_ACCESS_DESC" />
|
||||
<action name="intervention.version" title="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_INTERVENTIONS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="currency">
|
||||
<action name="currency.edit" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_DESC" />
|
||||
<action name="currency.edit.own" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_OWN_DESC" />
|
||||
<action name="currency.edit.state" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_STATE_DESC" />
|
||||
<action name="currency.create" title="COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_CREATE_DESC" />
|
||||
<action name="currency.delete" title="COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE" description="COM_COSTBENEFITPROJECTION_CURRENCIES_DELETE_DESC" />
|
||||
<action name="currency.access" title="COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS" description="COM_COSTBENEFITPROJECTION_CURRENCIES_ACCESS_DESC" />
|
||||
<action name="currency.version" title="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_CURRENCIES_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
<section name="help_document">
|
||||
<action name="help_document.edit" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_DESC" />
|
||||
<action name="help_document.edit.own" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_OWN_DESC" />
|
||||
<action name="help_document.edit.state" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_STATE_DESC" />
|
||||
<action name="help_document.create" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_CREATE_DESC" />
|
||||
<action name="help_document.delete" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_DELETE_DESC" />
|
||||
<action name="help_document.access" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_ACCESS_DESC" />
|
||||
<action name="help_document.version" title="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION" description="COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
</access>
|
@ -0,0 +1,23 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage admin.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
.no-click {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage causerisk.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage causesrisks.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,210 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage combinedresults.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
/* ---- Table ---- */
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
margin-bottom:15px;
|
||||
width:90%;
|
||||
}
|
||||
|
||||
caption {
|
||||
text-align:left;
|
||||
font-size:15px;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
table td,
|
||||
table th {
|
||||
padding:5px;
|
||||
border:1px solid #fff;
|
||||
border-width:0 1px 1px 0;
|
||||
}
|
||||
|
||||
thead th {
|
||||
background:#52AED8;
|
||||
}
|
||||
|
||||
thead th[colspan],
|
||||
thead th[rowspan] {
|
||||
background:#0094DC;
|
||||
}
|
||||
|
||||
tbody th,
|
||||
tfoot th {
|
||||
text-align:left;
|
||||
background:#52AED8;
|
||||
}
|
||||
|
||||
tbody td,
|
||||
tfoot td {
|
||||
/*text-align:center;*/
|
||||
background:#d5eaf0;
|
||||
}
|
||||
|
||||
tfoot th {
|
||||
background:#b0cc7f;
|
||||
}
|
||||
|
||||
tfoot td {
|
||||
background:#d7e1c5;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
tbody tr.odd td {
|
||||
background:#bcd9e1;
|
||||
}
|
||||
|
||||
th.sort-header {
|
||||
cursor:pointer;
|
||||
}
|
||||
th.sort-header::-moz-selection,
|
||||
th.sort-header::selection {
|
||||
background:transparent;
|
||||
}
|
||||
table th.sort-header:after {
|
||||
content:'';
|
||||
float:right;
|
||||
margin-top:7px;
|
||||
border-width:0 4px 4px;
|
||||
border-style:solid;
|
||||
border-color:#404040 transparent;
|
||||
visibility:hidden;
|
||||
}
|
||||
table th.sort-header:hover:after {
|
||||
visibility:visible;
|
||||
}
|
||||
table th.sort-up:after,
|
||||
table th.sort-down:after,
|
||||
table th.sort-down:hover:after {
|
||||
visibility:visible;
|
||||
opacity:0.4;
|
||||
}
|
||||
table th.sort-up:after {
|
||||
border-bottom:none;
|
||||
border-width:4px 4px 0;
|
||||
}
|
||||
|
||||
#st-container{
|
||||
position:relative;
|
||||
}
|
||||
.navButton{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 1px;
|
||||
}
|
||||
.note_menu{
|
||||
color: #63B1F2;
|
||||
font-size: 10px;
|
||||
height: 30px;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
width: 120px;
|
||||
left: 45px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
/* ---- Switch ---- */
|
||||
|
||||
.switchbox{
|
||||
position:absolute;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
height: 28px;
|
||||
}
|
||||
.label {
|
||||
color: #63B1F2;
|
||||
font-size: 15px;
|
||||
line-height: 16px;
|
||||
float: left;
|
||||
padding: 0 25px 0 7px;
|
||||
}
|
||||
|
||||
.switch {
|
||||
height: 28px;
|
||||
width: 77px;
|
||||
border: 1px solid #979797;
|
||||
border-radius: 20px;
|
||||
margin-top: -5px;
|
||||
box-shadow: inset 0 1px 3px #BABABA, inset 0 12px 3px 2px rgba(232, 232, 232, 0.5);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
.switch.on::before {
|
||||
width: 77px;
|
||||
}
|
||||
.switch::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 28px;
|
||||
width: 0px;
|
||||
position: absolute;
|
||||
border-radius: 20px;
|
||||
box-shadow: inset 0 1px 2px #0063B7, inset 0 12px 3px 2px rgba(0, 127, 234, 0.5);
|
||||
background-color: #64B1F2;
|
||||
}
|
||||
.switch input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
.switch > .thumb {
|
||||
display: block;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
border: solid 1px #919191;
|
||||
border-radius: 28px;
|
||||
box-shadow: inset 0 2px 1px white, inset 0 -2px 1px white;
|
||||
background-color: #CECECE;
|
||||
background-image: linear-gradient(top, #CECECE, #FBFBFB);
|
||||
transition: all 0.125s ease-in-out;
|
||||
transform: translate3d(0,0,0);
|
||||
}
|
||||
.switch.on > .thumb {
|
||||
-webkit-transform: translate3d(49px,0,0);
|
||||
-o-transform: translateX(49px);
|
||||
-moz-transform: translateX(49px);
|
||||
}
|
||||
.switch > .thumb::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 14px;
|
||||
width: 2px;
|
||||
background-color: white;
|
||||
box-shadow: 0px -1px 1px #666;
|
||||
border: none;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: -24px;
|
||||
}
|
||||
.switch > .thumb::after {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border-radius: 10px;
|
||||
border: solid 2px #777;
|
||||
position: absolute;
|
||||
right: -32px;
|
||||
top: 6px;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage companies.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage company.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
||||
input[type="checkbox"] {
|
||||
margin: 0 !important;
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage companyresults.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
/* ---- Table ---- */
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
margin-bottom:15px;
|
||||
width:90%;
|
||||
}
|
||||
|
||||
caption {
|
||||
text-align:left;
|
||||
font-size:15px;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
table td,
|
||||
table th {
|
||||
padding:5px;
|
||||
border:1px solid #fff;
|
||||
border-width:0 1px 1px 0;
|
||||
}
|
||||
|
||||
thead th {
|
||||
background:#52AED8;
|
||||
}
|
||||
|
||||
thead th[colspan],
|
||||
thead th[rowspan] {
|
||||
background:#0094DC;
|
||||
}
|
||||
|
||||
tbody th,
|
||||
tfoot th {
|
||||
text-align:left;
|
||||
background:#52AED8;
|
||||
}
|
||||
|
||||
tbody td,
|
||||
tfoot td {
|
||||
/*text-align:center;*/
|
||||
background:#d5eaf0;
|
||||
}
|
||||
|
||||
tfoot th {
|
||||
background:#b0cc7f;
|
||||
}
|
||||
|
||||
tfoot td {
|
||||
background:#d7e1c5;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
tbody tr.odd td {
|
||||
background:#bcd9e1;
|
||||
}
|
||||
|
||||
th.sort-header {
|
||||
cursor:pointer;
|
||||
}
|
||||
th.sort-header::-moz-selection,
|
||||
th.sort-header::selection {
|
||||
background:transparent;
|
||||
}
|
||||
table th.sort-header:after {
|
||||
content:'';
|
||||
float:right;
|
||||
margin-top:7px;
|
||||
border-width:0 4px 4px;
|
||||
border-style:solid;
|
||||
border-color:#404040 transparent;
|
||||
visibility:hidden;
|
||||
}
|
||||
table th.sort-header:hover:after {
|
||||
visibility:visible;
|
||||
}
|
||||
table th.sort-up:after,
|
||||
table th.sort-down:after,
|
||||
table th.sort-down:hover:after {
|
||||
visibility:visible;
|
||||
opacity:0.4;
|
||||
}
|
||||
table th.sort-up:after {
|
||||
border-bottom:none;
|
||||
border-width:4px 4px 0;
|
||||
}
|
||||
|
||||
#st-container{
|
||||
position:relative;
|
||||
}
|
||||
.navButton{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 1px;
|
||||
}
|
||||
.note_menu{
|
||||
color: #63B1F2;
|
||||
font-size: 10px;
|
||||
height: 30px;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
width: 120px;
|
||||
left: 45px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
/* ---- Switch ---- */
|
||||
|
||||
.switchbox{
|
||||
position:absolute;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
height: 28px;
|
||||
}
|
||||
.label {
|
||||
color: #63B1F2;
|
||||
font-size: 15px;
|
||||
line-height: 16px;
|
||||
float: left;
|
||||
padding: 0 25px 0 7px;
|
||||
}
|
||||
|
||||
.switch {
|
||||
height: 28px;
|
||||
width: 77px;
|
||||
border: 1px solid #979797;
|
||||
border-radius: 20px;
|
||||
margin-top: -5px;
|
||||
box-shadow: inset 0 1px 3px #BABABA, inset 0 12px 3px 2px rgba(232, 232, 232, 0.5);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
.switch.on::before {
|
||||
width: 77px;
|
||||
}
|
||||
.switch::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 28px;
|
||||
width: 0px;
|
||||
position: absolute;
|
||||
border-radius: 20px;
|
||||
box-shadow: inset 0 1px 2px #0063B7, inset 0 12px 3px 2px rgba(0, 127, 234, 0.5);
|
||||
background-color: #64B1F2;
|
||||
}
|
||||
.switch input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
.switch > .thumb {
|
||||
display: block;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
border: solid 1px #919191;
|
||||
border-radius: 28px;
|
||||
box-shadow: inset 0 2px 1px white, inset 0 -2px 1px white;
|
||||
background-color: #CECECE;
|
||||
background-image: linear-gradient(top, #CECECE, #FBFBFB);
|
||||
transition: all 0.125s ease-in-out;
|
||||
transform: translate3d(0,0,0);
|
||||
}
|
||||
.switch.on > .thumb {
|
||||
-webkit-transform: translate3d(49px,0,0);
|
||||
-o-transform: translateX(49px);
|
||||
-moz-transform: translateX(49px);
|
||||
}
|
||||
.switch > .thumb::before {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 14px;
|
||||
width: 2px;
|
||||
background-color: white;
|
||||
box-shadow: 0px -1px 1px #666;
|
||||
border: none;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: -24px;
|
||||
}
|
||||
.switch > .thumb::after {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border-radius: 10px;
|
||||
border: solid 2px #777;
|
||||
position: absolute;
|
||||
right: -32px;
|
||||
top: 6px;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage countries.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage country.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage currencies.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage currency.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,171 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage dashboard.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
.dashboard-container {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
width: auto;
|
||||
}
|
||||
.dashboard-container:before, .dashboard-container:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.dashboard-container:after {
|
||||
clear: both;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
float: left;
|
||||
min-height: 145px;
|
||||
min-width: 96px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"]:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.dashboard-wraper {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
padding: 3px;
|
||||
width: 17%;
|
||||
min-height: 194px;
|
||||
min-width: 96px;
|
||||
}
|
||||
.dashboard-content a {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
min-height: 89px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-content a:hover {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
color: hsl(200, 100%, 30%);
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-title {
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.dashboard-info {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info span {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.dashboard-table {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-info h5 {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.dashboard-block {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border-bottom: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px 3px 0 0;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
|
||||
height: 40px;
|
||||
position: relative;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head h5 {
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
padding-top: 11px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-box {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
|
||||
border-top: 1px solid hsl(0, 0%, 82%);
|
||||
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.dashboard-block-table {
|
||||
background-color: hsla(0, 0%, 0%, 0);
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom: 20px;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-block-table th, .dashboard-block-table td {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dashboard-badge {
|
||||
background-color: hsl(0, 0%, 60%);
|
||||
border-radius: 9px;
|
||||
color: hsl(0, 0%, 100%);
|
||||
font-size: 11.844px;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
padding: 1px 9px 2px;
|
||||
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage health_data.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage health_data_sets.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage help_document.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage help_documents.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,28 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage intervention.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
||||
.text_area{
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
.causewidth {
|
||||
width: 100%;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage interventions.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage scaling_factor.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
||||
.text_area{
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage scaling_factors.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage service_provider.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage service_providers.css
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 26 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 64 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,702 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<fieldset
|
||||
name="global_config"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_GLOBAL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_GLOBAL_DESC">
|
||||
<field
|
||||
name="check_in"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_DESC">
|
||||
<option
|
||||
value="-5 hours">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_ONE</option>
|
||||
<option
|
||||
value="-12 hours">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_TWO</option>
|
||||
<option
|
||||
value="-1 day">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_THREE</option>
|
||||
<option
|
||||
value="-2 day">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_FOUR</option>
|
||||
<option
|
||||
value="-1 week">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_FIVE</option>
|
||||
<option
|
||||
value="0">COM_COSTBENEFITPROJECTION_CONFIG_CHECK_TIMER_OPTION_SIX</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerAuthor" hr="true" />
|
||||
<field
|
||||
name="save_history"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"
|
||||
description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="history_limit"
|
||||
type="text"
|
||||
filter="integer"
|
||||
label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"
|
||||
description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"
|
||||
default="10"
|
||||
/>
|
||||
<field type="spacer" name="spacerHistory" hr="true" />
|
||||
<field name="autorTitle"
|
||||
type="spacer"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR"
|
||||
/>
|
||||
<field name="autorName"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Llewellyn van der Merwe"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
/>
|
||||
<field name="autorEmail"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_AUTHOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="llewellyn@vdm.io"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
/>
|
||||
<field type="spacer" name="spacerContributor1" hr="true" />
|
||||
<field name="contributor1"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_ONE"
|
||||
/>
|
||||
<field name="titleContributor1"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default="Health Economist"
|
||||
/>
|
||||
<field name="nameContributor1"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Patrick Hanlon, M.Sc. PH"
|
||||
/>
|
||||
<field name="emailContributor1"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="Patrick.Hanlon@unibas.ch"
|
||||
/>
|
||||
<field name="linkContributor1"
|
||||
type="url"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default="http://www.swisstph.ch/about-us/staff/detailview.html?tx_x4epersdb_pi1[showUid]=2267&cHash=1b1c5db0808e04d3f1afe0f3a3f67998"
|
||||
/>
|
||||
<field name="useContributor1"
|
||||
type="list"
|
||||
default="2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor1"
|
||||
type="list"
|
||||
default="3"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor2" hr="true" />
|
||||
<field name="contributor2"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TWO"
|
||||
/>
|
||||
<field name="titleContributor2"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default="Development Advisor"
|
||||
/>
|
||||
<field name="nameContributor2"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Matthew Black"
|
||||
/>
|
||||
<field name="emailContributor2"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="matthew.black@giz.de"
|
||||
/>
|
||||
<field name="linkContributor2"
|
||||
type="url"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default="http://www.giz.de"
|
||||
/>
|
||||
<field name="useContributor2"
|
||||
type="list"
|
||||
default="2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor2"
|
||||
type="list"
|
||||
default="3"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor3" hr="true" />
|
||||
<field name="contributor3"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_THREE"
|
||||
/>
|
||||
<field name="titleContributor3"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default="Associate Expert"
|
||||
/>
|
||||
<field name="nameContributor3"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Dr. Pascal Geldsetzer"
|
||||
/>
|
||||
<field name="emailContributor3"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="pascal.geldsetzer@giz.de"
|
||||
/>
|
||||
<field name="linkContributor3"
|
||||
type="url"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default="http://www.giz.de"
|
||||
/>
|
||||
<field name="useContributor3"
|
||||
type="list"
|
||||
default="2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor3"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor4" hr="true" />
|
||||
<field name="contributor4"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_FOUR"
|
||||
/>
|
||||
<field name="titleContributor4"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor4"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor4"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor4"
|
||||
type="url"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor4"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor4"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor5" hr="true" />
|
||||
<field name="contributor5"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_FIVE"
|
||||
/>
|
||||
<field name="titleContributor5"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor5"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor5"
|
||||
type="email"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor5"
|
||||
type="url"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor5"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor5"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COSTBENEFITPROJECTION_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="group_config"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_GROUPS_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_GROUPS_DESC">
|
||||
<field name="memberuser"
|
||||
type="usergroup"
|
||||
label="COM_COSTBENEFITPROJECTION_USER_MEMBER_GROUP"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_TARGET_GROUP_DESC"
|
||||
multiple="true"
|
||||
/>
|
||||
<field name="serviceprovideruser"
|
||||
type="usergroup"
|
||||
label="COM_COSTBENEFITPROJECTION_USER_SERVICE_PROVIDER_GROUP"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_TARGET_GROUP_DESC"
|
||||
multiple="true"
|
||||
/>
|
||||
<field name="countryuser"
|
||||
type="usergroup"
|
||||
label="COM_COSTBENEFITPROJECTION_USER_COUNTRY_GROUP"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_TARGET_GROUP_DESC"
|
||||
multiple="true"
|
||||
/>
|
||||
|
||||
<!-- Memberbasicgroup Field. Type: Usergroup. (joomla) -->
|
||||
<field
|
||||
type="usergroup"
|
||||
name="memberbasicgroup"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_MEMBERBASICGROUP_DESCRIPTION"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- Advancedmembergroup Field. Type: Usergroup. (joomla) -->
|
||||
<field
|
||||
type="usergroup"
|
||||
name="advancedmembergroup"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_ADVANCEDMEMBERGROUP_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_ADVANCEDMEMBERGROUP_DESCRIPTION"
|
||||
multiple="true"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="uikit_config"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_DESC">
|
||||
<field name="uikit_load"
|
||||
type="radio"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_LOAD_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_AUTO_LOAD</option>"
|
||||
<option value="1">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_FORCE_LOAD</option>"
|
||||
<option value="3">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_ONLY_EXTRA</option>"
|
||||
<option value="2">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_DONT_LOAD</option>"
|
||||
</field>
|
||||
<field name="uikit_min"
|
||||
type="radio"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_MIN_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_MIN_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_NO</option>"
|
||||
<option value=".min">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_YES</option>"
|
||||
</field>
|
||||
<field name="uikit_style"
|
||||
type="radio"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_UIKIT_STYLE_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_FLAT_LOAD</option>"
|
||||
<option value=".almost-flat">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_ALMOST_FLAT_LOAD</option>"
|
||||
<option value=".gradient">
|
||||
COM_COSTBENEFITPROJECTION_CONFIG_GRADIANT_LOAD</option>"
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="googlechart_config"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHART_SETTINGS_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHART_SETTINGS_DESC">
|
||||
|
||||
<field type="note" name="chart_admin_naote" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_ADMIN_CHART_NOTE_DESC" />
|
||||
<!-- Admin_chartbackground Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="admin_chartbackground"
|
||||
default="#F7F7FA"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
||||
/>
|
||||
<!-- Admin_mainwidth Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="admin_mainwidth"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add area width here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartadmin_hr_a Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartadmin_hr_a" hr="true" class="spacer_chartadmin_hr_a" />
|
||||
<!-- Admin_chartareatop Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="admin_chartareatop"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add top spacing here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
||||
/>
|
||||
<!-- Admin_chartarealeft Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="admin_chartarealeft"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add left spacing here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
||||
/>
|
||||
<!-- Admin_chartareawidth Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="admin_chartareawidth"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add chart width here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartadmin_hr_b Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartadmin_hr_b" hr="true" class="spacer_chartadmin_hr_b" />
|
||||
<!-- Admin_legendtextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="admin_legendtextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Admin_legendtextstylefontsize Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="admin_legendtextstylefontsize"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add size of the legend here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartadmin_hr_c Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartadmin_hr_c" hr="true" class="spacer_chartadmin_hr_c" />
|
||||
<!-- Admin_vaxistextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="admin_vaxistextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Spacer_chartadmin_hr_d Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartadmin_hr_d" hr="true" class="spacer_chartadmin_hr_d" />
|
||||
<!-- Admin_haxistextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="admin_haxistextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Admin_haxistitletextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="admin_haxistitletextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTITLETEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
|
||||
<field type="note" name="chart_site_note" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_SITE_CHART_NOTE_DESC" />
|
||||
|
||||
<!-- Site_chartbackground Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="site_chartbackground"
|
||||
default="#F7F7FA"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTBACKGROUND_DESC"
|
||||
/>
|
||||
<!-- Site_mainwidth Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="site_mainwidth"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add area width here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_MAINWIDTH_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartsite_hr_a Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartsite_hr_a" hr="true" class="spacer_chartsite_hr_a" />
|
||||
<!-- Site_chartareatop Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="site_chartareatop"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add top spacing here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREATOP_HINT"
|
||||
/>
|
||||
<!-- Site_chartarealeft Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="site_chartarealeft"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add left spacing here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREALEFT_HINT"
|
||||
/>
|
||||
<!-- Site_chartareawidth Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="site_chartareawidth"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add chart width here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_CHARTAREAWIDTH_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartsite_hr_b Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartsite_hr_b" hr="true" class="spacer_chartsite_hr_b" />
|
||||
<!-- Site_legendtextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="site_legendtextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Site_legendtextstylefontsize Field. Type: Text. -->
|
||||
<field
|
||||
type="text"
|
||||
name="site_legendtextstylefontsize"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_LABEL"
|
||||
size="20"
|
||||
maxlength="50"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_DESC"
|
||||
class="text_area"
|
||||
filter="INT"
|
||||
message="Error! Please add size of the legend here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_LEGENDTEXTSTYLEFONTSIZE_HINT"
|
||||
/>
|
||||
<!-- Spacer_chartsite_hr_c Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartsite_hr_c" hr="true" class="spacer_chartsite_hr_c" />
|
||||
<!-- Site_vaxistextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="site_vaxistextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_VAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Spacer_chartsite_hr_d Field. Type: Spacer. A None Database Field. -->
|
||||
<field type="spacer" name="spacer_chartsite_hr_d" hr="true" class="spacer_chartsite_hr_d" />
|
||||
<!-- Site_haxistextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="site_haxistextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
<!-- Site_haxistitletextstylefontcolor Field. Type: Color. -->
|
||||
<field
|
||||
type="color"
|
||||
name="site_haxistitletextstylefontcolor"
|
||||
default="#63B1F2"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_HAXISTITLETEXTSTYLEFONTCOLOR_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="encryption_config"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_ENCRYPTION_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_ENCRYPTION_DESC">
|
||||
<field type="note" name="vdm_key_note" class="alert alert-info" label="COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_NOTE_LABEL" description="COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_NOTE_DESC" />
|
||||
<field name="advanced_key"
|
||||
type="text"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_LABEL"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_VDM_KEY_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
|
||||
<!-- Resultpath Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="resultpath"
|
||||
label="COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_LABEL"
|
||||
size="10"
|
||||
maxlength="150"
|
||||
description="COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="PATH"
|
||||
message="Error! Please add the path where the result json should be sotred here."
|
||||
hint="COM_COSTBENEFITPROJECTION_CONFIG_RESULTPATH_HINT"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="permissions"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
description="JCONFIG_PERMISSIONS_DESC">
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
class="inputbox"
|
||||
validate="rules"
|
||||
filter="rules"
|
||||
component="com_costbenefitprojection"
|
||||
section="component"
|
||||
/>
|
||||
</fieldset>
|
||||
</config>
|
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage controller.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controller library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* General Controller of Costbenefitprojection component
|
||||
*/
|
||||
class CostbenefitprojectionController extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* display task
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
// set default view if not set
|
||||
$view = $this->input->getCmd('view', 'Costbenefitprojection');
|
||||
$data = $this->getViewRelation($view);
|
||||
$layout = $this->input->get('layout', null, 'WORD');
|
||||
$id = $this->input->getInt('id');
|
||||
|
||||
// Check for edit form.
|
||||
if(CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_costbenefitprojection.edit.'.$data['view'], $id))
|
||||
{
|
||||
// Somehow the person just went to the form - we don't allow that.
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
|
||||
$this->setMessage($this->getError(), 'error');
|
||||
// check if item was opend from other then its own list view
|
||||
$ref = $this->input->getCmd('ref', 0);
|
||||
$refid = $this->input->getInt('refid', 0);
|
||||
// set redirect
|
||||
if ($refid > 0 && CostbenefitprojectionHelper::checkString($ref))
|
||||
{
|
||||
// redirect to item of ref
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
|
||||
}
|
||||
elseif (CostbenefitprojectionHelper::checkString($ref))
|
||||
{
|
||||
|
||||
// redirect to ref
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.(string)$ref, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
// normal redirect back to the list view
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view='.$data['views'], false));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::display($cachable, $urlparams);
|
||||
}
|
||||
|
||||
protected function getViewRelation($view)
|
||||
{
|
||||
if (CostbenefitprojectionHelper::checkString($view))
|
||||
{
|
||||
$views = array(
|
||||
'company' => 'companies',
|
||||
'service_provider' => 'service_providers',
|
||||
'country' => 'countries',
|
||||
'causerisk' => 'causesrisks',
|
||||
'health_data' => 'health_data_sets',
|
||||
'scaling_factor' => 'scaling_factors',
|
||||
'intervention' => 'interventions',
|
||||
'currency' => 'currencies',
|
||||
'help_document' => 'help_documents'
|
||||
);
|
||||
// check if this is a list view
|
||||
if (in_array($view,$views))
|
||||
{
|
||||
return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view);
|
||||
}
|
||||
// check if it is an edit view
|
||||
elseif (array_key_exists($view,$views))
|
||||
{
|
||||
return array('edit' => true, 'view' => $view, 'views' => $views[$view]);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage ajax.json.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* Costbenefitprojection Ajax Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerAjax extends JControllerLegacy
|
||||
{
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
// make sure all json stuff are set
|
||||
JFactory::getDocument()->setMimeEncoding( 'application/json' );
|
||||
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
|
||||
JResponse::setHeader("Access-Control-Allow-Origin", "*");
|
||||
// load the tasks
|
||||
$this->registerTask('calculatedResult', 'ajax');
|
||||
$this->registerTask('interventionBuildTable', 'ajax');
|
||||
$this->registerTask('getClusterData', 'ajax');
|
||||
}
|
||||
|
||||
public function ajax()
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($token == $call_token)
|
||||
{
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'calculatedResult':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$dataValue = $jinput->get('data', NULL, 'BASE64');
|
||||
if($idValue && $dataValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getCalculatedResult($idValue, $dataValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'interventionBuildTable':
|
||||
try
|
||||
{
|
||||
$idNameValue = $jinput->get('idName', NULL, 'CMD');
|
||||
$ojectValue = $jinput->get('oject', NULL, 'STRING');
|
||||
$clusterValue = $jinput->get('cluster', NULL, 'WORD');
|
||||
if($idNameValue && $ojectValue && $clusterValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getInterventionBuildTable($idNameValue, $ojectValue, $clusterValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getClusterData':
|
||||
try
|
||||
{
|
||||
$idNameValue = $jinput->get('idName', NULL, 'CMD');
|
||||
$clusterValue = $jinput->get('cluster', NULL, 'STRING');
|
||||
if($idNameValue && $clusterValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getClusterData($idNameValue, $clusterValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode(false).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode(false).");";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage causerisk.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Causerisk Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCauserisk extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Causesrisks'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('causerisk.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('causerisk.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('causerisk.access', 'com_costbenefitprojection.causerisk.' . (int) $recordId) && $user->authorise('causerisk.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('causerisk.edit', 'com_costbenefitprojection.causerisk.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection.causerisk.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('causerisk.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('causerisk.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Causerisk', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage causesrisks.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Causesrisks Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCausesrisks extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_CAUSESRISKS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Causerisk', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('causerisk.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Causesrisks');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Causesrisks_'.$date->format('jS_F_Y'),'Causesrisks exported ('.$date->format('jS F, Y').')','causesrisks');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('causerisk.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Causesrisks');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('causerisk_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'causesrisks');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'causerisk');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CAUSESRISKS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=causesrisks', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage combinedresults.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Combinedresults Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCombinedresults extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_COMBINEDRESULTS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Combinedresults', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function dashboard()
|
||||
{
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection', false));
|
||||
return;
|
||||
}
|
||||
|
||||
public function gotoCompanies()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// set the redirecting
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false));
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage companies.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Companies Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCompanies extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_COMPANIES';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Company', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('company.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Companies');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Companies_'.$date->format('jS_F_Y'),'Companies exported ('.$date->format('jS F, Y').')','companies');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('company.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Companies');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('company_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'companies');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'company');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COMPANIES');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
public function redirectToCombinedresults()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('combinedresults.access', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// convert to string
|
||||
$ids = implode('_', $pks);
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=combinedresults&cid='.$ids, false));
|
||||
return;
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_ACCESS_TO_COMBINEDRESULTS_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,575 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage company.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Company Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCompany extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Companies'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('company.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('company.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this company can be edited
|
||||
$companies = CostbenefitprojectionHelper::hisCompanies($user->id);
|
||||
if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($recordId,$companies))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ensure lockdown
|
||||
$userIs = CostbenefitprojectionHelper::userIs($user->id);
|
||||
if (1 != $userIs && ! CostbenefitprojectionHelper::accessCompany($recordId))
|
||||
{
|
||||
// this company is locked
|
||||
return false;
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('company.access', 'com_costbenefitprojection.company.' . (int) $recordId) && $user->authorise('company.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('company.edit', 'com_costbenefitprojection.company.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('company.edit.own', 'com_costbenefitprojection.company.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('company.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('company.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Company', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// if id is 0 get id
|
||||
if (0 >= (int) $validData['id'])
|
||||
{
|
||||
// Get the created by id
|
||||
$created_by = (isset($validData['created_by']) && $validData['created_by'] > 0) ? $validData['created_by'] : $user->id;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Select id of this company
|
||||
$query->select($db->quoteName(array('id')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_company'));
|
||||
$query->where($db->quoteName('name') . ' = '. $db->quote($validData['name']));
|
||||
$query->where($db->quoteName('email') . ' = '. $db->quote($validData['email']));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['country']);
|
||||
$query->where($db->quoteName('service_provider') . ' = '. (int) $validData['service_provider']);
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $created_by);
|
||||
if (isset($validData['created']))
|
||||
{
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$validData['id'] = $db->loadResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// user setup if not set
|
||||
if (0 >= (int) $validData['user'] && (int) $validData['id'] > 0)
|
||||
{
|
||||
$userIs = CostbenefitprojectionHelper::userIs($user->id);
|
||||
if (1 == $userIs)
|
||||
{
|
||||
// this is a company so just use its id
|
||||
$userId = $user->id;
|
||||
// add this user id to this company
|
||||
$validData['user'] = $userId;
|
||||
$model->save($validData);
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup config array
|
||||
$newUser = array('name' => $validData['name'], 'email' => $validData['email']);
|
||||
$userId = CostbenefitprojectionHelper::createUser($newUser);
|
||||
if (!is_int($userId))
|
||||
{
|
||||
$this->setMessage($userId, 'error');
|
||||
}
|
||||
else
|
||||
{
|
||||
// add this user id to this company
|
||||
$validData['user'] = $userId;
|
||||
$model->save($validData);
|
||||
}
|
||||
}
|
||||
}
|
||||
// only continue if we have a company id
|
||||
if ((int) $validData['id'] > 0)
|
||||
{
|
||||
// get params
|
||||
$params = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
// get all this users companies
|
||||
$hisCompanies = CostbenefitprojectionHelper::hisCompanies($validData['user']);
|
||||
if (CostbenefitprojectionHelper::checkArray($hisCompanies))
|
||||
{
|
||||
// set the user group based on the overall status of its companies
|
||||
$departments = CostbenefitprojectionHelper::getVars('company', $hisCompanies, 'id', 'department');
|
||||
if (in_array(2, $departments))
|
||||
{
|
||||
$memberGroups = $params->get('advancedmembergroup');
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberGroups = $params->get('memberbasicgroup');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// first company so act simply on this company department status
|
||||
if (2 == $validData['department'])
|
||||
{
|
||||
$memberGroups = $params->get('advancedmembergroup');
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberGroups = $params->get('memberbasicgroup');
|
||||
}
|
||||
}
|
||||
// update the user groups
|
||||
JUserHelper::setUserGroups((int)$validData['user'],(array)$memberGroups);
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Select all records in scaling factors the belong to this company
|
||||
$query->select($db->quoteName(array('id','causerisk','published')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor'));
|
||||
$query->where($db->quoteName('company') . ' = '. (int) $validData['id']);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// load the scaling factors already set
|
||||
$already = $db->loadObjectList();
|
||||
$publish = array();
|
||||
$archive = array();
|
||||
$bucket = array();
|
||||
foreach ($already as $scale)
|
||||
{
|
||||
if (CostbenefitprojectionHelper::checkArray($validData['causesrisks']))
|
||||
{
|
||||
if (in_array($scale->causerisk, $validData['causesrisks']) && $scale->published != 1)
|
||||
{
|
||||
// publish the scaling factor (update)
|
||||
$publish[$scale->id] = $scale->id;
|
||||
}
|
||||
elseif (!in_array($scale->causerisk, $validData['causesrisks']))
|
||||
{
|
||||
// archive the scaling factor (update)
|
||||
$archive[$scale->id] = $scale->id;
|
||||
}
|
||||
$bucket[] = $scale->causerisk;
|
||||
}
|
||||
else
|
||||
{
|
||||
// archive the scaling factor (update)
|
||||
$archive[$scale->id] = $scale->id;
|
||||
}
|
||||
}
|
||||
// update the needed records
|
||||
$types = array('publish' => 1,'archive' => 2);
|
||||
foreach ($types as $type => $int)
|
||||
{
|
||||
if (CostbenefitprojectionHelper::checkArray(${$type}))
|
||||
{
|
||||
foreach (${$type} as $id)
|
||||
{
|
||||
$query = $db->getQuery(true);
|
||||
// Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('published') . ' = ' . (int) $int
|
||||
);
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . (int) $id
|
||||
);
|
||||
|
||||
$query->update($db->quoteName('#__costbenefitprojection_scaling_factor'))->set($fields)->where($conditions);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CostbenefitprojectionHelper::checkArray($validData['causesrisks']))
|
||||
{
|
||||
// remove those already set from the saved list of causesrisks
|
||||
if (CostbenefitprojectionHelper::checkArray($bucket))
|
||||
{
|
||||
$insert = array();
|
||||
foreach ($validData['causesrisks'] as $causerisk)
|
||||
{
|
||||
if (!in_array($causerisk,$bucket))
|
||||
{
|
||||
$insert[] = $causerisk;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$insert = $validData['causesrisks'];
|
||||
}
|
||||
}
|
||||
// insert the new records
|
||||
if (CostbenefitprojectionHelper::checkArray($insert))
|
||||
{
|
||||
$created = $db->quote(JFactory::getDate()->toSql());
|
||||
$created_by = JFactory::getUser()->get('id');
|
||||
$company = $validData['id'];
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Insert columns.
|
||||
$columns = array(
|
||||
'causerisk', 'company', 'mortality_scaling_factor_females',
|
||||
'mortality_scaling_factor_males', 'presenteeism_scaling_factor_females',
|
||||
'presenteeism_scaling_factor_males', 'yld_scaling_factor_females',
|
||||
'yld_scaling_factor_males', 'published',
|
||||
'created_by', 'created');
|
||||
// setup the values
|
||||
$values = array();
|
||||
foreach ($insert as $new)
|
||||
{
|
||||
$array = array($new,$company,1,1,1,1,1,1,1,$created_by,$created);
|
||||
$values[] = implode(',',$array);
|
||||
}
|
||||
// Prepare the insert query.
|
||||
$query
|
||||
->insert($db->quoteName('#__costbenefitprojection_scaling_factor'))
|
||||
->columns($db->quoteName($columns))
|
||||
->values(implode('), (', $values));
|
||||
|
||||
// Set the query using our newly populated query object and execute it.
|
||||
$db->setQuery($query);
|
||||
$done = $db->execute();
|
||||
if ($done)
|
||||
{
|
||||
// we must set the assets
|
||||
foreach ($insert as $causerisk)
|
||||
{
|
||||
// get all the ids. Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('id')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor'));
|
||||
$query->where($db->quoteName('causerisk') . ' = '. (int) $causerisk);
|
||||
$query->where($db->quoteName('company') . ' = '. (int) $company);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$aId = $db->loadResult();
|
||||
// make sure the access of asset is set
|
||||
CostbenefitprojectionHelper::setAsset($aId,'scaling_factor');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage companyresults.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* Costbenefitprojection Companyresults Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCompanyresults extends JControllerLegacy
|
||||
{
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function dashboard()
|
||||
{
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection', false));
|
||||
return;
|
||||
}
|
||||
|
||||
public function editCompany()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('id', null, 'INT');
|
||||
// set the redirecting
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies&task=company.edit&id='.$id.'&ref=companyresults&refid='.$id, false));
|
||||
}
|
||||
|
||||
public function gotoCompanies()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// set the redirecting
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=companies', false));
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage costbenefitprojection.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Costbenefitprojection Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCostbenefitprojection extends JControllerAdmin
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage countries.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Countries Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCountries extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_COUNTRIES';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Country', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('country.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Countries');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Countries_'.$date->format('jS_F_Y'),'Countries exported ('.$date->format('jS F, Y').')','countries');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('country.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Countries');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('country_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'countries');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'country');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_COUNTRIES');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,497 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage country.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Country Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCountry extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Countries'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('country.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('country.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this country can be edited
|
||||
$is = CostbenefitprojectionHelper::userIs($user->id);
|
||||
$countries = CostbenefitprojectionHelper::hisCountries($user->id);
|
||||
if ((3 != $is) || !CostbenefitprojectionHelper::checkArray($countries) || !in_array($recordId,$countries))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('country.access', 'com_costbenefitprojection.country.' . (int) $recordId) && $user->authorise('country.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('country.edit', 'com_costbenefitprojection.country.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('country.edit.own', 'com_costbenefitprojection.country.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('country.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('country.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Country', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=countries' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// user setup if not set
|
||||
if (0 >= (int) $validData['user'])
|
||||
{
|
||||
// setup config array
|
||||
$newUser = array('name' => $validData['publicname'], 'email' => $validData['publicemail']);
|
||||
$userId = costbenefitprojectionHelper::createUser($newUser);
|
||||
if (!is_int($userId))
|
||||
{
|
||||
$this->setMessage($userId, 'error');
|
||||
}
|
||||
else
|
||||
{
|
||||
// get params
|
||||
$params = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
// get groups for members
|
||||
$groups = (array) $params->get('countryuser');
|
||||
// update the user groups
|
||||
JUserHelper::setUserGroups($userId,$groups);
|
||||
// add this user id to this country
|
||||
$validData['user'] = $userId;
|
||||
$model->save($validData);
|
||||
}
|
||||
}
|
||||
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Select all records in scaling factors the belong to this company
|
||||
$query->select($db->quoteName(array('id','causerisk','published')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor'));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['id']);
|
||||
$query->where($db->quoteName('company') . ' = 0');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
// load the scaling factors already set
|
||||
$already = $db->loadObjectList();
|
||||
$publish = array();
|
||||
$archive = array();
|
||||
$bucket = array();
|
||||
foreach ($already as $scale)
|
||||
{
|
||||
if (CostbenefitprojectionHelper::checkArray($validData['causesrisks']))
|
||||
{
|
||||
if (in_array($scale->causerisk, $validData['causesrisks']) && $scale->published != 1)
|
||||
{
|
||||
// publish the scaling factor (update)
|
||||
$publish[$scale->id] = $scale->id;
|
||||
}
|
||||
elseif (!in_array($scale->causerisk, $validData['causesrisks']))
|
||||
{
|
||||
// archive the scaling factor (update)
|
||||
$archive[$scale->id] = $scale->id;
|
||||
}
|
||||
$bucket[] = $scale->causerisk;
|
||||
}
|
||||
else
|
||||
{
|
||||
// archive the scaling factor (update)
|
||||
$archive[$scale->id] = $scale->id;
|
||||
}
|
||||
}
|
||||
// update the needed records
|
||||
$types = array('publish' => 1,'archive' => 2);
|
||||
foreach ($types as $type => $int)
|
||||
{
|
||||
if (CostbenefitprojectionHelper::checkArray(${$type}))
|
||||
{
|
||||
foreach (${$type} as $id)
|
||||
{
|
||||
$query = $db->getQuery(true);
|
||||
// Fields to update.
|
||||
$fields = array(
|
||||
$db->quoteName('published') . ' = ' . (int) $int
|
||||
);
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . (int) $id
|
||||
);
|
||||
|
||||
$query->update($db->quoteName('#__costbenefitprojection_scaling_factor'))->set($fields)->where($conditions);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CostbenefitprojectionHelper::checkArray($validData['causesrisks']))
|
||||
{
|
||||
// remove those already set from the saved list of causesrisks
|
||||
if (CostbenefitprojectionHelper::checkArray($bucket))
|
||||
{
|
||||
$insert = array();
|
||||
foreach ($validData['causesrisks'] as $causerisk)
|
||||
{
|
||||
if (!in_array($causerisk,$bucket))
|
||||
{
|
||||
$insert[] = $causerisk;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$insert = $validData['causesrisks'];
|
||||
}
|
||||
}
|
||||
// insert the new records
|
||||
if (CostbenefitprojectionHelper::checkArray($insert))
|
||||
{
|
||||
$created = $db->quote(JFactory::getDate()->toSql());
|
||||
$created_by = JFactory::getUser()->get('id');
|
||||
$company = 0;
|
||||
$country = $validData['id'];
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Insert columns.
|
||||
$columns = array(
|
||||
'causerisk', 'company', 'country', 'mortality_scaling_factor_females',
|
||||
'mortality_scaling_factor_males', 'presenteeism_scaling_factor_females',
|
||||
'presenteeism_scaling_factor_males', 'yld_scaling_factor_females',
|
||||
'yld_scaling_factor_males', 'published',
|
||||
'created_by', 'created');
|
||||
// setup the values
|
||||
$values = array();
|
||||
foreach ($insert as $new)
|
||||
{
|
||||
$array = array($new,$company,$country,1,1,1,1,1,1,1,$created_by,$created);
|
||||
$values[] = implode(',',$array);
|
||||
}
|
||||
// Prepare the insert query.
|
||||
$query
|
||||
->insert($db->quoteName('#__costbenefitprojection_scaling_factor'))
|
||||
->columns($db->quoteName($columns))
|
||||
->values(implode('), (', $values));
|
||||
|
||||
// Set the query using our newly populated query object and execute it.
|
||||
$db->setQuery($query);
|
||||
$done = $db->execute();
|
||||
if ($done)
|
||||
{
|
||||
// we must set the assets
|
||||
foreach ($insert as $causerisk)
|
||||
{
|
||||
// get all the ids. Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('id')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_scaling_factor'));
|
||||
$query->where($db->quoteName('causerisk') . ' = '. (int) $causerisk);
|
||||
$query->where($db->quoteName('company') . ' = 0');
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $country);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$aId = $db->loadResult();
|
||||
// make sure the access of asset is set
|
||||
CostbenefitprojectionHelper::setAsset($aId,'scaling_factor');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage currencies.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Currencies Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCurrencies extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_CURRENCIES';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Currency', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('currency.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Currencies');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Currencies_'.$date->format('jS_F_Y'),'Currencies exported ('.$date->format('jS F, Y').')','currencies');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('currency.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Currencies');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('currency_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'currencies');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'currency');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_CURRENCIES');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage currency.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Currency Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerCurrency extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Currencies'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('currency.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('currency.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('currency.access', 'com_costbenefitprojection.currency.' . (int) $recordId) && $user->authorise('currency.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('currency.edit', 'com_costbenefitprojection.currency.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection.currency.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('currency.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('currency.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Currency', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=currencies' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,330 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage health_data.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Health_data Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerHealth_data extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Health_data_sets'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('health_data.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('health_data.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this health data can be edited
|
||||
$is = CostbenefitprojectionHelper::userIs($user->id);
|
||||
$countries = CostbenefitprojectionHelper::hisCountries($user->id);
|
||||
$country = CostbenefitprojectionHelper::getId('health_data',$recordId,'id','country');
|
||||
if ((3 != $is) || !CostbenefitprojectionHelper::checkArray($countries) || !in_array($country,$countries))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('health_data.access', 'com_costbenefitprojection.health_data.' . (int) $recordId) && $user->authorise('health_data.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('health_data.edit', 'com_costbenefitprojection.health_data.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection.health_data.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('health_data.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('health_data.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Health_data', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage health_data_sets.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Health_data_sets Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerHealth_data_sets extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_HEALTH_DATA_SETS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Health_data', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('health_data.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Health_data_sets');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Health_data_sets_'.$date->format('jS_F_Y'),'Health data sets exported ('.$date->format('jS F, Y').')','health data sets');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('health_data.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Health_data_sets');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('health_data_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'health_data_sets');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'health_data');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HEALTH_DATA_SETS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=health_data_sets', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage help.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* Costbenefitprojection Help Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerHelp extends JControllerLegacy
|
||||
{
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
// load the tasks
|
||||
$this->registerTask('getText', 'help');
|
||||
}
|
||||
|
||||
public function help()
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($user->id != 0 && $token == $call_token){
|
||||
$task = $this->getTask();
|
||||
switch($task){
|
||||
case 'getText':
|
||||
try
|
||||
{
|
||||
$idValue = $jinput->get('id', 0, 'INT');
|
||||
if($idValue)
|
||||
{
|
||||
$result = $this->getHelpDocumentText($idValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = '';
|
||||
}
|
||||
echo $result;
|
||||
// stop execution gracefully
|
||||
jexit();
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
// stop execution gracefully
|
||||
jexit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// stop execution gracefully
|
||||
jexit();
|
||||
}
|
||||
}
|
||||
|
||||
protected function getHelpDocumentText($id)
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('a.title','a.content'));
|
||||
$query->from('#__costbenefitprojection_help_document AS a');
|
||||
$query->where('a.id = '.(int) $id);
|
||||
$query->where('a.published = 1');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if($db->getNumRows())
|
||||
{
|
||||
$text = array();
|
||||
$document = $db->loadObject();
|
||||
// fix image issue
|
||||
$images['src="images'] = 'src="'.JURI::root().'images';
|
||||
$images["src='images"] = "src='".JURI::root()."images";
|
||||
$images['src="/images'] = 'src="'.JURI::root().'images';
|
||||
$images["src='/images"] = "src='".JURI::root()."images";
|
||||
// set document template
|
||||
$text[] = "<!doctype html>";
|
||||
$text[] = '<html>';
|
||||
$text[] = "<head>";
|
||||
$text[] = '<meta charset="utf-8">';
|
||||
$text[] = "<title>".$document->title."</title>";
|
||||
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_costbenefitprojection/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
|
||||
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_costbenefitprojection/uikit/js/uikit.min.js"></script>';
|
||||
$text[] = "</head>";
|
||||
$text[] = '<body><br />';
|
||||
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
|
||||
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
|
||||
// build the help text
|
||||
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
|
||||
$text[] = str_replace(array_keys($images),array_values($images),$document->content);
|
||||
// end template
|
||||
$text[] = '</div><br /><br />';
|
||||
$text[] = '</div>';
|
||||
$text[] = "</body>";
|
||||
$text[] = "</html>";
|
||||
|
||||
return implode("\n",$text);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage help_document.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Help_document Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerHelp_document extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Help_documents'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('help_document.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('help_document.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('help_document.access', 'com_costbenefitprojection.help_document.' . (int) $recordId) && $user->authorise('help_document.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('help_document.edit', 'com_costbenefitprojection.help_document.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection.help_document.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('help_document.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Help_document', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage help_documents.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Help_documents Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerHelp_documents extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_HELP_DOCUMENTS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Help_document', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('help_document.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Help_documents');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Help_documents_'.$date->format('jS_F_Y'),'Help documents exported ('.$date->format('jS F, Y').')','help documents');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('help_document.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Help_documents');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('help_document_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'help_documents');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'help_document');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_HELP_DOCUMENTS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=help_documents', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage import.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Costbenefitprojection Import Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerImport extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Import an spreadsheet.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function import()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
$model = $this->getModel('import');
|
||||
if ($model->import())
|
||||
{
|
||||
$cache = JFactory::getCache('mod_menu');
|
||||
$cache->clean();
|
||||
// TODO: Reset the users acl here as well to kill off any missing bits
|
||||
}
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$redirect_url = $app->getUserState('com_costbenefitprojection.redirect_url');
|
||||
if (empty($redirect_url))
|
||||
{
|
||||
$redirect_url = JRoute::_('index.php?option=com_costbenefitprojection&view=import', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// wipe out the user state when we're going to redirect
|
||||
$app->setUserState('com_costbenefitprojection.redirect_url', '');
|
||||
$app->setUserState('com_costbenefitprojection.message', '');
|
||||
$app->setUserState('com_costbenefitprojection.extension_message', '');
|
||||
}
|
||||
$this->setRedirect($redirect_url);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,335 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage intervention.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Intervention Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerIntervention extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Interventions'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('intervention.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('intervention.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
// get company id
|
||||
$company = CostbenefitprojectionHelper::getId('intervention',$recordId,'id','company');
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this intervention can be edited
|
||||
$companies = CostbenefitprojectionHelper::hisCompanies($user->id);
|
||||
if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($company,$companies))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// now check the access by sharing
|
||||
if (!CostbenefitprojectionHelper::checkIntervetionAccess($recordId,null,$company))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('intervention.access', 'com_costbenefitprojection.intervention.' . (int) $recordId) && $user->authorise('intervention.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('intervention.edit', 'com_costbenefitprojection.intervention.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection.intervention.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('intervention.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('intervention.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Intervention', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage interventions.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Interventions Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerInterventions extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_INTERVENTIONS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Intervention', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('intervention.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Interventions');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Interventions_'.$date->format('jS_F_Y'),'Interventions exported ('.$date->format('jS F, Y').')','interventions');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('intervention.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Interventions');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('intervention_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'interventions');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'intervention');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_INTERVENTIONS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=interventions', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,329 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage scaling_factor.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Scaling_factor Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerScaling_factor extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Scaling_factors'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('scaling_factor.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('scaling_factor.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this scaling factor can be edited
|
||||
$companies = CostbenefitprojectionHelper::hisCompanies($user->id);
|
||||
$company = CostbenefitprojectionHelper::getId('scaling_factor',$recordId,'id','company');
|
||||
if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($company,$companies))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('scaling_factor.access', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId) && $user->authorise('scaling_factor.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('scaling_factor.edit', 'com_costbenefitprojection.scaling_factor.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection.scaling_factor.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('scaling_factor.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('scaling_factor.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Scaling_factor', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage scaling_factors.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Scaling_factors Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerScaling_factors extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_SCALING_FACTORS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Scaling_factor', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('scaling_factor.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Scaling_factors');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Scaling_factors_'.$date->format('jS_F_Y'),'Scaling factors exported ('.$date->format('jS F, Y').')','scaling factors');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('scaling_factor.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Scaling_factors');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('scaling_factor_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'scaling_factors');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'scaling_factor');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SCALING_FACTORS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=scaling_factors', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,388 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage service_provider.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Service_provider Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerService_provider extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Service_providers'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('service_provider.access', 'com_costbenefitprojection');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return JFactory::getUser()->authorise('service_provider.create', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
if (!$user->authorise('core.options', 'com_costbenefitprojection'))
|
||||
{
|
||||
// make absolutely sure that this Service Providers can be edited
|
||||
$serviceproviders = CostbenefitprojectionHelper::hisServiceProviders($user->id);
|
||||
if (!CostbenefitprojectionHelper::checkArray($serviceproviders) || !in_array($recordId,$serviceproviders))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Access check.
|
||||
$access = ($user->authorise('service_provider.access', 'com_costbenefitprojection.service_provider.' . (int) $recordId) && $user->authorise('service_provider.access', 'com_costbenefitprojection'));
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('service_provider.edit', 'com_costbenefitprojection.service_provider.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
{
|
||||
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection.service_provider.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('service_provider.edit.own', 'com_costbenefitprojection'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return $user->authorise('service_provider.edit', $this->option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Service_provider', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
if ($validData['id'] >= 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// if id is 0 get id
|
||||
if (0 >= (int) $validData['id'])
|
||||
{
|
||||
// Get the created by id
|
||||
$created_by = (isset($validData['created_by']) && $validData['created_by'] > 0) ? $validData['created_by'] : $user->id;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
// Select id of this service_provider
|
||||
$query->select($db->quoteName(array('id')));
|
||||
$query->from($db->quoteName('#__costbenefitprojection_service_provider'));
|
||||
$query->where($db->quoteName('publicemail') . ' = '. $db->quote($validData['publicemail']));
|
||||
$query->where($db->quoteName('publicname') . ' = '. $db->quote($validData['publicname']));
|
||||
$query->where($db->quoteName('country') . ' = '. (int) $validData['country']);
|
||||
$query->where($db->quoteName('created_by') . ' = '. (int) $created_by);
|
||||
if (isset($validData['created']))
|
||||
{
|
||||
$query->where($db->quoteName('created') . ' = '. $db->quote($validData['created']));
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$validData['id'] = $db->loadResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// user setup if not set
|
||||
if (0 >= (int) $validData['user'])
|
||||
{
|
||||
// setup config array
|
||||
$newUser = array('name' => $validData['publicname'], 'email' => $validData['publicemail']);
|
||||
$userId = costbenefitprojectionHelper::createUser($newUser);
|
||||
if (!is_int($userId))
|
||||
{
|
||||
$this->setMessage($userId, 'error');
|
||||
}
|
||||
else
|
||||
{
|
||||
// get params
|
||||
$params = JComponentHelper::getParams('com_costbenefitprojection');
|
||||
// get groups for members
|
||||
$groups = (array) $params->get('serviceprovideruser');
|
||||
// update the user groups
|
||||
JUserHelper::setUserGroups($userId,$groups);
|
||||
// add this user id to this serviceprovider
|
||||
$validData['user'] = $userId;
|
||||
$model->save($validData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage service_providers.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Service_providers Controller
|
||||
*/
|
||||
class CostbenefitprojectionControllerService_providers extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_COSTBENEFITPROJECTION_SERVICE_PROVIDERS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Service_provider', $prefix = 'CostbenefitprojectionModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('service_provider.export', 'com_costbenefitprojection') && $user->authorise('core.export', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Service_providers');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (CostbenefitprojectionHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
CostbenefitprojectionHelper::xls($data,'Service_providers_'.$date->format('jS_F_Y'),'Service providers exported ('.$date->format('jS F, Y').')','service providers');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('service_provider.import', 'com_costbenefitprojection') && $user->authorise('core.import', 'com_costbenefitprojection'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Service_providers');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (CostbenefitprojectionHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('service_provider_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'service_providers');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'service_provider');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_SELECT_FILE_FOR_SERVICE_PROVIDERS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COSTBENEFITPROJECTION_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=service_providers', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 3.3.8
|
||||
@build 10th March, 2016
|
||||
@created 15th June, 2012
|
||||
@package Cost Benefit Projection
|
||||
@subpackage costbenefitprojection.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
Cost Benefit Projection Tool.
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_costbenefitprojection'))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
};
|
||||
|
||||
// Load cms libraries
|
||||
JLoader::registerPrefix('J', JPATH_PLATFORM . '/cms');
|
||||
// Load joomla libraries without overwrite
|
||||
JLoader::registerPrefix('J', JPATH_PLATFORM . '/joomla',false);
|
||||
|
||||
// Add CSS file for all pages
|
||||
$document = JFactory::getDocument();
|
||||
$document->addStyleSheet('components/com_costbenefitprojection/assets/css/admin.css');
|
||||
$document->addScript('components/com_costbenefitprojection/assets/js/admin.js');
|
||||
|
||||
// require helper files
|
||||
JLoader::register('CostbenefitprojectionHelper', dirname(__FILE__) . '/helpers/costbenefitprojection.php');
|
||||
JLoader::register('JHtmlBatch_', dirname(__FILE__) . '/helpers/html/batch_.php');
|
||||
|
||||
// import joomla controller library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
// Get an instance of the controller prefixed by Costbenefitprojection
|
||||
$controller = JControllerLegacy::getInstance('Costbenefitprojection');
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute(JFactory::getApplication()->input->get('task'));
|
||||
|
||||
// Redirect if set by the controller
|
||||
$controller->redirect();
|