first commit
40
plugins/genericobject/.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: "Plugin release"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: "Create release"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Extract tag name"
|
||||
run: |
|
||||
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2"
|
||||
- name: "Build package"
|
||||
id: "build-package"
|
||||
uses: "glpi-project/tools/github-actions/build-package@0.1.15"
|
||||
with:
|
||||
plugin-version: ${{ env.tag_name }}
|
||||
- name: "Create release"
|
||||
id: "create-release"
|
||||
uses: "actions/create-release@v1"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.tag_name }}
|
||||
release_name: ${{ env.tag_name }}
|
||||
draft: true
|
||||
- name: "Attach package to release"
|
||||
uses: "actions/upload-release-asset@v1"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||
asset_path: ${{ steps.build-package.outputs.package-path }}
|
||||
asset_name: ${{ steps.build-package.outputs.package-basename }}
|
||||
asset_content_type: " application/x-bzip2"
|
||||
6
plugins/genericobject/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
log_filter.settings.php
|
||||
dist/
|
||||
vendor/
|
||||
.gh_token
|
||||
*.min.*
|
||||
|
||||
8
plugins/genericobject/.tx/config
Normal file
@ -0,0 +1,8 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[glpi-project-plugin-genericobject.genericobject-pot]
|
||||
file_filter = locales/<lang>.po
|
||||
source_file = locales/genericobject.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
9
plugins/genericobject/AUTHORS.txt
Normal file
@ -0,0 +1,9 @@
|
||||
Plugin Genericobject developers :
|
||||
|
||||
Walid Nouh, Teclib'
|
||||
Alexandre Delaunay, Teclib'
|
||||
|
||||
Occasional contributors :
|
||||
François Legastelois, Teclib'
|
||||
Jean-Max Reymond, CSK Solutions
|
||||
Xavier Caillaud, Infotel
|
||||
675
plugins/genericobject/LICENSE
Normal file
@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. 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
|
||||
them 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 prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. 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.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey 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;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
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.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
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
|
||||
state 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program 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, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU 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 Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
43
plugins/genericobject/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Genericobject GLPI plugin
|
||||
|
||||
[](https://github.com/pluginsGLPI/genericobject/blob/develop/LICENSE)
|
||||
[](https://twitter.com/teclib)
|
||||
[](https://t.me/glpien)
|
||||
[](http://www.repostatus.org/#active)
|
||||
[](https://github.com/pluginsGLPI/genericobject/releases)
|
||||
[](https://travis-ci.org/pluginsGLPI/genericobject/)
|
||||
|
||||

|
||||
|
||||
|
||||
The genericobject plugin allows to extends GLPi to manage new types of objects.
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
We maintain a detailed documentation here -> [Documentation](http://glpi-plugins.readthedocs.io/en/latest/genericobject/index.html)
|
||||
|
||||
## Contact
|
||||
|
||||
For notices about major changes and general discussion of genericobject, subscribe to the [/r/glpi](https://www.reddit.com/r/glpi/) subreddit.
|
||||
You can also chat with us via [@glpi on Telegram](https://t.me/glpien).
|
||||
|
||||
## Professional Services
|
||||
|
||||

|
||||
|
||||
The GLPI Network services are available through our [Partner's Network](http://www.teclib-edition.com/en/partners/). We provide special training, bug fixes with editor subscription, contributions for new features, and more.
|
||||
|
||||
Obtain a personalized service experience, associated with benefits and opportunities.
|
||||
|
||||
## Contributing
|
||||
|
||||
* Open a ticket for each bug/feature so it can be discussed
|
||||
* Follow [development guidelines](http://glpi-developer-documentation.readthedocs.io/en/latest/plugins/index.html)
|
||||
* Refer to [GitFlow](http://git-flow.readthedocs.io/) process for branching
|
||||
* Work on a new branch on your own fork
|
||||
* Open a PR that will be reviewed by a developer
|
||||
|
||||
## Copying
|
||||
|
||||
* **Code**: you can redistribute it and/or modify
|
||||
3
plugins/genericobject/ajax/remove.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Vous pouvez effacer ce fichier sans dommages.
|
||||
|
||||
You can safely remove this file.
|
||||
15
plugins/genericobject/composer.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"glpi-project/tools": "^0.4"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"platform": {
|
||||
"php": "7.2.0"
|
||||
},
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
||||
538
plugins/genericobject/composer.lock
generated
Normal file
@ -0,0 +1,538 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "8354308e8805d3f53d35251aac6a4525",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "glpi-project/tools",
|
||||
"version": "0.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/glpi-project/tools.git",
|
||||
"reference": "34369dd85cc99c18c3b8cf441bba11ec32173f2d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/glpi-project/tools/zipball/34369dd85cc99c18c3b8cf441bba11ec32173f2d",
|
||||
"reference": "34369dd85cc99c18c3b8cf441bba11ec32173f2d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"symfony/console": "^4.4 || ^5.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/extract-locales",
|
||||
"bin/licence-headers-check",
|
||||
"tools/extract_template.sh",
|
||||
"tools/plugin-release"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Glpi\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Teclib'",
|
||||
"email": "glpi@teclib.com",
|
||||
"homepage": "http://teclib-group.com"
|
||||
}
|
||||
],
|
||||
"description": "Various tools for GLPI and its plugins",
|
||||
"keywords": [
|
||||
"glpi",
|
||||
"plugins",
|
||||
"tools"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/glpi-project/tools/issues",
|
||||
"source": "https://github.com/glpi-project/tools"
|
||||
},
|
||||
"time": "2022-01-28T13:44:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
"homepage": "https://github.com/php-fig/container",
|
||||
"keywords": [
|
||||
"PSR-11",
|
||||
"container",
|
||||
"container-interface",
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/container/issues",
|
||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||
},
|
||||
"time": "2021-03-05T17:36:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v4.4.37",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
|
||||
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php73": "^1.8",
|
||||
"symfony/polyfill-php80": "^1.16",
|
||||
"symfony/service-contracts": "^1.1|^2"
|
||||
},
|
||||
"conflict": {
|
||||
"psr/log": ">=3",
|
||||
"symfony/dependency-injection": "<3.4",
|
||||
"symfony/event-dispatcher": "<4.3|>=5",
|
||||
"symfony/lock": "<4.4",
|
||||
"symfony/process": "<3.3"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0|2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "^1|^2",
|
||||
"symfony/config": "^3.4|^4.0|^5.0",
|
||||
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
|
||||
"symfony/event-dispatcher": "^4.3",
|
||||
"symfony/lock": "^4.4|^5.0",
|
||||
"symfony/process": "^3.4|^4.0|^5.0",
|
||||
"symfony/var-dumper": "^4.3|^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "For using the console logger",
|
||||
"symfony/event-dispatcher": "",
|
||||
"symfony/lock": "",
|
||||
"symfony/process": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Console\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Eases the creation of beautiful and testable command line interfaces",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v4.4.37"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-26T16:15:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for the Mbstring extension",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"mbstring",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-30T18:21:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"version": "v1.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
|
||||
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php73\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-05T21:20:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
|
||||
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-13T13:58:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v1.1.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "633df678bec3452e04a7b0337c9bcfe7354124b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/633df678bec3452e04a7b0337c9bcfe7354124b3",
|
||||
"reference": "633df678bec3452e04a7b0337c9bcfe7354124b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/service-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.1-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Contracts\\Service\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Generic abstractions related to writing services",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"abstractions",
|
||||
"contracts",
|
||||
"decoupling",
|
||||
"interfaces",
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/service-contracts/tree/v1.1.11"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-11-04T13:32:43+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.2.0"
|
||||
},
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
91
plugins/genericobject/css/styles.css
Normal file
@ -0,0 +1,91 @@
|
||||
/*!
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Menu entry wrapper
|
||||
*/
|
||||
.genericobject_menu_wrapper {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Icon positionning
|
||||
*/
|
||||
.genericobject_menu_icon {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
.icon_preview {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.icon_preview > .genericobject_menu_icon {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
height: initial;
|
||||
width: initial;
|
||||
max-height: 32px;
|
||||
max-width: 32px;
|
||||
}
|
||||
|
||||
.genericobject_menu_text {
|
||||
padding-left: 5px;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fields Form
|
||||
*/
|
||||
|
||||
.genericobject_fields.add_new {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.genericobject_fields.add_new td.label {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.genericobject_fields.add_new td.dropdown {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Type's Profile tab : specific alignment
|
||||
*/
|
||||
|
||||
.genericobject_type_profiles tr > td {
|
||||
width : 10%;
|
||||
}
|
||||
103
plugins/genericobject/docs/CHANGELOG.txt
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* @version $Id: setup.php,v 1.2 2006/04/02 14:45:27 moyo Exp $
|
||||
----------------------------------------------------------------------
|
||||
GLPI - Gestionnaire Libre de Parc Informatique
|
||||
Copyright (C) 2003-2008 by the INDEPNET Development Team.
|
||||
|
||||
http://indepnet.net/ http://glpi-project.org/
|
||||
----------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of GLPI.
|
||||
|
||||
GLPI 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.
|
||||
|
||||
GLPI 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 GLPI; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Original Author of file: Walid NOUH
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
Version 2.1.4
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=41
|
||||
|
||||
Version 2.1.3
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=42
|
||||
|
||||
Version 2.1.2
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=33
|
||||
|
||||
Version 2.1.1
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=26
|
||||
|
||||
Version 2.1.0
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=23
|
||||
|
||||
Version 2.0.3
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=34
|
||||
|
||||
Version 2.0.2
|
||||
see https://forge.indepnet.net/projects/genericobject/issues?query_id=20
|
||||
|
||||
Version 2.0.1
|
||||
#3215 Cannot activate other plugins integration
|
||||
#3216 Add LICENSE file and change file headers
|
||||
#3217 field, object and type must not be reserved
|
||||
#3218 Wrong "contact" field definition
|
||||
#3219 Display weblinks
|
||||
|
||||
Version 2.0 RC2
|
||||
#3153 Missing file in the RC1 tarball
|
||||
|
||||
Version 2.0 RC1
|
||||
#3118 (Bug) Respect search options indexes
|
||||
|
||||
Version 2.0 Beta 2
|
||||
#2766 (Bug) Object without name
|
||||
#2765 (Bug) Object which have the same name that an other object already created
|
||||
#2764 (Bug) Object which begins by a number or a special type
|
||||
#1976 (Bug) Dropdown import issue
|
||||
#1729 (Feature) Manage transferts
|
||||
|
||||
Version 2.0 Beta 1
|
||||
#3114 (Feature) Rewrite the whole plugin to work with GLPI 0.80
|
||||
#2119 (Bug) Table created without uft8 support
|
||||
#2767 (Bug) Possibility to use the gabarits/templates
|
||||
#2769 (Feature) Possibility to associate a contract with an object created with Generic Object
|
||||
#1977 (Bug) Post-only to declare ticket for an object
|
||||
#1757 (Bug) Impossible to acces model dropdown form
|
||||
|
||||
Version 1.1.3
|
||||
#1762 SQL error with tplname field
|
||||
|
||||
Version 1.1.2
|
||||
#1659 Integration with geniventorynumber plugin
|
||||
#1734 Error with reservations
|
||||
#1728 Global/unique management
|
||||
|
||||
Version 1.1.1
|
||||
#1717 Cannot install plugin correctly
|
||||
#1718 Check mappings
|
||||
|
||||
Version 1.1.0
|
||||
#1690 Enable direct connexions & network ports
|
||||
#1707 Purge not working
|
||||
#1709 Delete infocom, contracts & reservations when an objet is deleted
|
||||
#1712 Error when datainjection is not available
|
||||
#1713 Remove spaces in object types
|
||||
|
||||
Version 1.0
|
||||
* Initial version
|
||||
40
plugins/genericobject/docs/LISEZMOI.TXT
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* @version $Id: setup.php,v 1.2 2006/04/02 14:45:27 moyo Exp $
|
||||
----------------------------------------------------------------------
|
||||
GLPI - Gestionnaire Libre de Parc Informatique
|
||||
Copyright (C) 2003-2008 by the INDEPNET Development Team.
|
||||
|
||||
http://indepnet.net/ http://glpi-project.org/
|
||||
----------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of GLPI.
|
||||
|
||||
GLPI 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.
|
||||
|
||||
GLPI 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 GLPI; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Original Author of file: Walid NOUH
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
Author : Walid NOUH
|
||||
Ce plugin vous permet d'ajouter de nouveaux types d'objets d'inventaire sans avoir à programmer.Il gère :
|
||||
- La création du type
|
||||
- Les champs disponibles
|
||||
- L'intégration dans GLPI (Helpdesk, réservation, gabarits, etc.)
|
||||
- L'intégration avec le plugin d'injection des données
|
||||
41
plugins/genericobject/docs/README.txt
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @version $Id: setup.php,v 1.2 2006/04/02 14:45:27 moyo Exp $
|
||||
----------------------------------------------------------------------
|
||||
GLPI - Gestionnaire Libre de Parc Informatique
|
||||
Copyright (C) 2003-2008 by the INDEPNET Development Team.
|
||||
|
||||
http://indepnet.net/ http://glpi-project.org/
|
||||
----------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of GLPI.
|
||||
|
||||
GLPI 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.
|
||||
|
||||
GLPI 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 GLPI; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Original Author of file: Walid NOUH
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
Author : Walid NOUH
|
||||
This plugin allows you to add new inventory types without programmation. It manages :
|
||||
- Type creation
|
||||
- Available fields
|
||||
- Framework integration (Helpdesk, loans, templates, etc.)
|
||||
- Integration with the file injection plugin
|
||||
|
||||
4
plugins/genericobject/docs/examples/car.csv
Normal file
@ -0,0 +1,4 @@
|
||||
"name"; "manufacturer"; "model"; "color"; "license plate"
|
||||
"Renault Scénic - 1234"; "Renault"; "Scénic"; "bleu"; "1234"
|
||||
"Peugeot 308 - 2345"; "Peugeot"; "308"; "bleu"; "2345"
|
||||
"Ferrari 458 Italia - 45677"; "Ferrari"; "458 Italia"; "rouge"; "45677"
|
||||
|
206
plugins/genericobject/fields/field.constant.php
Normal file
@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
global $GO_FIELDS;
|
||||
|
||||
$GO_FIELDS['id']['name'] = __("ID");
|
||||
$GO_FIELDS['id']['input_type'] = 'text';
|
||||
$GO_FIELDS['id']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['name']['name'] = __("Name");
|
||||
$GO_FIELDS['name']['field'] = 'name';
|
||||
$GO_FIELDS['name']['input_type'] = 'text';
|
||||
$GO_FIELDS['name']['autoname'] = true;
|
||||
|
||||
$GO_FIELDS['serial']['name'] = __("Serial number");
|
||||
$GO_FIELDS['serial']['field'] = 'serial';
|
||||
$GO_FIELDS['serial']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['otherserial']['name'] = __("Licence SN");
|
||||
$GO_FIELDS['otherserial']['field'] = 'otherserial';
|
||||
$GO_FIELDS['otherserial']['input_type'] = 'text';
|
||||
$GO_FIELDS['otherserial']['autoname'] = true;
|
||||
|
||||
$GO_FIELDS['comment']['name'] = __("Cause");
|
||||
$GO_FIELDS['comment']['field'] = 'comment';
|
||||
$GO_FIELDS['comment']['input_type'] = 'multitext';
|
||||
|
||||
$GO_FIELDS['other']['name'] = __("Others");
|
||||
$GO_FIELDS['other']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['creationdate']['name'] = __("Creation date");
|
||||
$GO_FIELDS['creationdate']['input_type'] = 'date';
|
||||
|
||||
$GO_FIELDS['expirationdate']['name'] = __("Expiration date");
|
||||
$GO_FIELDS['expirationdate']['input_type'] = 'date';
|
||||
|
||||
$GO_FIELDS['date_mod']['name'] = __("Last update");
|
||||
$GO_FIELDS['date_mod']['input_type'] = 'datetime';
|
||||
|
||||
$GO_FIELDS['date_creation']['name'] = __('Creation date');
|
||||
$GO_FIELDS['date_creation']['input_type'] = 'datetime';
|
||||
|
||||
$GO_FIELDS['url']['name'] = __("URL");
|
||||
$GO_FIELDS['url']['field'] = 'url';
|
||||
$GO_FIELDS['url']['input_type'] = 'text';
|
||||
$GO_FIELDS['url']['datatype'] = 'weblink';
|
||||
|
||||
$GO_FIELDS['types_id']['name'] = __("Type");
|
||||
$GO_FIELDS['types_id']['linkfield'] = 'type';
|
||||
$GO_FIELDS['types_id']['input_type'] = 'dropdown';
|
||||
// The 'isolated' dropdown type will create a isolated table for each type that will be assigned
|
||||
// with this field.
|
||||
$GO_FIELDS['types_id']['dropdown_type'] = 'isolated';
|
||||
|
||||
$GO_FIELDS['models_id']['name'] = __("Model");
|
||||
$GO_FIELDS['models_id']['input_type'] = 'dropdown';
|
||||
$GO_FIELDS['models_id']['dropdown_type'] = 'isolated';
|
||||
|
||||
$GO_FIELDS['categories_id']['name'] = __("Category");
|
||||
$GO_FIELDS['categories_id']['input_type'] = 'dropdown';
|
||||
$GO_FIELDS['categories_id']['dropdown_type'] = 'isolated';
|
||||
|
||||
$GO_FIELDS['entities_id']['name'] = __("Entity");
|
||||
$GO_FIELDS['entities_id']['input_type'] = 'dropdown';
|
||||
$GO_FIELDS['entities_id']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['template_name']['name'] = __("Template name");
|
||||
$GO_FIELDS['template_name']['input_type'] = 'text';
|
||||
$GO_FIELDS['template_name']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['notepad']['name'] = _n('Note', 'Notes', 2);
|
||||
$GO_FIELDS['notepad']['input_type'] = 'multitext';
|
||||
|
||||
$GO_FIELDS['is_recursive']['name'] = __("Child entities");
|
||||
$GO_FIELDS['is_recursive']['input_type'] = 'bool';
|
||||
|
||||
$GO_FIELDS['is_deleted']['name'] = __("Item in the dustbin");
|
||||
$GO_FIELDS['is_deleted']['input_type'] = 'bool';
|
||||
$GO_FIELDS['is_deleted']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['is_template']['name'] = __("Templates");
|
||||
$GO_FIELDS['is_template']['input_type'] = 'bool';
|
||||
$GO_FIELDS['is_template']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['is_global']['name'] = __("Management type");
|
||||
$GO_FIELDS['is_global']['input_type'] = 'bool';
|
||||
$GO_FIELDS['is_global']['massiveaction'] = false;
|
||||
|
||||
$GO_FIELDS['is_helpdesk_visible']['name'] = __("Associable to a ticket");
|
||||
$GO_FIELDS['is_helpdesk_visible']['input_type'] = 'bool';
|
||||
|
||||
$GO_FIELDS['locations_id']['name'] = __("Item location");
|
||||
$GO_FIELDS['locations_id']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['machine_room']['name'] = __("Machine Room");
|
||||
$GO_FIELDS['machine_room']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['states_id']['name'] = __("Status");
|
||||
$GO_FIELDS['states_id']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['back_up']['name'] = __("Backup");
|
||||
$GO_FIELDS['back_up']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['connect']['name'] = __("Connect");
|
||||
$GO_FIELDS['connect']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['users_id']['name'] = __("User");
|
||||
$GO_FIELDS['users_id']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['groups_id']['name'] = __("Group");
|
||||
$GO_FIELDS['groups_id']['input_type'] = 'dropdown';
|
||||
$GO_FIELDS['groups_id']['condition'] = ['is_itemgroup' => 1];
|
||||
|
||||
$GO_FIELDS['manufacturers_id']['name'] = __("Fournisseur");
|
||||
$GO_FIELDS['manufacturers_id']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['manufacturers_contact']['name'] = __("Fournisseur Contact");
|
||||
$GO_FIELDS['manufacturers_contact']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['cond_ification']['name'] = __("Codification");
|
||||
$GO_FIELDS['cond_ification']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['plc']['name'] = __("PLC");
|
||||
$GO_FIELDS['plc']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['plc_software']['name'] = __("PLC Software");
|
||||
$GO_FIELDS['plc_software']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['plc_ip_adr']['name'] = __("PLC IP Address");
|
||||
$GO_FIELDS['plc_ip_adr']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['hmi']['name'] = __("HMI");
|
||||
$GO_FIELDS['hmi']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc']['name'] = __("PC");
|
||||
$GO_FIELDS['pc']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/hmi']['name'] = __("HMI/PC Software");
|
||||
$GO_FIELDS['pc/hmi']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/hmi_software']['name'] = __("HMI Software");
|
||||
$GO_FIELDS['pc/hmi_software']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/hmi_ip']['name'] = __("HMI IP Address");
|
||||
$GO_FIELDS['pc/hmi_ip']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/hmi_ip_adr']['name'] = __("HMI/PC IP Address");
|
||||
$GO_FIELDS['pc/hmi_ip_adr']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/reseau']['name'] = __("Réseau");
|
||||
$GO_FIELDS['pc/reseau']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['pc/machine']['name'] = __("Machine");
|
||||
$GO_FIELDS['pc/machine']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['control_system']['name'] = __("Control System");
|
||||
$GO_FIELDS['control_system']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['admin_session']['name'] = __("Admin Session");
|
||||
$GO_FIELDS['admin_session']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['password']['name'] = __("Password");
|
||||
$GO_FIELDS['password']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['users_id_tech']['name'] = __("Technician in charge of the hardware");
|
||||
$GO_FIELDS['users_id_tech']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['domains_id']['name'] = __("Domain");
|
||||
$GO_FIELDS['domains_id']['input_type'] = 'dropdown';
|
||||
|
||||
$GO_FIELDS['contact']['name'] = __("Alternate username");
|
||||
$GO_FIELDS['contact']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['contact_num']['name'] = __("Alternate username number");
|
||||
$GO_FIELDS['contact_num']['input_type'] = 'text';
|
||||
|
||||
$GO_FIELDS['groups_id_tech']['name'] = __("Group in charge of the hardware");
|
||||
$GO_FIELDS['groups_id_tech']['input_type'] = 'dropdown';
|
||||
$GO_FIELDS['groups_id_tech']['condition'] = ['is_assign' => 1];
|
||||
44
plugins/genericobject/front/commondropdown.form.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (isset($_REQUEST['itemtype'])) {
|
||||
$itemtype = $_REQUEST['itemtype'];
|
||||
if (class_exists($itemtype)) {
|
||||
$dropdown = new $itemtype();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
} else {
|
||||
Html::displayErrorAndDie(__('The requested dropdown does not exists', 'genericobject'));
|
||||
}
|
||||
} else {
|
||||
|
||||
Html::displayErrorAndDie(__('Not Found!'));
|
||||
}
|
||||
46
plugins/genericobject/front/commondropdown.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (isset($_REQUEST['itemtype'])) {
|
||||
$itemtype = $_REQUEST['itemtype'];
|
||||
if (class_exists($itemtype)) {
|
||||
$dropdown = new $itemtype();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.php");
|
||||
} else {
|
||||
Html::displayErrorAndDie(__('The requested dropdown does not exists', 'genericobject'));
|
||||
}
|
||||
} else {
|
||||
|
||||
Html::displayErrorAndDie(__('Not Found!'));
|
||||
}
|
||||
|
||||
|
||||
44
plugins/genericobject/front/commontreedropdown.form.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (isset($_REQUEST['itemtype'])) {
|
||||
$itemtype = $_REQUEST['itemtype'];
|
||||
if (class_exists($itemtype)) {
|
||||
$dropdown = new $itemtype();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
} else {
|
||||
Html::displayErrorAndDie(__('The requested dropdown does not exists', 'genericobject'));
|
||||
}
|
||||
} else {
|
||||
|
||||
Html::displayErrorAndDie(__('Not Found!'));
|
||||
}
|
||||
32
plugins/genericobject/front/commontreedropdown.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
include ("./commondropdown.php");
|
||||
60
plugins/genericobject/front/familylist.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
|
||||
$family = new PluginGenericobjectTypeFamily();
|
||||
|
||||
if (!isset($_GET['id']) || !$family->getFromDB($_GET['id'])) {
|
||||
Html::header(__("Objects management", "genericobject"), $_SERVER['PHP_SELF'], "assets",
|
||||
"genericobject");
|
||||
|
||||
echo "<table class='tab_cadre_fixe'>";
|
||||
echo "<tr class='tab_bg_2'><th>".__("Empty family", "genericobject")."</th></tr>";
|
||||
echo "</table>";
|
||||
} else {
|
||||
$family->getFromDB($_GET['id']);
|
||||
Html::header(__("Objects management", "genericobject"), $_SERVER['PHP_SELF'], "assets",
|
||||
$family->getName());
|
||||
|
||||
echo "<table class='tab_cadre_fixe'>";
|
||||
$types = PluginGenericobjectTypeFamily::getItemtypesByFamily($_GET['id']);
|
||||
echo "<tr class='tab_bg_2'><th>".Dropdown::getDropdownName("glpi_plugin_genericobject_typefamilies", $_GET['id'])."</th></tr>";
|
||||
foreach ($types as $type) {
|
||||
$itemtype = $type['itemtype'];
|
||||
echo "<tr class='tab_bg_1'><td align='center'>";
|
||||
echo "<a href='".$itemtype::getSearchURL()."'>";
|
||||
echo $itemtype::getTypeName();
|
||||
echo "</a></td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
Html::footer();
|
||||
62
plugins/genericobject/front/field.form.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
if (isset ($_POST["delete"])) {
|
||||
if (isset($_POST["fields"]) && count($_POST["fields"] > 0 )) {
|
||||
$type = new PluginGenericobjectType();
|
||||
$type->getFromDB($_POST["id"]);
|
||||
$itemtype = $type->fields['itemtype'];
|
||||
PluginGenericobjectType::registerOneType($itemtype);
|
||||
|
||||
foreach ($_POST["fields"] as $field => $value) {
|
||||
if ($type->can($_POST["id"], PURGE)
|
||||
&& $value == 1
|
||||
&& PluginGenericobjectField::checkNecessaryFieldsDelete($itemtype, $field)) {
|
||||
PluginGenericobjectField::deleteField(getTableForItemType($itemtype), $field);
|
||||
Session::addMessageAfterRedirect(__("Field(s) deleted successfully", "genericobject"), true, INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (isset ($_POST["add_field"])) {
|
||||
$type = new PluginGenericobjectType();
|
||||
if ($_POST["new_field"] && $type->can($_POST["id"], UPDATE)) {
|
||||
$itemtype = $type->fields['itemtype'];
|
||||
PluginGenericobjectType::registerOneType($itemtype);
|
||||
PluginGenericobjectField::addNewField(getTableForItemType($itemtype), $_POST["new_field"]);
|
||||
Session::addMessageAfterRedirect(__("Field added successfully", "genericobject"));
|
||||
}
|
||||
} else if (isset($_POST['action'])) {
|
||||
//Move field
|
||||
PluginGenericobjectField::changeFieldOrder($_POST);
|
||||
}
|
||||
|
||||
Html::back();
|
||||
|
||||
112
plugins/genericobject/front/object.form.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$itemtype = null;
|
||||
|
||||
if (isset($_REQUEST['itemtype'])) {
|
||||
|
||||
$types = array_keys(PluginGenericobjectType::getTypes());
|
||||
|
||||
$requested_type = $_REQUEST['itemtype'];
|
||||
$error = [];
|
||||
|
||||
if (!in_array($requested_type, $types)) {
|
||||
$error[] = __('The requested type has not been defined yet!');
|
||||
if (!PluginGenericobjectType::canCreate()) {
|
||||
$error[] = __('Please ask your administrator to create this type of object');
|
||||
};
|
||||
} else if (!class_exists($requested_type)) {
|
||||
$error[]= __('The generated files for the requested type of object are missing!');
|
||||
$error[]= __('You might need to regenerate the files under '.GENERICOBJECT_DOC_DIR.'.');
|
||||
}
|
||||
|
||||
if (count($error) > 0) {
|
||||
Html::header(__('Type not found!'));
|
||||
Html::displayErrorAndDie(implode('<br/>', $error));
|
||||
|
||||
} else {
|
||||
$itemtype = $requested_type;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_null($itemtype)) {
|
||||
|
||||
if (!isset($_REQUEST['id'])) {
|
||||
$id = -1;
|
||||
} else {
|
||||
$id = $_REQUEST['id'];
|
||||
}
|
||||
|
||||
if (!isset($_GET["withtemplate"])) {
|
||||
$_GET["withtemplate"] = "";
|
||||
}
|
||||
|
||||
$item = new $itemtype();
|
||||
|
||||
if (isset ($_POST["add"])) {
|
||||
$item->check($id, CREATE);
|
||||
$newID = $item->add($_POST);
|
||||
|
||||
if ($_SESSION['glpibackcreated']) {
|
||||
Html::redirect($itemtype::getFormURL()."&id=".$newID);
|
||||
} else {
|
||||
Html::back();
|
||||
}
|
||||
} else if (isset ($_POST["update"])) {
|
||||
$item->check($id, UPDATE);
|
||||
$item->update($_POST);
|
||||
Html::back();
|
||||
} else if (isset ($_POST["restore"])) {
|
||||
$item->check($id, DELETE);
|
||||
$item->restore($_POST);
|
||||
Html::back();
|
||||
} else if (isset($_POST["purge"])) {
|
||||
$item->check($id, PURGE);
|
||||
$item->delete($_POST, 1);
|
||||
$item->redirectToList();
|
||||
} else if (isset($_POST["delete"])) {
|
||||
$item->check($id, DELETE);
|
||||
$item->delete($_POST);
|
||||
$item->redirectToList();
|
||||
}
|
||||
$menu = PluginGenericobjectType::getFamilyNameByItemtype($_GET['itemtype']);
|
||||
Html::header($itemtype::getTypeName(), $_SERVER['PHP_SELF'],
|
||||
"assets", ($menu!==false?$menu:$itemtype), strtolower($itemtype));
|
||||
|
||||
$item->display($_GET, ['withtemplate' => $_GET["withtemplate"]]);
|
||||
|
||||
Html::footer();
|
||||
} else {
|
||||
Html::header(__('Access Denied!'));
|
||||
Html::DisplayErrorAndDie(__("You can't access to this page directly!"));
|
||||
}
|
||||
|
||||
42
plugins/genericobject/front/object.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (isset($_GET['itemtype'])) {
|
||||
Session::checkRight(PluginGenericobjectProfile::getProfileNameForItemtype($_GET['itemtype']), READ);
|
||||
$menu = PluginGenericobjectType::getFamilyNameByItemtype($_GET['itemtype']);
|
||||
Html::header(__("Type of objects", "genericobject"),
|
||||
$_SERVER['PHP_SELF'], "assets", ($menu!==false?$menu:strtolower($_GET['itemtype'])), strtolower($_GET['itemtype']));
|
||||
Search::Show($_GET['itemtype']);
|
||||
|
||||
}
|
||||
|
||||
Html::footer();
|
||||
54
plugins/genericobject/front/profile.form.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkRight("profile", UPDATE);
|
||||
|
||||
_log($_POST);
|
||||
$prof = new Profile();
|
||||
|
||||
/* save profile */
|
||||
if (isset($_POST['update_all_rights']) && isset($_POST['itemtype'])) {
|
||||
$profiles = [];
|
||||
foreach ($_POST as $key => $val) {
|
||||
if (preg_match("/^profile_/", $key)) {
|
||||
$id = preg_replace("/^profile_/", "", $key);
|
||||
$profiles[$id] = [
|
||||
"id" => $id,
|
||||
"_".PluginGenericobjectProfile::getProfileNameForItemtype($_POST['itemtype']) => $val
|
||||
];
|
||||
}
|
||||
}
|
||||
_log($profiles);
|
||||
foreach ($profiles as $profile_id => $input) {
|
||||
$prof->update($input);
|
||||
}
|
||||
}
|
||||
Html::redirect($_SERVER['HTTP_REFERER']);
|
||||
80
plugins/genericobject/front/type.form.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (!isset ($_GET["id"])) {
|
||||
$_GET["id"] = '';
|
||||
}
|
||||
$type = new PluginGenericobjectType();
|
||||
$extraparams = [];
|
||||
if (isset ($_POST["select"]) && $_POST["select"] == "all") {
|
||||
$extraparams["selected"] = "checked";
|
||||
}
|
||||
|
||||
//Change fields order
|
||||
if (isset ($_GET["action"])) {
|
||||
$type->getFromDB($_REQUEST["id"]);
|
||||
PluginGenericobjectType::registerOneType($type);
|
||||
PluginGenericobjectObject::changeFieldOrder($_GET["field"], $type->fields["itemtype"],
|
||||
$_GET["action"]);
|
||||
Html::back();
|
||||
|
||||
} else if (isset ($_POST["add"])) {
|
||||
//Add a new itemtype
|
||||
$new_id = $type->add($_POST);
|
||||
Html::redirect(Toolbox::getItemTypeFormURL('PluginGenericobjectType')."?id=$new_id");
|
||||
|
||||
} else if (isset ($_POST["update"])) {
|
||||
//Update an existing itemtype
|
||||
if (isset($_POST['itemtypes']) && is_array($_POST['itemtypes'])) {
|
||||
$_POST['linked_itemtypes'] = json_encode($_POST['itemtypes']);
|
||||
}
|
||||
$type->update($_POST);
|
||||
Html::back();
|
||||
|
||||
} else if (isset ($_POST["purge"])) {
|
||||
//Delete an itemtype
|
||||
$type->delete($_POST);
|
||||
$type->redirectToList();
|
||||
|
||||
} else if (isset($_POST['regenerate'])) {
|
||||
//Regenerate files for an itemtype
|
||||
$type->getFromDB($_POST["id"]);
|
||||
PluginGenericobjectType::checkClassAndFilesForOneItemType($type->fields['itemtype'],
|
||||
$type->fields['name'], true);
|
||||
Html::back();
|
||||
}
|
||||
|
||||
Html::header(__("Objects management", "genericobject"), $_SERVER['PHP_SELF'], "config",
|
||||
"PluginGenericobjectType");
|
||||
$type->display($_GET);
|
||||
|
||||
Html::footer();
|
||||
48
plugins/genericobject/front/type.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
if (isset($_GET['itemtype'])
|
||||
&& !isset($_GET['search'])
|
||||
&& !isset($_GET['sort'])) {
|
||||
$type = new PluginGenericobjectType();
|
||||
$type->getFromDBByType($_GET['itemtype']);
|
||||
Html::redirect(Toolbox::getItemTypeFormURL('PluginGenericobjectType').'?id='.$type->getID());
|
||||
|
||||
} else if (Session::haveRightsOr('plugin_genericobject_types', [READ, CREATE, UPDATE, PURGE])) {
|
||||
Html::header(__("Type of objects", "genericobject"), $_SERVER['PHP_SELF'], "config",
|
||||
"PluginGenericobjectType");
|
||||
Search::Show('PluginGenericobjectType');
|
||||
Html::footer();
|
||||
|
||||
} else {
|
||||
Html::redirect($CFG_GLPI['root_doc']."/front/central.php");
|
||||
}
|
||||
35
plugins/genericobject/front/typefamily.form.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$dropdown = new PluginGenericobjectTypeFamily();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
|
||||
35
plugins/genericobject/front/typefamily.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$dropdown = new PluginGenericobjectTypeFamily();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.php");
|
||||
|
||||
BIN
plugins/genericobject/genericobject.gif
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
BIN
plugins/genericobject/genericobject.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
215
plugins/genericobject/genericobject.xml
Normal file
@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root>
|
||||
<name>Generic Objects Management</name>
|
||||
<key>genericobject</key>
|
||||
<state>stable</state>
|
||||
<logo>https://raw.githubusercontent.com/pluginsGLPI/genericobject/master/genericobject.png</logo>
|
||||
<description>
|
||||
<short>
|
||||
<fr><![CDATA[Faites l'inventaire de nouveaux types d'objets]]></fr>
|
||||
<en><![CDATA[Do the inventory of new, non-native object types]]></en>
|
||||
<cs><![CDATA[Inventarizace nových, nenativních typů objektů]]></cs>
|
||||
</short>
|
||||
<long>
|
||||
<fr><![CDATA[Ce plugin vous permet de faire l'inventaire de nouveaux types d'objets génériques, sans avoir à programmer. Generic Objects vous permet de créer ces nouveaux types, les champs disponibles pour ces types. Il est intégré à GLPi dans ses fonctionnalités mère (Helpdesk, réservation, gabarits, etc.). Generic Objects est compatible avec le plugin File Injection permettant l'injection des données.]]></fr>
|
||||
<en><![CDATA[This plugin allows you to do the inventory of new item types without having to code, it allows you to create those new item types, it allows type creation, manages available fields. Has full integration with the software (Helpdesk, loans, templates, etc.) It has support and connectivity for and with the File Injection plugin]]></en>
|
||||
<cs><![CDATA[Tento zásuvný modul umožňuje inventarizovat nové typy položek, aniž by bylo třeba programovat. Umožňuje vytvářet tyto nové typy položek, typů a spravovat kolonky, které budou k dispozici. Je plně začleněný do software (Služba podpory, zápůjčky, šablony, atd.) Má podporu a propojení pro a se zásuvným modulem Vkládání dat ze souboru]]></cs>
|
||||
</long>
|
||||
</description>
|
||||
<homepage>https://github.com/pluginsGLPI/genericobject</homepage>
|
||||
<download>https://github.com/pluginsGLPI/genericobject/releases</download>
|
||||
<issues>https://github.com/pluginsGLPI/genericobject/issues</issues>
|
||||
<readme>https://glpi-plugins.readthedocs.io/en/latest/genericobject/index.html</readme>
|
||||
<authors>
|
||||
<author>Walid Nouh</author>
|
||||
</authors>
|
||||
<versions>
|
||||
<version>
|
||||
<num>2.12.0-rc3</num>
|
||||
<compatibility>~10.0.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.12.0-rc3/glpi-genericobject-2.12.0-rc3.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.12.0-rc2</num>
|
||||
<compatibility>~10.0.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.12.0-rc2/glpi-genericobject-2.12.0-rc2.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.12.0-rc1</num>
|
||||
<compatibility>~10.0.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.12.0-rc1/glpi-genericobject-2.12.0-rc1.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.11.1</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.11.1/glpi-genericobject-2.11.1.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.11.0</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.11.0/glpi-genericobject-2.11.0.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.10.1</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.10.1/glpi-genericobject-2.10.1.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.10.0</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.10.0/glpi-genericobject-2.10.0.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.9.2</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.9.2/glpi-genericobject-2.9.2.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.9.1</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.9.1/glpi-genericobject-2.9.1.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.9.0</num>
|
||||
<compatibility>~9.5.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.9.0/glpi-genericobject-2.9.0.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.8.0</num>
|
||||
<compatibility>~9.4.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.8.0/glpi-genericobject-2.8.0.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.7.0</num>
|
||||
<compatibility>~9.4.0</compatibility>
|
||||
<download_url>https://github.com/pluginsGLPI/genericobject/releases/download/2.7.0/glpi-genericobject-2.7.0.tar.bz2</download_url>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.6.2</num>
|
||||
<compatibility>9.3</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.6.1</num>
|
||||
<compatibility>9.3</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.6.0</num>
|
||||
<compatibility>9.3</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.5.2</num>
|
||||
<compatibility>9.2</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.5.1</num>
|
||||
<compatibility>9.2</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.5.0</num>
|
||||
<compatibility>9.2</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.4.0</num>
|
||||
<compatibility>0.85</compatibility>
|
||||
<compatibility>0.90</compatibility>
|
||||
<compatibility>9.1</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>0.85-1.1</num>
|
||||
<compatibility>0.85</compatibility>
|
||||
<compatibility>0.90</compatibility>
|
||||
<compatibility>9.1</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>0.85-1.0</num>
|
||||
<compatibility>0.85</compatibility>
|
||||
<compatibility>0.90</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.3.2</num>
|
||||
<compatibility>0.84</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.3.1</num>
|
||||
<compatibility>0.84</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.3.0</num>
|
||||
<compatibility>0.84</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.1.3</num>
|
||||
<compatibility>0.83</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.1.2</num>
|
||||
<compatibility>0.83</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.1.1</num>
|
||||
<compatibility>0.83</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.1.0</num>
|
||||
<compatibility>0.83</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.0.2</num>
|
||||
<compatibility>0.80</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.0.1</num>
|
||||
<compatibility>0.80</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>2.0.0</num>
|
||||
<compatibility>0.80</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>1.1.2</num>
|
||||
<compatibility>0.72</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>1.1.1</num>
|
||||
<compatibility>0.72</compatibility>
|
||||
</version>
|
||||
<version>
|
||||
<num>1.0.0</num>
|
||||
<compatibility>0.72</compatibility>
|
||||
</version>
|
||||
</versions>
|
||||
<langs>
|
||||
<lang>cs_CZ</lang>
|
||||
<lang>fr_FR</lang>
|
||||
<lang>en_GB</lang>
|
||||
<lang>es_AR</lang>
|
||||
</langs>
|
||||
<category></category>
|
||||
<tags>
|
||||
<fr>
|
||||
<tag>inventaire</tag>
|
||||
<tag>objets</tag>
|
||||
<tag>générique</tag>
|
||||
<tag>helpdesk</tag>
|
||||
<tag>réservations</tag>
|
||||
</fr>
|
||||
<en>
|
||||
<tag>inventory</tag>
|
||||
<tag>objects</tag>
|
||||
<tag>generic</tag>
|
||||
<tag>helpdesk</tag>
|
||||
<tag>loans</tag>
|
||||
</en>
|
||||
<cs>
|
||||
<tag>inventář</tag>
|
||||
<tag>objekty</tag>
|
||||
<tag>obecné</tag>
|
||||
<tag>službapodpory</tag>
|
||||
<tag>zápůjčky</tag>
|
||||
</cs>
|
||||
</tags>
|
||||
<screenshots>
|
||||
<screenshot>https://raw.githubusercontent.com/pluginsGLPI/genericobject/master/genericobject.gif</screenshot>
|
||||
</screenshots>
|
||||
<license>GPL v2+</license>
|
||||
</root>
|
||||
BIN
plugins/genericobject/glpi_network.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
215
plugins/genericobject/hook.php
Normal file
@ -0,0 +1,215 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function plugin_genericobject_AssignToTicket($types) {
|
||||
foreach (PluginGenericobjectType::getTypes() as $tmp => $value) {
|
||||
$itemtype = $value['itemtype'];
|
||||
if ($value['use_tickets']) {
|
||||
if (class_exists($itemtype)) {
|
||||
$types[$itemtype] = $itemtype::getTypeName();
|
||||
} else {
|
||||
$types[$itemtype] = $itemtype;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $types;
|
||||
}
|
||||
|
||||
// Define Dropdown tables to be manage in GLPI :
|
||||
function plugin_genericobject_getDropdown() {
|
||||
|
||||
$dropdowns = ['PluginGenericobjectTypeFamily' => PluginGenericobjectTypeFamily::getTypeName(2)];
|
||||
|
||||
$plugin = new Plugin();
|
||||
if ($plugin->isActivated("genericobject")) {
|
||||
foreach (PluginGenericobjectType::getTypes() as $type) {
|
||||
//_log($idx, var_export($type, true));
|
||||
$itemtype = $type['itemtype'];
|
||||
PluginGenericobjectType::registerOneType($itemtype);
|
||||
foreach (PluginGenericobjectType::getDropdownForItemtype($itemtype) as $table) {
|
||||
$dropdown_itemtype = getItemTypeForTable($table);
|
||||
if (class_exists( $dropdown_itemtype)) {
|
||||
$dropdowns[$dropdown_itemtype] = $dropdown_itemtype::getTypeName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $dropdowns;
|
||||
}
|
||||
|
||||
// Define dropdown relations
|
||||
function plugin_genericobject_getDatabaseRelations() {
|
||||
$dropdowns = [];
|
||||
|
||||
//TODO : purt here relations
|
||||
/*
|
||||
$plugin = new Plugin();
|
||||
if ($plugin->isActivated("genericobject")) {
|
||||
foreach(getAllDatasFromTable(getTableForItemType('PluginGenericobjectType'),
|
||||
"`is_active`='1'") as $itemtype) {
|
||||
foreach(PluginGenericobjectType::getDropdownForItemtype($itemtype) as $table) {
|
||||
$dropdowns[$table][] = []
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return $dropdowns;
|
||||
}
|
||||
|
||||
function plugin_uninstall_addUninstallTypes($uninstal_types = []) {
|
||||
foreach (PluginGenericobjectType::getTypes() as $tmp => $type) {
|
||||
if ($type["use_plugin_uninstall"]) {
|
||||
$uninstal_types[] = $type["itemtype"];
|
||||
}
|
||||
}
|
||||
return $uninstal_types;
|
||||
}
|
||||
|
||||
//----------------------- INSTALL / UNINSTALL FUNCTION -------------------------------//
|
||||
|
||||
/**
|
||||
* Plugin install process
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function plugin_genericobject_install() {
|
||||
global $DB;
|
||||
|
||||
include_once(GENERICOBJECT_DIR."/inc/object.class.php");
|
||||
include_once(GENERICOBJECT_DIR."/inc/type.class.php");
|
||||
|
||||
$migration = new Migration(PLUGIN_GENERICOBJECT_VERSION);
|
||||
|
||||
foreach ([
|
||||
'PluginGenericobjectField',
|
||||
'PluginGenericobjectCommonDropdown',
|
||||
'PluginGenericobjectCommonTreeDropdown',
|
||||
'PluginGenericobjectProfile',
|
||||
'PluginGenericobjectType',
|
||||
'PluginGenericobjectTypeFamily'
|
||||
] as $itemtype) {
|
||||
if ($plug=isPluginItemType($itemtype)) {
|
||||
$plugname = strtolower($plug['plugin']);
|
||||
$dir = Plugin::getPhpDir($plugname)."/inc/";
|
||||
$item = strtolower($plug['class']);
|
||||
if (file_exists("$dir$item.class.php")) {
|
||||
include_once ("$dir$item.class.php");
|
||||
if (method_exists($itemtype, 'install')) {
|
||||
$itemtype::install($migration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_dir(GENERICOBJECT_CLASS_PATH)) {
|
||||
@ mkdir(GENERICOBJECT_CLASS_PATH, 0755, true)
|
||||
or die("Can't create folder " . GENERICOBJECT_CLASS_PATH);
|
||||
}
|
||||
|
||||
//Init plugin & types
|
||||
plugin_init_genericobject();
|
||||
|
||||
//Init profiles
|
||||
PluginGenericobjectProfile::changeProfile();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin uninstall process
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function plugin_genericobject_uninstall() {
|
||||
global $DB;
|
||||
|
||||
include_once(GENERICOBJECT_DIR."/inc/object.class.php");
|
||||
include_once(GENERICOBJECT_DIR."/inc/type.class.php");
|
||||
|
||||
//For each type
|
||||
foreach (PluginGenericobjectType::getTypes(true) as $tmp => $value) {
|
||||
$itemtype = $value['itemtype'];
|
||||
if (class_exists($itemtype)) {
|
||||
$itemtype::uninstall();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ([
|
||||
'PluginGenericobjectType',
|
||||
'PluginGenericobjectProfile',
|
||||
'PluginGenericobjectField',
|
||||
'PluginGenericobjectTypeFamily'
|
||||
] as $itemtype) {
|
||||
if ($plug=isPluginItemType($itemtype)) {
|
||||
$plugname = strtolower($plug['plugin']);
|
||||
$dir = Plugin::getPhpDir($plugname)."/inc/";
|
||||
$item = strtolower($plug['class']);
|
||||
if (file_exists("$dir$item.class.php")) {
|
||||
include_once ("$dir$item.class.php");
|
||||
$itemtype::uninstall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete all models of datainjection about genericobject
|
||||
$table_datainjection_model = 'glpi_plugin_datainjection_models';
|
||||
if ($DB->tableExists($table_datainjection_model)) {
|
||||
$DB->query("DELETE FROM $table_datainjection_model WHERE itemtype LIKE 'PluginGenericobject%'");
|
||||
}
|
||||
|
||||
// Invalidate menu data in current session
|
||||
unset($_SESSION['glpimenu']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function plugin_datainjection_populate_genericobject() {
|
||||
global $INJECTABLE_TYPES;
|
||||
$type = new PluginGenericobjectType();
|
||||
foreach ($type->find(['use_plugin_datainjection' => 1, 'is_active' => 1]) as $data) {
|
||||
if (class_exists($data ['itemtype']."Injection")) {
|
||||
$INJECTABLE_TYPES[$data ['itemtype']."Injection"] = 'genericobject';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function plugin_genericobject_MassiveActions($type) {
|
||||
$types = PluginGenericobjectType::getTypes();
|
||||
if (isset($types[$type])) {
|
||||
$objecttype = PluginGenericobjectType::getInstance($type);
|
||||
if ($objecttype->isTransferable()) {
|
||||
return ['PluginGenericobjectObject'.
|
||||
MassiveAction::CLASS_ACTION_SEPARATOR.'plugin_genericobject_transfer' => __("Transfer")];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
95
plugins/genericobject/inc/autoload.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectAutoloader
|
||||
{
|
||||
protected $paths = [];
|
||||
|
||||
public function __construct($options = null) {
|
||||
if (null !== $options) {
|
||||
$this->setOptions($options);
|
||||
}
|
||||
}
|
||||
|
||||
public function setOptions($options) {
|
||||
if (!is_array($options) && !($options instanceof \Traversable)) {
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
foreach ($options as $path) {
|
||||
if (!in_array($path, $this->paths)) {
|
||||
$this->paths[] = $path;
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function processClassname($classname) {
|
||||
preg_match("/^Plugin([A-Z][a-z0-9]+)([A-Z]\w+)$/", $classname, $matches);
|
||||
|
||||
if (count($matches) < 3) {
|
||||
return false;
|
||||
} else {
|
||||
return $matches;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function autoload($classname) {
|
||||
$matches = $this->processClassname($classname);
|
||||
|
||||
if ($matches !== false) {
|
||||
$plugin_name = strtolower($matches[1]);
|
||||
$class_name = strtolower($matches[2]);
|
||||
|
||||
if ($plugin_name !== "genericobject") {
|
||||
return false;
|
||||
}
|
||||
|
||||
$filename = implode(".", [
|
||||
$class_name,
|
||||
"class",
|
||||
"php"
|
||||
]);
|
||||
|
||||
foreach ($this->paths as $path) {
|
||||
$test = $path . DIRECTORY_SEPARATOR . $filename;
|
||||
if (file_exists($test)) {
|
||||
return include_once($test);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function register() {
|
||||
spl_autoload_register([$this, 'autoload']);
|
||||
}
|
||||
}
|
||||
50
plugins/genericobject/inc/commondropdown.class.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectCommonDropdown extends CommonDropdown {
|
||||
|
||||
//Get itemtype name
|
||||
static function getTypeName($nb = 0) {
|
||||
$class=get_called_class();
|
||||
return dropdown_getTypeName($class, $nb);
|
||||
}
|
||||
|
||||
static function getFormURL($full = true) {
|
||||
return Toolbox::getItemTypeFormURL( get_parent_class(get_called_class()), $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
}
|
||||
static function getSearchURL($full = true) {
|
||||
return Toolbox::getItemTypeSearchURL( get_parent_class(get_called_class()), $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
51
plugins/genericobject/inc/commontreedropdown.class.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectCommonTreeDropdown extends CommonTreeDropdown {
|
||||
|
||||
//Get itemtype name
|
||||
static function getTypeName($nb = 0) {
|
||||
$class=get_called_class();
|
||||
return dropdown_getTypeName($class, $nb);
|
||||
}
|
||||
|
||||
static function getFormURL($full = true) {
|
||||
_log("PluginGenericobjectCommonTreeDropdown::getFormURL", get_parent_class(get_called_class()));
|
||||
return Toolbox::getItemTypeFormURL( get_parent_class(get_called_class()), $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
}
|
||||
static function getSearchURL($full = true) {
|
||||
_log("PluginGenericobjectCommonTreeDropdown::getSearchURL", get_parent_class(get_called_class()));
|
||||
return Toolbox::getItemTypeSearchURL( get_parent_class(get_called_class()), $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
538
plugins/genericobject/inc/field.class.php
Normal file
@ -0,0 +1,538 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectField extends CommonDBTM {
|
||||
|
||||
/**
|
||||
*
|
||||
* Displat all fields present in DB for an itemtype
|
||||
* @param $id the itemtype's id
|
||||
*/
|
||||
public static function showObjectFieldsForm($id) {
|
||||
global $DB, $GO_BLACKLIST_FIELDS, $GO_READONLY_FIELDS, $GO_FIELDS, $CFG_GLPI;
|
||||
|
||||
$url = Toolbox::getItemTypeFormURL(__CLASS__);
|
||||
$object_type = new PluginGenericobjectType();
|
||||
$object_type->getFromDB($id);
|
||||
$itemtype = $object_type->fields['itemtype'];
|
||||
$fields_in_db = PluginGenericobjectSingletonObjectField::getInstance($itemtype);
|
||||
$used_fields = [];
|
||||
|
||||
//Reset fields definition only to keep the itemtype ones
|
||||
$GO_FIELDS = [];
|
||||
plugin_genericobject_includeCommonFields(true);
|
||||
|
||||
PluginGenericobjectType::includeLocales($object_type->fields['name']);
|
||||
PluginGenericobjectType::includeConstants($object_type->fields['name'], true);
|
||||
|
||||
self::addReadOnlyFields($object_type);
|
||||
|
||||
foreach ($GO_BLACKLIST_FIELDS as $autofield) {
|
||||
if (!in_array($autofield, $used_fields)) {
|
||||
$used_fields[$autofield] = $autofield;
|
||||
}
|
||||
}
|
||||
|
||||
echo "<div class='center'>";
|
||||
echo "<form id='fieldslist' method='POST' action='$url'>";
|
||||
echo "<table class='tab_cadre_fixe' >";
|
||||
echo "<input type='hidden' name='id' value='$id'>";
|
||||
echo "<tr class='tab_bg_1'><th colspan='7'>";
|
||||
echo __("Fields associated with the object", "genericobject") . " : ";
|
||||
echo $itemtype::getTypeName();
|
||||
echo "</th></tr>";
|
||||
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<th width='10'></th>";
|
||||
echo "<th>" . __("Label", "genericobject") . "</th>";
|
||||
echo "<th>" . __("Name in DB", "genericobject") . "</th>";
|
||||
echo "<th width='10'></th>";
|
||||
echo "<th width='10'></th>";
|
||||
echo "</tr>";
|
||||
|
||||
$total = count($fields_in_db);
|
||||
$global_index = $index = 1;
|
||||
$haveCheckbox = false;
|
||||
|
||||
foreach ($fields_in_db as $field => $value) {
|
||||
$readonly = in_array($field, $GO_READONLY_FIELDS);
|
||||
$blacklist = in_array($field, $GO_BLACKLIST_FIELDS);
|
||||
|
||||
self::displayFieldDefinition($url, $itemtype, $field, $index, ($global_index==$total));
|
||||
|
||||
//All backlisted fields cannot be moved, and are listed first
|
||||
if (!$readonly) {
|
||||
$index++;
|
||||
}
|
||||
|
||||
if (!$blacklist && !$readonly) {
|
||||
$haveCheckbox = true;
|
||||
}
|
||||
|
||||
//$table = getTableNameForForeignKeyField($field);
|
||||
$used_fields[$field] = $field;
|
||||
$global_index++;
|
||||
}
|
||||
echo "</table>";
|
||||
if ($haveCheckbox) {
|
||||
echo "<table class='tab_glpi' width='950px'>";
|
||||
echo "<tr>";
|
||||
echo "<td><img src='".$CFG_GLPI["root_doc"]."/pics/arrow-left.png'
|
||||
alt=''></td>";
|
||||
echo "<td class='center' style='white-space:nowrap;'>";
|
||||
echo "<a onclick= \"if ( markCheckboxes('fieldslist') ) return false;\"
|
||||
href='#'>".__('Check all')."</a></td>";
|
||||
echo "<td>/</td>";
|
||||
echo "<td class='center' style='white-space:nowrap;'>";
|
||||
echo "<a onclick= \"if ( unMarkCheckboxes('fieldslist') ) return false;\"
|
||||
href='#'>".__('Uncheck all')."</a></td>";
|
||||
echo "<td class='left' width='80%'>";
|
||||
echo Html::submit(__("Delete permanently"), [
|
||||
'name' => 'delete',
|
||||
]);
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
$dropdownFields = self::dropdownFields("new_field", $itemtype, $used_fields);
|
||||
|
||||
if ($dropdownFields) {
|
||||
echo "<br>";
|
||||
echo "<table class='tab_cadre genericobject_fields add_new'>";
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td class='label'>" . __("Add new field", "genericobject") . "</td>";
|
||||
echo "<td align='left' class='dropdown'>";
|
||||
echo $dropdownFields;
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "<input type='submit' name='add_field' value=\"" . _sx('button', 'Add') . "\" class='submit'>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
Html::closeForm();
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set fields as read only, when the depend on some features
|
||||
* that are enabled
|
||||
* @since 0.85+2.4.0
|
||||
*/
|
||||
static function addReadOnlyFields(PluginGenericobjectType $type) {
|
||||
global $GO_READONLY_FIELDS;
|
||||
|
||||
if ($type->canBeReserved()) {
|
||||
$GO_READONLY_FIELDS[] = 'users_id';
|
||||
$GO_READONLY_FIELDS[] = 'locations_id';
|
||||
}
|
||||
|
||||
if ($type->canUseGlobalSearch()) {
|
||||
$GO_READONLY_FIELDS[] = 'serial';
|
||||
$GO_READONLY_FIELDS[] = 'otherserial';
|
||||
$GO_READONLY_FIELDS[] = 'locations_id';
|
||||
$GO_READONLY_FIELDS[] = 'states_id';
|
||||
$GO_READONLY_FIELDS[] = 'users_id';
|
||||
$GO_READONLY_FIELDS[] = 'groups_id';
|
||||
$GO_READONLY_FIELDS[] = 'manufacturers_id';
|
||||
$GO_READONLY_FIELDS[] = 'users_id_tech';
|
||||
}
|
||||
|
||||
if ($type->canUseItemDevice()) {
|
||||
$GO_READONLY_FIELDS[] = 'locations_id';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the name of the field, as defined in a constant file
|
||||
* The name may be the same, or not depending if it's an isolated dropdown or not
|
||||
*/
|
||||
static function getFieldName($field, $itemtype, $options, $remove_prefix = false) {
|
||||
global $DB;
|
||||
$field_orig = $field;
|
||||
$field_table = null;
|
||||
$input_type = isset($options['input_type'])
|
||||
? $options['input_type']
|
||||
: null;
|
||||
switch ($input_type) {
|
||||
|
||||
case 'dropdown':
|
||||
$dropdown_type = isset($options['dropdown_type'])
|
||||
? $options['dropdown_type']
|
||||
: null;
|
||||
$fk = getForeignKeyFieldForTable(getTableForItemType($itemtype));
|
||||
|
||||
if ($dropdown_type == 'isolated') {
|
||||
if (!$remove_prefix) {
|
||||
$field = preg_replace("/s_id$/", $field, $fk);
|
||||
} else {
|
||||
$fk = preg_replace("/s_id$/", "", $fk);
|
||||
$field = preg_replace("/".$fk."/", "", $field);
|
||||
}
|
||||
}
|
||||
$field_table = getTableNameForForeignKeyField($field);
|
||||
|
||||
//Prepend plugin's table prefix if this dropdown is not already handled by GLPI natively
|
||||
if (substr($field, 0, strlen('plugin_genericobject')) !== 'plugin_genericobject'
|
||||
and (
|
||||
substr($field_table, strlen('glpi_'))
|
||||
=== substr($field, 0, strlen($field) -strlen('_id'))
|
||||
)
|
||||
and !$DB->tableExists($field_table)
|
||||
) {
|
||||
if (!$remove_prefix) {
|
||||
$field = 'plugin_genericobject_' . $field;}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return $field;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Display a dropdown with all available fields for an itemtype
|
||||
* @since
|
||||
* @param $name the dropdown name
|
||||
* @param $itemtype the itemtype
|
||||
* @param $used an array which contains all fields already added
|
||||
*
|
||||
* @return the dropdown random ID
|
||||
*/
|
||||
static function dropdownFields($name, $itemtype, $used = []) {
|
||||
global $GO_FIELDS;
|
||||
|
||||
$dropdown_types = [];
|
||||
foreach ($GO_FIELDS as $field => $values) {
|
||||
$message = "";
|
||||
$field_options = [];
|
||||
$field = self::getFieldName($field, $itemtype, $values, false);
|
||||
if (!in_array($field, $used)) {
|
||||
if (!isset($dropdown_types[$field])) {
|
||||
//Global management :
|
||||
//meaning that a dropdown can be useful in all types (for example type, model, etc.)
|
||||
if (isset($values['input_type']) && $values['input_type'] == 'dropdown') {
|
||||
if (isset($values['entities_id'])) {
|
||||
$field_options[] = __("Entity")." : ".Dropdown::getYesNo($values['entities_id']);
|
||||
if ($values['entities_id']) {
|
||||
if (isset($values['is_recursive'])) {
|
||||
$field_options[] = __("Child entities")." : ".Dropdown::getYesNo($values['is_recursive']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$field_options[] = __("Entity")." : ".Dropdown::getYesNo(0);
|
||||
}
|
||||
if (isset($values['is_tree'])) {
|
||||
$field_options[] = __("tree structure")." : ".Dropdown::getYesNo($values['is_tree']);
|
||||
} else {
|
||||
$field_options[] = __("tree structure")." : ".Dropdown::getYesNo(0);
|
||||
}
|
||||
//if (isset($values['isolated']) and $values['isolated']) {
|
||||
// $field_options[] = __("Isolated") . " : ". Dropdown::getYesNo($values['isolated']);
|
||||
//} else {
|
||||
// $field_options[] = __("Isolated") . " : ". Dropdown::getYesNo(0);
|
||||
//}
|
||||
}
|
||||
if (!empty($field_options)) {
|
||||
$message = "(".trim( implode(", ", $field_options)).")";
|
||||
}
|
||||
}
|
||||
$dropdown_types[$field] = $values['name']." ".$message;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't show dropdown empty
|
||||
if (empty($dropdown_types)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
ksort($dropdown_types);
|
||||
return Dropdown::showFromArray($name, $dropdown_types, ['display' => false]);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get field's options defined in constant files.
|
||||
* If this field has not been defined, it means that this field has been defined globally and
|
||||
* must be dynamically created.
|
||||
*
|
||||
* @param $field the current field
|
||||
* @param $itemtype the itemtype
|
||||
* @return an array which contains the full field definition
|
||||
*/
|
||||
static function getFieldOptions($field, $itemtype = "") {
|
||||
global $GO_FIELDS;
|
||||
|
||||
$options = [];
|
||||
$cleaned_field = preg_replace("/^plugin_genericobject_/", '', $field);
|
||||
if (!isset($GO_FIELDS[$cleaned_field]) && !empty($itemtype)) {
|
||||
// This field has been dynamically defined because it's an isolated dropdown
|
||||
$tmpfield = self::getFieldName(
|
||||
$field, $itemtype,
|
||||
[
|
||||
'dropdown_type' => 'isolated',
|
||||
'input_type' => 'dropdown'
|
||||
],
|
||||
true
|
||||
);
|
||||
$options = $GO_FIELDS[$tmpfield];
|
||||
$options['realname'] = $tmpfield;
|
||||
} else if (isset($GO_FIELDS[$cleaned_field])) {
|
||||
$options = $GO_FIELDS[$cleaned_field];
|
||||
$options['realname'] = $cleaned_field;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
public static function displayFieldDefinition($target, $itemtype, $field, $index, $last = false) {
|
||||
global $GO_FIELDS, $CFG_GLPI, $GO_BLACKLIST_FIELDS, $GO_READONLY_FIELDS;
|
||||
|
||||
$readonly = in_array($field, $GO_READONLY_FIELDS);
|
||||
$blacklist = in_array($field, $GO_BLACKLIST_FIELDS);
|
||||
$options = self::getFieldOptions($field, $itemtype);
|
||||
|
||||
echo "<tr class='tab_bg_".(($index%2)+1)."' align='center'>";
|
||||
echo "<td width='10'>";
|
||||
if (!$blacklist && !$readonly) {
|
||||
echo "<input type='checkbox' name='fields[" .$field. "]' value='1'>";
|
||||
} else {
|
||||
echo "<i class='fa fa-lock' title='".__("Read-only field", 'genericobject')."'>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>" . __($options['name'], 'genericobject') . "</td>";
|
||||
echo "<td>" . $field . "</td>";
|
||||
|
||||
echo "<td width='10'>";
|
||||
if ((!$blacklist || $readonly) && $index > 1) {
|
||||
Html::showSimpleForm($target, $CFG_GLPI["root_doc"] . "/pics/deplier_up.png", 'up',
|
||||
['field' => $field, 'action' => 'up', 'itemtype' => $itemtype],
|
||||
$CFG_GLPI["root_doc"] . "/pics/deplier_up.png");
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
echo "<td width='10'>";
|
||||
if ((!$blacklist || $readonly) && !$last) {
|
||||
Html::showSimpleForm($target, $CFG_GLPI["root_doc"] . "/pics/deplier_down.png", 'down',
|
||||
['field' => $field, 'action' => 'down', 'itemtype' => $itemtype],
|
||||
$CFG_GLPI["root_doc"] . "/pics/deplier_down.png");
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new field in DB
|
||||
* @param table the table
|
||||
* @param field the field to delete
|
||||
* @return nothing
|
||||
*/
|
||||
public static function addNewField($table, $field, $after = false) {
|
||||
global $DB;
|
||||
|
||||
_log("add", $field, "from", $table);
|
||||
$itemtype = getItemTypeForTable($table);
|
||||
if (!$DB->fieldExists($table, $field, false)) {
|
||||
$options = self::getFieldOptions($field, $itemtype);
|
||||
$query = "ALTER TABLE `$table` ADD `$field` ";
|
||||
switch ($options['input_type']) {
|
||||
case 'dropdown_yesno' :
|
||||
case 'dropdown_global' :
|
||||
case 'bool' :
|
||||
$query .= "TINYINT (1) NOT NULL DEFAULT '0'";
|
||||
break;
|
||||
case 'emptyspace' :
|
||||
case 'text' :
|
||||
$query .= "VARCHAR ( 255 ) collate utf8_unicode_ci NOT NULL DEFAULT ''";
|
||||
break;
|
||||
case 'multitext' :
|
||||
$query .= "TEXT NULL";
|
||||
break;
|
||||
case 'dropdown' :
|
||||
case 'integer' :
|
||||
$query .= "INT ( 11 ) NOT NULL DEFAULT '0'";
|
||||
break;
|
||||
case 'date':
|
||||
$query.="DATE DEFAULT NULL";
|
||||
break;
|
||||
case 'datetime':
|
||||
$query.="TIMESTAMP NULL DEFAULT NULL";
|
||||
break;
|
||||
case 'float' :
|
||||
$query .= "FLOAT NOT NULL DEFAULT '0'";
|
||||
break;
|
||||
case 'decimal' :
|
||||
$query .= "DECIMAL(20,4) NOT NULL DEFAULT '0.0000'";
|
||||
break;
|
||||
}
|
||||
if ($after) {
|
||||
$query.=" AFTER `$after`";
|
||||
}
|
||||
$DB->query($query);
|
||||
|
||||
//Reload list of fields for this itemtype in the singleton
|
||||
|
||||
$recursive = $entity_assign = $tree = false;
|
||||
|
||||
$table = getTableNameForForeignKeyField($field);
|
||||
|
||||
if ($table != '' && !$DB->tableExists($table)) {
|
||||
//Cannot use standard methods because class doesn't exists yet !
|
||||
$name = str_replace("glpi_plugin_genericobject_", "", $table);
|
||||
$name = getSingular($name);
|
||||
|
||||
$options['linked_itemtype'] = $itemtype;
|
||||
|
||||
PluginGenericobjectType::addNewDropdown(
|
||||
$name, 'PluginGenericobject'.ucfirst($name), $options
|
||||
);
|
||||
}
|
||||
// Invalidate menu data in current session
|
||||
unset($_SESSION['glpimenu']);
|
||||
|
||||
PluginGenericobjectSingletonObjectField::getInstance($itemtype, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a field in DB
|
||||
* @param table the table
|
||||
* @param field the field to delete
|
||||
* @return nothing
|
||||
*/
|
||||
static function deleteField($table, $field) {
|
||||
global $DB;
|
||||
|
||||
//Remove field from displaypreferences
|
||||
self::deleteDisplayPreferences($table, $field);
|
||||
|
||||
//If field exists, drop it !
|
||||
if ($DB->fieldExists($table, $field)) {
|
||||
$DB->query("ALTER TABLE `$table` DROP `$field`");
|
||||
}
|
||||
|
||||
$table = getTableNameForForeignKeyField($field);
|
||||
//If dropdown is managed by the plugin
|
||||
if ($table != '' && preg_match('/plugin_genericobject_(.*)/', $table, $results)) {
|
||||
//Delete dropdown table
|
||||
$query = "DROP TABLE `$table`";
|
||||
$DB->query($query);
|
||||
//Delete dropdown files & class
|
||||
$name = getSingular($results[1]);
|
||||
PluginGenericobjectType::deleteClassFile($name);
|
||||
PluginGenericobjectType::deleteFormFile($name);
|
||||
PluginGenericobjectType::deletesearchFile($name);
|
||||
}
|
||||
}
|
||||
|
||||
static function deleteDisplayPreferences($table, $field) {
|
||||
|
||||
$pref = new DisplayPreference();
|
||||
$itemtype = getItemTypeForTable($table);
|
||||
$searchopt = Search::getCleanedOptions($itemtype);
|
||||
foreach ($searchopt as $num => $option) {
|
||||
if ((isset($option['field']) && ($option['field'] == $field))
|
||||
|| (isset($option['field']) && $option['linkfield'] == $field)) {
|
||||
$pref->deleteByCriteria([
|
||||
'itemtype' => $itemtype,
|
||||
'num' => $num
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change field order in DB
|
||||
* @params an array which contains the itemtype, the field to move and the action (up/down)
|
||||
* @return nothing
|
||||
*/
|
||||
static function changeFieldOrder($params = []) {
|
||||
global $DB;
|
||||
$itemtype = $params['itemtype'];
|
||||
$field = $params['field'];
|
||||
$table = getTableForItemType($itemtype);
|
||||
$fields = PluginGenericobjectSingletonObjectField::getInstance($params['itemtype']);
|
||||
|
||||
//If action is down, reverse array first
|
||||
if ($params['action'] == 'down') {
|
||||
$fields = array_reverse($fields);
|
||||
}
|
||||
|
||||
//Get array keys
|
||||
$keys = array_keys($fields);
|
||||
//Index represents current position of $field
|
||||
$index = 0;
|
||||
foreach ($keys as $id => $key) {
|
||||
if ($key == $field) {
|
||||
$index = $id;
|
||||
}
|
||||
}
|
||||
//Get 2 positions before and move field
|
||||
if ($params['action'] == 'down') {
|
||||
$previous = $index - 1;
|
||||
} else {
|
||||
$previous = $index - 2;
|
||||
}
|
||||
|
||||
if (isset($keys[$previous])) {
|
||||
$parent = $fields[$keys[$previous]];
|
||||
$query = "ALTER TABLE `$table` MODIFY `$field` ".$fields[$field]['Type'];
|
||||
$query .= " AFTER `".$fields[$keys[$previous]]['Field']."`";
|
||||
$DB->query($query) or die ($DB->error());
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkNecessaryFieldsDelete($itemtype, $field) {
|
||||
$type = new PluginGenericobjectType();
|
||||
$type->getFromDBByType($itemtype);
|
||||
|
||||
if ($type->canUseNetworkPorts() && 'locations_id' == $field) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if ($type->fields['use_direct_connections']) {
|
||||
foreach(['users_id','groups_id',' states_id','locations_id'] as $tmp_field) {
|
||||
if ($tmp_field == $field) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
|
||||
static function install(Migration $migration) {
|
||||
}
|
||||
|
||||
static function uninstall() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
130
plugins/genericobject/inc/functions.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* return the name of a dropdown type
|
||||
* This shared by the following classes :
|
||||
* - PluginGenericobjectCommonDropdown
|
||||
* - PluginGenericobjectCommonTreeDropdown
|
||||
*/
|
||||
function dropdown_getTypeName($class, $nb = 0) {
|
||||
global $GO_FIELDS;
|
||||
$fk = getForeignKeyFieldForTable(getTableForItemType($class));
|
||||
$instance = new $class();
|
||||
$options = PluginGenericobjectField::getFieldOptions($fk, $instance->linked_itemtype);
|
||||
$dropdown_type = isset($options['dropdown_type'])
|
||||
? $options['dropdown_type']
|
||||
: null;
|
||||
$label = $options['name'] ?? "no-name";
|
||||
if (!is_null($dropdown_type) and $dropdown_type==='isolated') {
|
||||
$linked_itemtype_object = new $instance->linked_itemtype();
|
||||
$label .= " (" . __($linked_itemtype_object::getTypeName(), 'genericobject') . ")";
|
||||
}
|
||||
if ($label != '') {
|
||||
return $label;
|
||||
} else {
|
||||
return $class;
|
||||
}
|
||||
}
|
||||
global $LOG_FILTER;
|
||||
$LOG_FILTER = [];
|
||||
/*
|
||||
* a simple logger function
|
||||
* You can disable logging by using the global $LOG_FILTER
|
||||
* in setup.php after including this file
|
||||
*/
|
||||
function _log() {
|
||||
global $LOG_FILTER;
|
||||
$trace = debug_backtrace();
|
||||
if (count($trace)>0) {
|
||||
$glpi_root = str_replace( "\\", "/", GLPI_ROOT );
|
||||
$trace_file = str_replace( "\\", "/", $trace[0]['file'] );
|
||||
$filename = preg_replace("|^".$glpi_root."/".Plugin::getPhpDir('genericobject', false)."/|", "", $trace_file);
|
||||
}
|
||||
if (count($trace) > 1) {
|
||||
$caller = $trace[1];
|
||||
} else {
|
||||
$caller = null;
|
||||
}
|
||||
$msg = _format_trace($trace, func_get_args());
|
||||
$msg .= "\n";
|
||||
$show_log = false;
|
||||
if (!is_null($caller) and
|
||||
isset($caller['class']) and
|
||||
in_array($caller['class'], $LOG_FILTER)
|
||||
) {
|
||||
$callee = array_shift($trace);
|
||||
$show_log = true;
|
||||
}
|
||||
if (in_array($filename, $LOG_FILTER)) {
|
||||
$show_log = true;
|
||||
}
|
||||
if ($show_log) {
|
||||
call_user_func_array("Toolbox::logInFile", ['generic-object', $msg, true]);
|
||||
}
|
||||
}
|
||||
|
||||
function _format_trace($bt, $args) {
|
||||
static $tps = 0;
|
||||
$msg = "";
|
||||
$msg = "From \n";
|
||||
if (count($bt) > 0) {
|
||||
foreach (array_reverse($bt) as $idx => $trace) {
|
||||
$msg .= sprintf(" [%d] ", $idx);
|
||||
if (isset($trace['class'])) {
|
||||
$msg .= $trace['class'].'::';
|
||||
}
|
||||
$msg .= $trace['function'].'()';
|
||||
if (isset($trace['file'])) {
|
||||
$msg .= ' called in '. $trace['file'] . ', line ' . $trace['line'];
|
||||
}
|
||||
$msg .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($tps && function_exists('memory_get_usage')) {
|
||||
$msg .= ' ('.number_format(microtime(true)-$tps, 3).'", '.
|
||||
number_format(memory_get_usage()/1024/1024, 2).'Mio)';
|
||||
}
|
||||
$msg .= "\n ";
|
||||
foreach ($args as $arg) {
|
||||
if (is_array($arg) || is_object($arg)) {
|
||||
$msg .= " ".str_replace("\n", "\n ", print_r($arg, true));
|
||||
} else if (is_null($arg)) {
|
||||
$msg .= 'NULL ';
|
||||
} else if (is_bool($arg)) {
|
||||
$msg .= ($arg ? 'true' : 'false').' ';
|
||||
} else {
|
||||
$msg .= $arg . ' ';
|
||||
}
|
||||
}
|
||||
$msg .= "\n";
|
||||
return $msg;
|
||||
}
|
||||
1257
plugins/genericobject/inc/object.class.php
Normal file
128
plugins/genericobject/inc/object_item.class.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectObject_Item extends CommonDBChild {
|
||||
|
||||
public $dohistory = true;
|
||||
|
||||
// From CommonDBRelation
|
||||
static public $itemtype_1 = "PluginGenericobjectObject";
|
||||
static public $items_id_1 = 'plugin_genericobject_objects_id';
|
||||
|
||||
static public $itemtype_2 = 'itemtype';
|
||||
static public $items_id_2 = 'items_id';
|
||||
|
||||
//Get itemtype name
|
||||
static function getTypeName($nb = 0) {
|
||||
global $LANG;
|
||||
$class = get_called_class();
|
||||
//Datainjection : Don't understand why I need this trick : need to be investigated !
|
||||
if (preg_match("/Injection$/i", $class)) {
|
||||
$class = str_replace("Injection", "", $class);
|
||||
}
|
||||
$item = new $class();
|
||||
//Itemtype name can be contained in a specific locale field : try to load it
|
||||
PluginGenericobjectType::includeLocales($item->objecttype->fields['name']);
|
||||
if (isset($LANG['genericobject'][$class][0])) {
|
||||
return $LANG['genericobject'][$class][0];
|
||||
} else {
|
||||
return $item->objecttype->fields['name'];
|
||||
}
|
||||
}
|
||||
|
||||
static function canView() {
|
||||
return Session::haveRight(self::$itemtype_1, READ);
|
||||
}
|
||||
|
||||
static function canCreate() {
|
||||
return Session::haveRight(self::$itemtype_1, CREATE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @since 2.2.0
|
||||
* @param CommonDBTM $item
|
||||
*/
|
||||
static function showItemsForSource(CommonDBTM $item) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @since 2.2.0
|
||||
* @param CommonDBTM $item
|
||||
*/
|
||||
static function showItemsForTarget(CommonDBTM $item) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @since 2.2.0
|
||||
*/
|
||||
static function registerType() {
|
||||
Plugin::registerClass(get_called_class(), ['addtabon' => self::getLinkedItemTypes()]);
|
||||
}
|
||||
|
||||
static function getLinkedItemTypes() {
|
||||
$source_itemtype = self::getItemType1();
|
||||
$source_item = new $source_itemtype;
|
||||
return $source_item->getLinkedItemTypesAsArray();
|
||||
}
|
||||
|
||||
static function getItemType1() {
|
||||
$classname = get_called_class();
|
||||
return $classname::$itemtype_1;
|
||||
}
|
||||
|
||||
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
||||
if (!$withtemplate) {
|
||||
$itemtypes = self::getLinkedItemTypes();
|
||||
if (in_array(get_class($item), $itemtypes) || get_class($item) == self::getItemType1()) {
|
||||
return [1 => __("Objects management", "genericobject")];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||
$itemtypes = self::getLinkedItemTypes();
|
||||
if (get_class($item) == self::getItemType1()) {
|
||||
self::showItemsForSource($item);
|
||||
} else if (in_array(get_class($item), $itemtypes)) {
|
||||
self::showItemsForTarget($item);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
450
plugins/genericobject/inc/profile.class.php
Normal file
@ -0,0 +1,450 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class PluginGenericobjectProfile extends Profile {
|
||||
|
||||
/* if profile deleted */
|
||||
function cleanProfiles($id) {
|
||||
$this->deleteByCriteria(['id' => $id]);
|
||||
}
|
||||
|
||||
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
|
||||
|
||||
switch ($item->getType()) {
|
||||
case 'Profile':
|
||||
return self::createTabEntry(__('Objects management', 'genericobject'));
|
||||
break;
|
||||
case 'PluginGenericobjectType':
|
||||
return self::createTabEntry(_n('Profile', 'Profiles', 2));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {
|
||||
switch ($item->getType()) {
|
||||
case 'Profile':
|
||||
$profile = new self();
|
||||
$profile->showForm($item->getID());
|
||||
break;
|
||||
case 'PluginGenericobjectType':
|
||||
_log($item);
|
||||
self::showForItemtype($item);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static function showForItemtype($type) {
|
||||
global $DB;
|
||||
|
||||
if (!Session::haveRight("profile", READ)) {
|
||||
return false;
|
||||
}
|
||||
self::installRights();
|
||||
$canedit = Session::haveRight("profile", UPDATE);
|
||||
|
||||
echo "<form action='" . self::getFormUrl() . "' method='post'>";
|
||||
echo "<table class='tab_cadre_fixe'>";
|
||||
$itemtype = $type->fields['itemtype'];
|
||||
echo "<tr><th colspan='2' align='center'><strong>";
|
||||
echo __("Rights assignment").": ";
|
||||
echo $itemtype::getTypeName();
|
||||
echo "</strong></th></tr>";
|
||||
|
||||
echo "<tr><td class='genericobject_type_profiles'>";
|
||||
foreach (getAllDataFromTable(getTableForItemtype("Profile")) as $profile) {
|
||||
$prof = new Profile();
|
||||
$prof->getFromDB($profile['id']);
|
||||
$rights = [
|
||||
[
|
||||
'label' => $profile['name'],
|
||||
'itemtype' => $itemtype,
|
||||
'field' => self::getProfileNameForItemtype($itemtype),
|
||||
'html_field' => "profile_" . $profile['id'],
|
||||
]
|
||||
];
|
||||
$prof->displayRightsChoiceMatrix(
|
||||
$rights
|
||||
);
|
||||
}
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "<input type='hidden' name='itemtype' value='".$itemtype."'>";
|
||||
|
||||
if ($canedit) {
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td align='center' colspan='2'>";
|
||||
echo "<input type='submit' name='update_all_rights' value=\"" .
|
||||
_sx('button', 'Post') . "\" class='submit'>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
Html::closeForm();
|
||||
}
|
||||
|
||||
static function getProfileNameForItemtype($itemtype) {
|
||||
return preg_replace("/^glpi_/", "", getTableForItemType($itemtype));
|
||||
}
|
||||
|
||||
|
||||
/* profiles modification */
|
||||
function showForm($profiles_id, $options = []) {
|
||||
if (!Session::haveRight("profile", READ)) {
|
||||
return false;
|
||||
}
|
||||
$canedit = Session::haveRight("profile", UPDATE);
|
||||
//if ($id) {
|
||||
// $this->getProfilesFromDB($id);
|
||||
//}
|
||||
|
||||
//Ensure rights are defined in database
|
||||
self::installRights();
|
||||
|
||||
$profile = new Profile();
|
||||
$profile->getFromDB($profiles_id);
|
||||
|
||||
echo "<form action='" . Profile::getFormUrl() . "' method='post'>";
|
||||
echo "<table class='tab_cadre_fixe'>";
|
||||
|
||||
$general_rights = self::getGeneralRights();
|
||||
|
||||
$profile->displayRightsChoiceMatrix(
|
||||
$general_rights,
|
||||
[
|
||||
'canedit' => $canedit,
|
||||
'default_class' => 'tab_bg_2',
|
||||
'title' => __('General', 'genericobject')
|
||||
]
|
||||
);
|
||||
|
||||
$types_rights = self::getTypesRights();
|
||||
|
||||
$title = __('Objects', 'genericobject');
|
||||
if (count($types_rights) == 0) {
|
||||
$title .= ' ' . __("(No types defined yet)", "genericobject");
|
||||
}
|
||||
|
||||
$profile->displayRightsChoiceMatrix(
|
||||
$types_rights,
|
||||
[
|
||||
'canedit' => $canedit,
|
||||
'default_class' => 'tab_bg_2',
|
||||
'title' => $title
|
||||
]
|
||||
);
|
||||
$profile->showLegend();
|
||||
if ($canedit) {
|
||||
echo "<div class='center'>";
|
||||
echo Html::hidden('id', ['value' => $profiles_id]);
|
||||
echo Html::submit(_sx('button', 'Save'), ['name' => 'update']);
|
||||
echo "</div>\n";
|
||||
Html::closeForm();
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
}
|
||||
|
||||
static function getProfileforItemtype($profiles_id, $itemtype) {
|
||||
$rights = ProfileRight::getProfileRights($profiles_id);
|
||||
$itemtype_rightname = self::getProfileNameForItemtype($itemtype);
|
||||
return isset($rights[$itemtype_rightname]) ? $rights[$itemtype_rightname] : 0;
|
||||
}
|
||||
|
||||
function getProfilesFromDB($id, $config = true) {
|
||||
global $DB;
|
||||
$prof_datas = [];
|
||||
foreach (getAllDataFromTable(getTableForItemType(__CLASS__),
|
||||
['profiles_id' => $id]) as $prof) {
|
||||
if ($prof['right'] != "" || $config) {
|
||||
$prof_datas[$prof['itemtype']] = $prof['right'];
|
||||
$prof_datas[$prof['itemtype'].'_open_ticket'] = $prof['open_ticket'];
|
||||
$prof_datas['id'] = $prof['id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($prof_datas) && !$config) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$prof_datas['profiles_id'] = $id;
|
||||
$this->fields = $prof_datas;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function saveProfileToDB($params) {
|
||||
global $DB;
|
||||
|
||||
$types = PluginGenericobjectType::getTypes(true);
|
||||
if (!empty ($types)) {
|
||||
foreach ($types as $tmp => $profile) {
|
||||
$query = "UPDATE `".getTableForItemType(__CLASS__)."` " .
|
||||
"SET ";
|
||||
|
||||
if (isset($params[$profile['itemtype']]) && $params[$profile['itemtype']] == 'NULL') {
|
||||
$query.="`right`='' ";
|
||||
} else {
|
||||
if (isset($params[$profile['itemtype']])) {
|
||||
$query.="`right`='".$params[$profile['itemtype']]."'";
|
||||
} else {
|
||||
$query.="`right`=''";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($params[$profile['itemtype'].'_open_ticket'])) {
|
||||
$query.=", `open_ticket`='".$params[$profile['itemtype'].'_open_ticket']."' ";
|
||||
}
|
||||
|
||||
$query.="WHERE `profiles_id`='".$params['profiles_id']."' " .
|
||||
"AND `itemtype`='".$profile['itemtype']."'";
|
||||
$DB->query($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create rights for the current profile
|
||||
* @param profileID the profile ID
|
||||
* @return nothing
|
||||
*/
|
||||
public static function createFirstAccess() {
|
||||
if (!self::profileExists($_SESSION["glpiactiveprofile"]["id"], 'PluginGenericobjectType')) {
|
||||
self::createAccess($_SESSION["glpiactiveprofile"]["id"], "PluginGenericobjectType", true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if rights for a profile still exists
|
||||
* @param profiles_id the profile ID
|
||||
* @param itemtype name of the type
|
||||
* @return true if exists, no if not
|
||||
*/
|
||||
public static function profileExists($profiles_id, $itemtype = false) {
|
||||
$profile = new Profile();
|
||||
$profile->getFromDB($profiles_id);
|
||||
$rights = ProfileRight::getProfileRights($profiles_id);
|
||||
$itemtype_rightname = self::getProfileNameForItemtype($itemtype);
|
||||
if ($itemtype) {
|
||||
_log(
|
||||
"get rights on itemtype ".$itemtype." for profile ".$profile->fields['name'], ':',
|
||||
isset($rights[$itemtype_rightname]) ? $rights[$itemtype_rightname] : "NONE"
|
||||
);
|
||||
return (isset($rights[self::getProfileNameForItemtype($itemtype)]));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create rights for the profile if it doesn't exists
|
||||
* @param profileID the profile ID
|
||||
* @return nothing
|
||||
*/
|
||||
public static function createAccess($profiles_id, $itemtype, $first = false) {
|
||||
|
||||
$rights = getAllDataFromTable('glpi_profiles');
|
||||
$profile_right = new ProfileRight();
|
||||
$itemtype_rightname = self::getProfileNameForItemtype($itemtype);
|
||||
|
||||
foreach ($rights as $right) {
|
||||
if ($right['id'] == $profiles_id) {
|
||||
$r = ALLSTANDARDRIGHT | READNOTE | UPDATENOTE;
|
||||
} else {
|
||||
$r = 0;
|
||||
}
|
||||
$profile_right->updateProfileRights($right['id'], [$itemtype_rightname => $r]);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getGeneralRights() {
|
||||
return [[
|
||||
'itemtype' => 'PluginGenericobjectType',
|
||||
'label' => __("Type of objects", "genericobject"),
|
||||
'field' => self::getProfileNameForItemtype('PluginGenericobjectType'),
|
||||
]];
|
||||
}
|
||||
|
||||
public static function getTypesRights() {
|
||||
$rights = [];
|
||||
|
||||
include_once(GENERICOBJECT_DIR."/inc/type.class.php");
|
||||
|
||||
$types = PluginGenericobjectType::getTypes(true);
|
||||
if (count( $types) > 0) {
|
||||
foreach ($types as $_ => $type) {
|
||||
$itemtype = $type['itemtype'];
|
||||
|
||||
if (!class_exists($itemtype)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$field = self::getProfileNameForItemtype($itemtype);
|
||||
$objecttype = new PluginGenericobjectType($itemtype);
|
||||
$rights[] = [
|
||||
'itemtype' => $itemtype,
|
||||
'label' => $itemtype::getTypeName(),
|
||||
'field' => self::getProfileNameForItemtype($itemtype)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $rights;
|
||||
}
|
||||
|
||||
public static function installRights($first = false) {
|
||||
$missing_rights = [];
|
||||
$installed_rights = ProfileRight::getAllPossibleRights();
|
||||
$right_names = [];
|
||||
|
||||
// Add common plugin's rights
|
||||
$right_names[] = self::getProfileNameForItemtype('PluginGenericobjectType');
|
||||
|
||||
// Add types' rights
|
||||
$types = PluginGenericobjectType::getTypes(true);
|
||||
foreach ($types as $_ => $type) {
|
||||
$itemtype = $type['itemtype'];
|
||||
$right_names[] = self::getProfileNameForItemtype($itemtype);
|
||||
}
|
||||
|
||||
// Check for already defined rights
|
||||
foreach ($right_names as $right_name) {
|
||||
_log($right_name, isset($installed_rights[$right_name]));
|
||||
if (!isset($installed_rights[$right_name])) {
|
||||
$missing_rights[] = $right_name;
|
||||
}
|
||||
}
|
||||
|
||||
//Install missing rights in profile and update the object
|
||||
if (count($missing_rights) > 0) {
|
||||
ProfileRight::addProfileRights($missing_rights);
|
||||
self::changeProfile();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete type from the rights
|
||||
* @param name the name of the type
|
||||
* @return nothing
|
||||
*/
|
||||
public static function deleteTypeFromProfile($itemtype) {
|
||||
$rights = [self::getProfileNameForItemtype($itemtype)];
|
||||
ProfileRight::deleteProfileRights($rights);
|
||||
}
|
||||
|
||||
public static function changeProfile() {
|
||||
$general_rights = self::getGeneralRights();
|
||||
$type_rights = self::getTypesRights();
|
||||
$db_rights = ProfileRight::getProfileRights($_SESSION['glpiactiveprofile']['id']);
|
||||
$rights = array_merge($general_rights, $type_rights);
|
||||
|
||||
foreach ($rights as $right) {
|
||||
$str_right = $right['field'];
|
||||
if (preg_match("/plugin_genericobject_/", $str_right)) {
|
||||
unset($_SESSION['glpiactiveprofile'][$str_right]);
|
||||
if (!empty($db_rights) && isset($db_rights[$str_right])) {
|
||||
$_SESSION['glpiactiveprofile'][$str_right] = $db_rights[$str_right];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function install(Migration $migration) {
|
||||
global $DB;
|
||||
|
||||
$profileRight = new ProfileRight();
|
||||
$profile = new Profile();
|
||||
|
||||
//Update needed
|
||||
if ($DB->tableExists('glpi_plugin_genericobject_profiles')) {
|
||||
foreach (getAllDataFromTable('glpi_plugin_genericobject_profiles') as $right) {
|
||||
if (preg_match("/PluginGenericobject(.*)/", $right['itemtype'], $results)) {
|
||||
$newrightname = 'plugin_genericobject_'.strtolower($results[1]).'s';
|
||||
if (!countElementsInTable('glpi_profilerights',
|
||||
['profiles_id' => $right['profiles_id'],
|
||||
'name' => $newrightname])) {
|
||||
switch ($right['right']) {
|
||||
case null:
|
||||
case '':
|
||||
$rightvalue = 0;
|
||||
break;
|
||||
case 'r':
|
||||
$rightvalue = READ;
|
||||
break;
|
||||
case 'w':
|
||||
$rightvalue = ALLSTANDARDRIGHT;
|
||||
break;
|
||||
}
|
||||
|
||||
$profileRight->add(['profiles_id' => $right['profiles_id'],
|
||||
'name' => $newrightname,
|
||||
'rights' => $rightvalue]);
|
||||
|
||||
if (!countElementsInTable('glpi_profilerights',
|
||||
['profiles_id' => $right['profiles_id'],
|
||||
'name' => 'plugin_genericobject_types'])) {
|
||||
$profileRight->add(['profiles_id' => $right['profiles_id'],
|
||||
'name' => 'plugin_genericobject_types',
|
||||
'rights' => 23]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($right['open_ticket']) {
|
||||
$profile->getFromDB($right['profiles_id']);
|
||||
$helpdesk_item_types = json_decode($profile->fields['helpdesk_item_type'], true);
|
||||
if (is_array($helpdesk_item_types)) {
|
||||
if (!in_array($right['itemtype'], $helpdesk_item_types)) {
|
||||
$helpdesk_item_types[] = $right['itemtype'];
|
||||
}
|
||||
} else {
|
||||
$helpdesk_item_types = [$right['itemtype']];
|
||||
}
|
||||
|
||||
$tmp['id'] = $profile->getID();
|
||||
$tmp['helpdesk_item_type'] = json_encode($helpdesk_item_types);
|
||||
$profile->update($tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
//$migration->dropTable('glpi_plugin_genericobject_profiles');
|
||||
}
|
||||
if (!countElementsInTable('glpi_profilerights', ['name' => ['LIKE', '%genericobject%']])) {
|
||||
self::createFirstAccess();
|
||||
}
|
||||
}
|
||||
|
||||
static function uninstall() {
|
||||
global $DB;
|
||||
$query = "DELETE FROM `glpi_profilerights`
|
||||
WHERE `name` LIKE '%plugin_genericobject%'";
|
||||
$DB->query($query) or die($DB->error());
|
||||
}
|
||||
}
|
||||
60
plugins/genericobject/inc/singletonobjectfield.class.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Original Author of file: Walid Nouh
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
die("Sorry. You can't access directly to this file");
|
||||
}
|
||||
|
||||
class PluginGenericobjectSingletonObjectField {
|
||||
/// Items list
|
||||
static $_dbfields = [];
|
||||
|
||||
/**
|
||||
* Singleton to store DB fields definition
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @param itemtype itemtype to query
|
||||
* @param reload reload db fields configuration from DB
|
||||
*
|
||||
* @return an array which contains DB fields definition
|
||||
*/
|
||||
public static function getInstance($itemtype, $reload = false) {
|
||||
global $DB;
|
||||
if (!isset(self::$_dbfields[$itemtype]) || $reload) {
|
||||
self::$_dbfields[$itemtype] = $DB->listFields(getTableForItemType($itemtype));
|
||||
}
|
||||
return self::$_dbfields[$itemtype];
|
||||
}
|
||||
}
|
||||
|
||||
2417
plugins/genericobject/inc/type.class.php
Normal file
101
plugins/genericobject/inc/typefamily.class.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
die("Sorry. You can't access directly to this file");
|
||||
}
|
||||
|
||||
class PluginGenericobjectTypeFamily extends CommonDropdown {
|
||||
var $can_be_translated = true;
|
||||
|
||||
static function getTypeName($nb = 0) {
|
||||
return __('Family of type of objects', 'genericobject');
|
||||
}
|
||||
|
||||
static function install(Migration $migration) {
|
||||
global $DB;
|
||||
|
||||
$table = getTableForItemType(__CLASS__);
|
||||
if (!$DB->tableExists($table)) {
|
||||
$query = "CREATE TABLE `$table` (
|
||||
`id` INT( 11 ) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) collate utf8_unicode_ci default NULL,
|
||||
`comment` text NULL,
|
||||
`date_mod` TIMESTAMP NULL DEFAULT NULL,
|
||||
`date_creation` TIMESTAMP NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `date_mod` (`date_mod`),
|
||||
KEY `date_creation` (`date_creation`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
|
||||
$DB->query($query) or die($DB->error());
|
||||
}
|
||||
}
|
||||
|
||||
static function uninstall() {
|
||||
global $DB;
|
||||
|
||||
$table = getTableForItemType(__CLASS__);
|
||||
if ($DB->tableExists($table)) {
|
||||
$query = "DROP TABLE IF EXISTS `$table`";
|
||||
$DB->query($query) or die($DB->error());
|
||||
}
|
||||
}
|
||||
|
||||
static function getFamilies() {
|
||||
global $DB;
|
||||
|
||||
$query = "SELECT f.id as id, f.name as name, t.itemtype as itemtype
|
||||
FROM glpi_plugin_genericobject_typefamilies as f
|
||||
LEFT JOIN glpi_plugin_genericobject_types AS t
|
||||
ON (f.id = t.plugin_genericobject_typefamilies_id)
|
||||
WHERE t.id IN (SELECT DISTINCT `id`
|
||||
FROM glpi_plugin_genericobject_types
|
||||
WHERE is_active=1)";
|
||||
$families = [];
|
||||
foreach ($DB->request($query) as $fam) {
|
||||
$itemtype = $fam['itemtype'];
|
||||
if ($itemtype::canCreate()) {
|
||||
$families[$fam['id']] = $fam['name'];
|
||||
}
|
||||
}
|
||||
return $families;
|
||||
}
|
||||
|
||||
|
||||
static function getItemtypesByFamily($families_id) {
|
||||
return getAllDataFromTable(
|
||||
'glpi_plugin_genericobject_types',
|
||||
[
|
||||
'plugin_genericobject_typefamilies_id' => $families_id,
|
||||
'is_active' => 1
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
90
plugins/genericobject/index.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
define('GLPI_ROOT', '../..');
|
||||
include (GLPI_ROOT . "/inc/includes.php");
|
||||
|
||||
if (isset($_GET['itemtypes_id']) && $_GET['itemtypes_id']!='') {
|
||||
$type = new PluginGenericobjectType();
|
||||
$type->getFromDB($_GET['itemtypes_id']);
|
||||
Html::redirect(Toolbox::getItemTypeSearchURL($type->fields['itemtype']));
|
||||
} else {
|
||||
$types = PluginGenericobjectType::getTypesByFamily();
|
||||
foreach ($types as $family => $typeData) {
|
||||
foreach ($typeData as $ID => $value) {
|
||||
if (!Session::haveRight($value['itemtype'], READ)) {
|
||||
unset($types[$family][$ID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//There's only one family
|
||||
if (count($types) == 1) {
|
||||
//There's only one itemtype ? If yes, then automatically
|
||||
//redirect to the search engine
|
||||
if (key($types) == null) {
|
||||
$mytypes = $types;
|
||||
$tmp = array_pop($mytypes);
|
||||
if (count($tmp) == 1) {
|
||||
Html::redirect(Toolbox::getItemTypeSearchURL(key($tmp)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Html::header(__("Objects management", "genericobject"), $_SERVER['PHP_SELF'], "plugins",
|
||||
"genericobject");
|
||||
|
||||
foreach ($types as $family => $typeData) {
|
||||
|
||||
$PluginGenericobjectTypefamily = new PluginGenericobjectTypefamily();
|
||||
$PluginGenericobjectTypefamily->getFromDB($family);
|
||||
|
||||
echo "<table class='tab_cadre_fixe'>";
|
||||
if ($family == 0) {
|
||||
echo "<tr class='tab_bg_2'><th>".__("Empty family", "genericobject")."</th></tr>";
|
||||
} else {
|
||||
echo "<tr class='tab_bg_2'><th>".$PluginGenericobjectTypefamily->getField("name")."</th></tr>";
|
||||
}
|
||||
if (!count($types)) {
|
||||
echo "<tr class='tab_bg_1'><td align='center'>".__("No item to display")."</td></tr>";
|
||||
} else {
|
||||
foreach ($typeData as $ID => $value) {
|
||||
echo "<tr class='tab_bg_1'><td align='center'>";
|
||||
echo "<a href='".Toolbox::getItemTypeSearchURL($value['itemtype'])."'>";
|
||||
$itemtype = $value['itemtype'];
|
||||
echo $itemtype::getTypeName();
|
||||
echo "</a></td></tr>";
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
Html::footer();
|
||||
}
|
||||
BIN
plugins/genericobject/locales/cs_CZ.mo
Normal file
179
plugins/genericobject/locales/cs_CZ.po
Normal file
@ -0,0 +1,179 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Pavel Borecki <pavel.borecki@gmail.com>, 2018-2019
|
||||
# Walid Nouh, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/cs_CZ/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: cs_CZ\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Správa objektů"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Prázdná rodina"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Typ objektů"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Požadovaná rozbalovací nabídka neexistuje"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Kolonky úspěšně smazány"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Kolonka úspěšně přidána"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Rodina typu objektů"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Obecné"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objekty"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Doposud nebyly určené žádné typy)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Název typu chybí"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Je třeba, aby název typu byl delší"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Typy „field“ (kolonka), „object“ (objekt) a „type“ (typ) jsou vyhrazené (už je nemůžete použít). Zvolte jiný"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Je třeba, aby typ začínal písmenem"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Typ se stejným názvem už existuje"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Vnitřní identifikátor"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Chování"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Síťová připojení"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "zásuvný modul vkládání souborů"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "zásuvný modul vytváření inventárních čísel"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "zásuvný modul správa objednávek"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "zásuvný modul odinstalace položek"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "zásuvný modul sim karty"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "zásuvný modul stromového pohledu"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Znovu vytvořit soubory"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Propojit s ostatními objekty"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
msgstr[3] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Nedaří se načíst třídu %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Nejspíš ve své databázi máte pro tento modul v nepořádku data a chybí soubory v %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Náhled objektu"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Pro zapnutí náhledu je třeba nastavit oprávnění"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Kolonky přiřazené k objektu"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Štítek"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Název v databázi"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Přidat novou kolonku"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Kolonka pouze pro čtení"
|
||||
BIN
plugins/genericobject/locales/en_GB.mo
Normal file
178
plugins/genericobject/locales/en_GB.po
Normal file
@ -0,0 +1,178 @@
|
||||
# English translations for PACKAGE package.
|
||||
# Copyright (C) 2021 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Automatically generated, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:21+0000\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: en_GB\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ASCII\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Objects management"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Empty family"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Type of objects"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "The requested dropdown does not exists"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Field(s) deleted successfully"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Field added successfully"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Family of type of objects"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "General"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objects"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(No types defined yet)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Type name is missing"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Type name must be longer"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Type must start with a letter"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "A type already exists with the same name"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Internal identifier"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Behaviour"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Network connections"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "injection file plugin"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber plugin"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "order plugin"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "item's uninstallation plugin"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "simcard plugin"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "treeview plugin"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Regenerate files"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Link to other objects"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] "Other"
|
||||
msgstr[1] "Others"
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Unable to load the class %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Object preview"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "You must configure rights to enable the preview"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Fields associated with the object"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Label"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Name in DB"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Add new field"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Read-only field"
|
||||
BIN
plugins/genericobject/locales/es_AR.mo
Normal file
138
plugins/genericobject/locales/es_AR.po
Normal file
@ -0,0 +1,138 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-09-06 14:50+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: hook.php:152
|
||||
msgid ""
|
||||
"Error: directories '/inc', '/front' and '/locales' of plugin must be "
|
||||
"writable by the web server."
|
||||
msgstr "Error: los directorios '/inc', '/front' and '/locales' del plugin se deben poder escribir en el servidor web."
|
||||
|
||||
#: index.php:46 index.php:49 setup.php:118 front/type.form.php:73
|
||||
#: inc/object_item.class.php:110 inc/type.class.php:239
|
||||
msgid "Objects management"
|
||||
msgstr "Administración de Objetos"
|
||||
|
||||
#: setup.php:82 setup.php:83
|
||||
msgid "Go to objects list"
|
||||
msgstr "Ir a la lista de objetos"
|
||||
|
||||
#: front/field.form.php:40
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campo(s) borrados completamente"
|
||||
|
||||
#: front/field.form.php:50
|
||||
msgid "Field added successfully"
|
||||
msgstr "Campo agregado completamente"
|
||||
|
||||
#: front/type.php:37 inc/type.class.php:61
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipo de objetos"
|
||||
|
||||
#: inc/field.class.php:66
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campos asociados con el objeto"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Label"
|
||||
msgstr "Etiqueta"
|
||||
|
||||
#: inc/field.class.php:73
|
||||
msgid "Name in DB"
|
||||
msgstr "Nombre en DB"
|
||||
|
||||
#: inc/field.class.php:105
|
||||
msgid "Add new field"
|
||||
msgstr "Agregar un campo nuevo"
|
||||
|
||||
#: inc/object.class.php:346
|
||||
msgid "Object preview"
|
||||
msgstr "Vista preliminar del Objeto"
|
||||
|
||||
#: inc/object.class.php:633
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Debe configurar derechos para ver vista previa"
|
||||
|
||||
#: inc/profile.class.php:62 inc/profile.class.php:121
|
||||
msgid "Access object"
|
||||
msgstr "Acceso a objeto"
|
||||
|
||||
#: inc/profile.class.php:69 inc/profile.class.php:127
|
||||
msgid "Associate tickets to this object"
|
||||
msgstr "Asociar tickets con este objeto"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "No type defined"
|
||||
msgstr "Tipo no definido"
|
||||
|
||||
#: inc/type.class.php:150
|
||||
msgid "Type name is missing"
|
||||
msgstr "Tipo de objeto no existe"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
|
||||
#: inc/type.class.php:163
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "El tipo de objeto debe comenzar con una letra"
|
||||
|
||||
#: inc/type.class.php:170
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Ya existe un tipo de objeto con ese nombre"
|
||||
|
||||
#: inc/type.class.php:339
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificador interno"
|
||||
|
||||
#: inc/type.class.php:383
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportamiento"
|
||||
|
||||
#: inc/type.class.php:398 inc/type.class.php:513
|
||||
msgid "Link to other objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:399
|
||||
msgid "Network connections"
|
||||
msgstr "Conexiones de red"
|
||||
|
||||
#: inc/type.class.php:400
|
||||
msgid "injection file plugin"
|
||||
msgstr "Plugin Inyección de archivo"
|
||||
|
||||
#: inc/type.class.php:402
|
||||
msgid "order plugin"
|
||||
msgstr "Plugin Orden de compras"
|
||||
|
||||
#: inc/type.class.php:403
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Plugins desinstalación de items"
|
||||
|
||||
#: inc/type.class.php:500
|
||||
msgid "Regenerate files"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:60
|
||||
msgid "Empty family"
|
||||
msgstr ""
|
||||
|
||||
#: inc/typefamily.class.php:35
|
||||
msgid "Family of type of objects"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/es_ES.mo
Normal file
176
plugins/genericobject/locales/es_ES.po
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# cbc5204086c375034e77848ef6290ebe, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Spanish (Spain) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/es_ES/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es_ES\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gestión de objetos"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Familia vacía"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipo de objetos"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "La lista desplegable requerida no existe"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campo(s) suprimido(s) correctamente"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "El campo fue añadido correctamente"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Familia de tipos de objetos"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "General"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objetos"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Nombre de tipo es obligatorio"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Los nombres de tipo 'field', 'object' y 'type' son reservados. Tiene que elegir otro nombre"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "El nombre de tipo tiene que empezar con una letra"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Un tipo de objeto ya existe con el mismo nombre"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificador interno"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportamiento"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Conexiones de red"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "complemento Injection file"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "complemento Geninventorynumber"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "complemento Gestión de pedidos"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "complemento Item's uninstallation"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Generar de nuevo los ficheros"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Enlace con otros objetos"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Vista previa del objeto"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Tiene que configurar los permisos para acceder a la vista previa"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campos asociados al objeto"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Término"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nombre en base de datos"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Añadir un campo nuevo"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/fi_FI.mo
Normal file
176
plugins/genericobject/locales/fi_FI.po
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Markku Vepsä, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Finnish (Finland) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/fi_FI/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fi_FI\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Kohteiden hallinta"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Tyhjä perhe"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Kohteiden tyyppi"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Pyydettyä alasvetovalikkoa ei ole olemassa"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Kenttä/kentät poistettu onnistuneesti"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Kenttä lisätty onnistuneesti"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Kohteiden tyypin perhe"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Yleinen"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Kohteet"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Tyyppejä ei ole vielä määritelty)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Tyyppinimi puuttuu"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Tyyppinimen on oltava pidempi"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Tyypit \"kenttä\", \"kohde\" ja \"tyyppi\" ovat varattuja. Valitse joku toinen"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Tyypin täytyy alkaa kirjaimella"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Samanniminen tyyppi on jo olemassa"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Sisäinen tunniste"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Käyttäytyminen"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Verkkoyhteydet"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Tiedoston tuonti -liitännäinen"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "Inventaarinumeron luonti liitännäinen"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Tilaus -liitännäinen"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Kohteen poisto -liitännäinen"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "SIM-kortti -liitännäinen"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Luo tiedostot uudelleen"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Linkki muihin kohteisiin"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Ei voida ladata luokkaa %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Tietokannassa on ongelma liittyen liitännäiseen ja puuttuvia tiedostoja %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Kohteen esikatselu"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Oikeudet on määritettävä, jotta esikatselu voidaan ottaa käyttöön"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Kohteeseen liittyvät kentät"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etiketti"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nimi tietokannassa"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Lisää uusi kenttä"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Vain luku kenttä"
|
||||
BIN
plugins/genericobject/locales/fr_CA.mo
Normal file
176
plugins/genericobject/locales/fr_CA.po
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Tiago Graça, 2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: French (Canada) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/fr_CA/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr_CA\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gestion d'objets"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Famille vide"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Types d'objets"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "L'intitulé demandé n'existe pas"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Champ(s) supprimé(s) avec succès"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Champ ajouté avec succès"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Famille"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Général"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objets"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Aucun type déjà défini)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Nom du type manquant"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Le nom du type doit être plus long"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Les types 'field', 'object' et 'type' sont réservés. Veuillez en choisir un autre"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Le type doit commencer par une lettre"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Un type avec le même nom existe déjà"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identifiant interne"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportement"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Connexions réseaux"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Plugin injection de fichiers"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "Plugin génération des numéros d'inventaire"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Plugin gestion des commandes"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Plugin de désinstallation des éléments"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "Plugin carte SIM"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "plugin arborescence"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Regénérer les fichiers"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Liaison avec d'autres objets"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Impossible de charger la classe %1$s"
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Vous avez probablement d'anciennes données dans votre base de données pour ce plugin et des fichiers sont manquants dans %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Prévisualisation d'un objet de ce type"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Vous devez configurer les droits sur cet objet pour voir la prévisualisation"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Champs associés à l'objet"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Libellé"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nom en base de données"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Ajout d'un nouveau champ"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Champ en lecture seule"
|
||||
BIN
plugins/genericobject/locales/fr_FR.mo
Normal file
181
plugins/genericobject/locales/fr_FR.po
Normal file
@ -0,0 +1,181 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# alexandre delaunay <delaunay.alexandre@gmail.com>, 2017
|
||||
# Cédric Anne, 2018
|
||||
# Manu1400 <ehaguet@teclib.com>, 2016
|
||||
# Johan Cwiklinski <jcwiklinski@teclib.com>, 2016-2017
|
||||
# cbc5204086c375034e77848ef6290ebe, 2015
|
||||
# Walid Nouh, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: French (France) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/fr_FR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: fr_FR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gestion d'objets"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Famille vide"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Types d'objets"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "L'intitulé demandé n'existe pas"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Champ(s) supprimé(s) avec succès"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Champ ajouté avec succès"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Famille"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Général"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objets"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Aucun type déjà défini)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Nom du type manquant"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Le nom du type doit être plus long"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Les types 'field', 'object' et 'type' sont réservés. Veuillez en choisir un autre"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Le type doit commencer par une lettre"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Un type avec le même nom existe déjà"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identifiant interne"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportement"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Connexions réseaux"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Plugin injection de fichiers"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "Plugin génération des numéros d'inventaire"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Plugin gestion des commandes"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Plugin de désinstallation des matériels"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "Plugin carte SIM"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Regénérer les fichiers"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Liaison avec d'autres objets"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Impossible de charger la classe %1$s"
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Vous avez probablement d'anciennes données dans votre base pour ce plugin ou des fichiers manquants dans %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Prévisualisation d'un objet de ce type"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Vous devez configurer les droits sur cet objet pour voir la prévisualisation"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Champs associés à l'objet"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Libellé"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nom en base de données"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Ajout d'un nouveau champ"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Champ en lecture seule"
|
||||
176
plugins/genericobject/locales/genericobject.pot
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr ""
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr ""
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr ""
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/hr_HR.mo
Normal file
177
plugins/genericobject/locales/hr_HR.po
Normal file
@ -0,0 +1,177 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# milotype <mail@milotype.de>, 2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Croatian (Croatia) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/hr_HR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: hr_HR\n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Upravljanje objektima"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Prazna obitelji"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Vrste objekata"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Traženi padajući popis ne postoji"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Polja uspješno uklonjena"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Polje uspješno dodano"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Obitelj vrste objekata"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Opće"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objekti"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Vrste još nisu određene)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Ime vrste nedostaje"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Ime vrste mora biti duže"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "„Polje”, „objekt” i „vrsta” su rezervirane vrste. Odaberi neku drugu"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Vrsta mora početi slovom"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Jedna vrsta s istim imenom već postoji"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Interni identifikator"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Ponašanje"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Mrežne veze"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Dodatak za umetanje podataka"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "Dodatak za generiranje inventarskog broja"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Dodatak za naruđbe"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Dodatak za deinstaliranje predmeta"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "Dodatak za SIM kartice"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "Dodatak za stablasti prikaz"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Ponovo generiraj datoteke"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Poveži s drugim objektima"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Nije moguće učitati klasu %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "U bazi podataka vjerojatno imaš smeće za ovaj dodatak i nedostaju datoteke u %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Pregled objekta"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Za aktiviranje pregleda moraš konfigurirati prava"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Polja povezana s objektom"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Oznaka"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Ime u bazi podataka"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Dodaj novo polje"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Polje samo-za-čitanje"
|
||||
BIN
plugins/genericobject/locales/it_IT.mo
Normal file
178
plugins/genericobject/locales/it_IT.po
Normal file
@ -0,0 +1,178 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Pierfrancesco Passerini <p.passerini@gmail.com>, 2018
|
||||
# Salvatore Russo <ilbuzzo@gmail.com>, 2016
|
||||
# Davide <spam@habilitas.it>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Italian (Italy) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/it_IT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: it_IT\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gestione degli Oggetti"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Famiglia vuota"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipo di oggetti"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Il menù a discesa richiesto non esiste"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campi rimossi con successo"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Campo aggiunto con successo"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Famiglia"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Generale"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Oggetti"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Nessun tipo ancora definito)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Il nome del tipo non è presente"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Il nome della tipologia deve essere più lungo"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "I tipi 'field', 'object' e 'type' sono riservati. Sceglierne un altro"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Il nome del tipo deve iniziare con una lettera"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Un tipo con lo stesso nome esiste già"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificatore interno"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportamento"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Connessioni di rete"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "injection file plugin"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber plugin"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "order plugin"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "item's uninstallation plugin"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "simcard plugin"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Rigenera file"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Collega ad altri oggetti"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Impossibile caricare la classe %1$s ."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Per questo plugin hai, probabilmente, dei dati inutili nel tuo database e file mancanti in %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Anteprima dell'oggetto"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Bisogna configurare i diritti per abilitare l'anteprima"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campi associati con l'oggetto"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etichetta"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nome nel DataBase"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Aggiungi nuovo campo"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Campo in sola lettura"
|
||||
BIN
plugins/genericobject/locales/ko_KR.mo
Normal file
175
plugins/genericobject/locales/ko_KR.po
Normal file
@ -0,0 +1,175 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# SeongHyeon Cho <jaymz9634@gmail.com>, 2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Korean (Korea) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/ko_KR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ko_KR\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "객체 관리"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "빈 집단"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "객체 유형"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "요청된 드롭다운은 존재하지 않습니다"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "항목(들) 삭제됨"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "항목 추가됨"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "객체의 유형 집단"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "일반"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "객체"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(아직 정의된 유형 없음)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "유형 이름이 누락되었습니다"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "유형 이름은 더 길어야 합니다"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "유형 'field', 'object' 그리고 'type'은 금지되었습니다. 다른 것을 선택해 주세요"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "유형은 문자로 시작해야 합니다"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "유형이 이미 같은 이름으로 존재합니다"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "내부 식별자"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "동작"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "네트워크 연결"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "파일 플러그인 삽입"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber 플러그인"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "order 플러그인"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "품목 제거 플러그인"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "simcard 플러그인"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "treeview 플러그인"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "파일 재생성"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "다른 객체들과 연결"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "클래스 %1$s을 불러올 수 없습니다."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "이 플러그인에 대한 데이터베이스 내에 개비지 데이터가 있거나 %1$s내의 파일이 누락된 것 같습니다"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "객체 미리보기"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "미리보기 활성화에 대한 권한을 구성해야 합니다"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "객체에 연관된 항목"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "라벨"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "DB에서의 이름"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "새 항목 추가"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "읽기-전용 항목"
|
||||
BIN
plugins/genericobject/locales/pl_PL.mo
Normal file
178
plugins/genericobject/locales/pl_PL.po
Normal file
@ -0,0 +1,178 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# awiamo, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Polish (Poland) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/pl_PL/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pl_PL\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Zarządzanie obiektami"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr ""
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Rodzaj obiektów"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Żądana lista rozwijana nie istnieje"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Pole(a) zostały pomyślnie skasowane"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Pole dodane pomyślnie"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Typ musi zaczynać się od litery"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Istnieje już typ o takiej samej nazwie"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identyfikator wewnętrzny"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Zachowanie"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Połączenia sieciowe"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber plugin"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Link do innych obiektów"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
msgstr[3] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Podgląd obiektu"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etykieta"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nazwa w DB"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Dodaj nowe pole"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/pt_BR.mo
Normal file
178
plugins/genericobject/locales/pt_BR.po
Normal file
@ -0,0 +1,178 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Andrei Bernardo Simoni <andrei_simoni@hotmail.com>, 2017
|
||||
# Andrei Bernardo Simoni <andrei_simoni@hotmail.com>, 2017
|
||||
# Arthur Ramos Schaefer <arthur.r.schaefer@gmail.com>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_BR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gerenciamento de objetos"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Família vazia"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipos de objetos"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "O menu suspenso solicitado não existe"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campo(s) excluído(s) com sucesso"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Campo adicionado com sucesso"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Família de tipo de objetos"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Geral"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objetos"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Sem tipos definidos ainda)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "O nome do tipo está faltando"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Nome deve ser mais longo"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Tipos 'campo', 'objeto' e 'tipo' estão reservados. Por favor escolha outro"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "O tipo deve começar com uma letra"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Um tipo com o mesmo nome já existe "
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificador interno"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportamento"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Conexões de rede"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "plugin datainjection"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "plugin getinventorynumber"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "plugin order"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "plugin item's uninstallation"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "plugin simcard"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Regenerar arquivos"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Conexão com outros objetos"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Não consegui carregar a classe %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Deve ter dados no lixo da tua base de dados porque estão a faltas ficheiros neste plugin %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Pré-visualização do objet"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Você deve configurar os direitos para habilitar pré-visualização"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campos associados com o objeto"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etiqueta"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nome no banco de dados"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Adicionar novo campo"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Campo apenas de leitura"
|
||||
BIN
plugins/genericobject/locales/pt_PT.mo
Normal file
175
plugins/genericobject/locales/pt_PT.po
Normal file
@ -0,0 +1,175 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/pt_PT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pt_PT\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Gerenciamento de objetos"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Família vazia"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipo de objetos"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "A lista suspensa solicitada não existe"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campo (s) excluído com sucesso"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Campo adicionado com sucesso"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Família do tipo de objetos"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Geral"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Objetos"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Nenhum tipo definido ainda)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Um tipo de nome está ausente"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Um tipo de nome deve ser mais longo"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Os tipos ‘field’, ‘object’ e ‘type’ são reservados. Por favor, escolha outro"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Tipo deve começar com uma letra"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Já existe um tipo com o mesmo nome"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificador interno"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportamento"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Ligações de rede"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "plugin de arquivo de injeção"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber plugin"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "outro plugin"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "plugin de desinstalação do item"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "simcard plugin"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Regenerar ficheiros"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Ligação para outro objeto"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Não é possível carregar a classe usando %1$s."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Provavelmente tem dados incorretos na sua base de dados para este plugin e arquivos ausentes em %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Pré-visualização de objetos"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Deve configurar os direitos para habilitar a visualização"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campos associados ao objeto"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Rótulo"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nome na BD"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Adicionar um novo campo"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Campo somente de leitura"
|
||||
BIN
plugins/genericobject/locales/ro_RO.mo
Normal file
177
plugins/genericobject/locales/ro_RO.po
Normal file
@ -0,0 +1,177 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Doru DEACONU <dumitrudeaconu@yahoo.com>, 2015
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Romanian (Romania) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/ro_RO/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ro_RO\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Managementul obiectelor"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Familie vida"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Tipul obiectelor"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Dropdown-ul solicitat nu exista"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Campul(urile) sterse cu succes"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Camp adaugat cu succes"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Familia tipului de obiecte"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "General"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Obiecte"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Nume tip lipseste"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Tipurile 'camp', 'obiect', si 'tip' sunt rezervate.Va rugam alegeti altul"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Tipul trebuie sa inceapa cu o litera"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "UN tip cu acelasi nume exista deja"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Identificator intern"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Comportament"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Conexiuni retea"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Plugin injectare fisiere"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "geninventorynumber plugin"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Plugin gestiune comenzi"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Plugin dezinstalare elemente"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Fisiere regenerate"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Linck catre alte obiecte"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Previzualizeaza un obiect de acest tip"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Trebuie sa configurati drepturi pe acest obiect pentru a putea previzualiza"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Campuri asociate la obiect"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Eticheta"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Nume in DB"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Add camp nou"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/ru_RU.mo
Normal file
179
plugins/genericobject/locales/ru_RU.po
Normal file
@ -0,0 +1,179 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Alexey Petukhov <lexx015@gmail.com>, 2015
|
||||
# Mr.GreyWolf, 2016
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Russian (Russia) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/ru_RU/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ru_RU\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Управление объектами"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr ""
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Тип объектов"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr ""
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Поле(я) удалены успешно"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Поле(я) добавлены успешно"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Объекты"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Типы 'field', 'object' и 'type' зарезервированы. Выберите другие."
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Тип должен начинаться с буквы"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Тип с таким именем уже есть"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Внутренний идентификатор"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Взаимодействия"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Сетевые соединения"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Связать с другим объектом"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
msgstr[3] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Предпросмотр"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Вы должны настроить права для предпросмотра"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Поля связаны с объектом"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Наименование"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Имя в БД"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Добавить новое поле"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
BIN
plugins/genericobject/locales/sv_SE.mo
Normal file
176
plugins/genericobject/locales/sv_SE.po
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# jchan <jhornqvist@gmail.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Swedish (Sweden) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/sv_SE/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: sv_SE\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Hantera tillgångar"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Tom familj"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Typ av tillgång"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "Den begärda rullmenyn saknas"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Fältet(en) raderades"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Attribut tillagt"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Ingår i typfamilj"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Allmänt"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Tillgångar"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Inga typer har skapats ännu)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Typnamn saknas"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Typnamnet måste vara längre"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "Typnamnen 'fält, 'objekt' och 'typ' är reserverade av systemet. Var vänlig välj ett annat namn."
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Typnamnet måste börja med en bokstav"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Typnamnet existerar redan"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "Internt namn"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Beteende"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Nätverksanslutningar"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "Injection file plug-in"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "Geninventorynumber plug-in"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "Order plug-in"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "Item's uninstallation plug-in"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "Simcard plug-in"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Skapa filer på nytt"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Länka till andra tillgångar"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "Kunde inte läsa in klass %1$s-"
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Du har troligtvis skräpdata i databasen för denna plug-in och saknar filer i %1$s"
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Förhandsgranska tillgång"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Du måste konfigurera rättigheter för att aktivera förhandsgranskning"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Fält kopplade till tillgången"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etikett"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Namn i DB"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Lägg till nytt fält"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Skrivskyddat fält"
|
||||
BIN
plugins/genericobject/locales/tr_TR.mo
Normal file
176
plugins/genericobject/locales/tr_TR.po
Normal file
@ -0,0 +1,176 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Kaya Zeren <kayazeren@gmail.com>, 2015-2017,2019
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Turkish (Turkey) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/tr_TR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: tr_TR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "Nesne yönetimi"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr "Aile boş"
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "Nesne tipi"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr "İstenen açılan kutu bulunamadı"
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr "Alanlar silindi"
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr "Alan eklendi"
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr "Nesnelerin aile tipi"
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "Genel"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "Nesneler"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr "(Henüz bir tür tanımlanmamış)"
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr "Tip adı eksik"
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr "Tür adı daha uzun olmalı"
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr "field', 'object' ve 'type' tipleri ayrılmış olduğundan kullanılamaz. Lütfen başka bir tip seçin"
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr "Tip bir harf ile başlamalıdır"
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr "Aynı adlı bir tip zaten var"
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr "İç belirteç"
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr "Davranış"
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr "Ağ bağlantıları"
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr "dosya gönderme uygulama eki"
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr "stoknumarasiolustur uygulama eki"
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr "sıralama uygulama eki"
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr "ögeyi kaldırma uygulama eki"
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr "sim kart uygulama eki"
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr "ağaç görünümü uygulama eki"
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr "Dosyaları yeniden oluştur"
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr "Diğer nesnelere bağlantı"
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr "%1$s sınıfı yüklenemedi."
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr "Veritabanınızda bu uygulama eki ve %1$s içindeki eksik dosyalar için büyük olasılıkla çöp veriler var "
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr "Nesne önizleme"
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr "Ön izlemeyi görüntüleyebilmek için izinleri yapılandırmalısınız"
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr "Nesne ile ilişkilendirilmiş alanlar"
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr "Etiket"
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr "Veritabanındaki Ad"
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr "Alan ekle"
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr "Salt okunur alan"
|
||||
BIN
plugins/genericobject/locales/zh_CN.mo
Normal file
175
plugins/genericobject/locales/zh_CN.po
Normal file
@ -0,0 +1,175 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# liAnGjiA <liangjia@qq.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GLPI Plugin - Genericobject\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-05-28 10:21+0000\n"
|
||||
"PO-Revision-Date: 2021-05-28 10:22+0000\n"
|
||||
"Last-Translator: Cédric Anne\n"
|
||||
"Language-Team: Chinese (China) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: index.php:58 front/familylist.php:33 front/familylist.php:41
|
||||
#: front/type.form.php:73 inc/profile.class.php:39 inc/type.class.php:292
|
||||
#: inc/type.class.php:427 inc/object_item.class.php:109 setup.php:227
|
||||
msgid "Objects management"
|
||||
msgstr "项目管理"
|
||||
|
||||
#: index.php:68 front/familylist.php:37
|
||||
msgid "Empty family"
|
||||
msgstr ""
|
||||
|
||||
#: front/object.php:33 front/type.php:38 inc/profile.class.php:287
|
||||
#: inc/type.class.php:66
|
||||
msgid "Type of objects"
|
||||
msgstr "项目类型"
|
||||
|
||||
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
|
||||
#: front/commondropdown.form.php:36
|
||||
msgid "The requested dropdown does not exists"
|
||||
msgstr ""
|
||||
|
||||
#: front/field.form.php:41
|
||||
msgid "Field(s) deleted successfully"
|
||||
msgstr ""
|
||||
|
||||
#: front/field.form.php:51
|
||||
msgid "Field added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: inc/typefamily.class.php:36 inc/type.class.php:380 inc/type.class.php:517
|
||||
msgid "Family of type of objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/profile.class.php:141
|
||||
msgid "General"
|
||||
msgstr "常规"
|
||||
|
||||
#: inc/profile.class.php:147
|
||||
msgid "Objects"
|
||||
msgstr "项目"
|
||||
|
||||
#: inc/profile.class.php:149
|
||||
msgid "(No types defined yet)"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:156
|
||||
msgid "Type name is missing"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:162
|
||||
msgid "Type name must be longer"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:168
|
||||
msgid ""
|
||||
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:175
|
||||
msgid "Type must start with a letter"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:182
|
||||
msgid "A type already exists with the same name"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:478
|
||||
msgid "Internal identifier"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:532
|
||||
msgid "Behaviour"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:551
|
||||
msgid "Network connections"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:556
|
||||
msgid "injection file plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:558
|
||||
msgid "geninventorynumber plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:559
|
||||
msgid "order plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:560
|
||||
msgid "item's uninstallation plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:561
|
||||
msgid "simcard plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:562
|
||||
msgid "treeview plugin"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:725
|
||||
msgid "Regenerate files"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:738
|
||||
msgid "Link to other objects"
|
||||
msgstr ""
|
||||
|
||||
#: inc/type.class.php:1734
|
||||
msgid "Other"
|
||||
msgid_plural "Others"
|
||||
msgstr[0] ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2101
|
||||
#, php-format
|
||||
msgid "Unable to load the class %1$s."
|
||||
msgstr ""
|
||||
|
||||
#. TRANS: %1$s is itemtype name
|
||||
#: inc/type.class.php:2103
|
||||
#, php-format
|
||||
msgid ""
|
||||
"You probably have garbage data in your database for this plugin and missing "
|
||||
"files in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:548
|
||||
msgid "Object preview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/object.class.php:812
|
||||
msgid "You must configure rights to enable the preview"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:65
|
||||
msgid "Fields associated with the object"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:71
|
||||
msgid "Label"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:72
|
||||
msgid "Name in DB"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:127
|
||||
msgid "Add new field"
|
||||
msgstr ""
|
||||
|
||||
#: inc/field.class.php:322
|
||||
msgid "Read-only field"
|
||||
msgstr ""
|
||||
35
plugins/genericobject/objects/front.form.tpl
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This file is automatically managed by genericobject plugin. Do not edit it !
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$dropdown = new %%CLASSNAME%%();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
38
plugins/genericobject/objects/front.tpl
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
/**
|
||||
* This file is automatically managed by genericobject plugin. Do not edit it !
|
||||
*/
|
||||
|
||||
Html::header(%%CLASSNAME%%::getTypeName(), $_SERVER['PHP_SELF'], "plugins", "genericobject",
|
||||
"%%CLASSNAME%%");
|
||||
|
||||
Search::show('%%CLASSNAME%%');
|
||||
|
||||
Html::footer();
|
||||
45
plugins/genericobject/objects/generic.class.tpl
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This class is automatically managed by genericobject plugin. Do not edit it !
|
||||
*/
|
||||
class %%CLASSNAME%% extends PluginGenericobjectObject {
|
||||
|
||||
static $rightname = '';
|
||||
|
||||
static function getFormURL($full=true) {
|
||||
return Toolbox::getItemTypeFormURL( get_parent_class() , $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
}
|
||||
static function getSearchURL($full=true) {
|
||||
return Toolbox::getItemTypeSearchURL( get_parent_class() , $full) .
|
||||
"?itemtype=".get_called_class();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
33
plugins/genericobject/objects/generic.dropdown.class.tpl
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This class is automatically managed by genericobject plugin. Do not modify it !
|
||||
*/
|
||||
class %%CLASSNAME%% extends %%EXTENDS%% {
|
||||
public $linked_itemtype = "%%LINKED_ITEMTYPE%%";
|
||||
}
|
||||
35
plugins/genericobject/objects/generic.form.tpl
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This file is automatically managed by genericobject plugin. Do not edit it !
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$item = new %%CLASSNAME%%();
|
||||
include (GENERICOBJECT_DIR."/front/object.form.php");
|
||||
28
plugins/genericobject/objects/locale.tpl
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$LANG['genericobject']['%%CLASSNAME%%'][0]="%%NAME%%";
|
||||
44
plugins/genericobject/objects/object_item.class.tpl
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
if (!defined('GLPI_ROOT')){
|
||||
die("Sorry. You can't access directly to this file");
|
||||
}
|
||||
|
||||
class %%CLASSNAME%% extends PluginGenericobjectObject_Item {
|
||||
|
||||
public $dohistory = true;
|
||||
|
||||
// From CommonDBRelation
|
||||
static public $itemtype_1 = '%%SOURCEOBJECT%%';
|
||||
static public $items_id_1 = '%%FOREIGNKEY%%';
|
||||
|
||||
static public $itemtype_2 = 'itemtype';
|
||||
static public $items_id_2 = 'items_id';
|
||||
static public $checkItem_2_Rights = self::HAVE_VIEW_RIGHT_ON_ITEM;
|
||||
}
|
||||
|
||||
95
plugins/genericobject/objects/objectinjection.class.tpl
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of the genericobject plugin.
|
||||
|
||||
Genericobject plugin 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.
|
||||
|
||||
Genericobject plugin 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 Genericobject. If not, see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------
|
||||
@package genericobject
|
||||
@author the genericobject plugin team
|
||||
@copyright Copyright (c) 2010-2017 Genericobject plugin team
|
||||
@license GPLv2+
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
@link http://www.glpi-project.org/
|
||||
@since 2009
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This file is automatically managed by genericobject plugin. Do not edit it !
|
||||
*/
|
||||
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
die("Sorry. You can't access directly to this file");
|
||||
}
|
||||
|
||||
class %%INJECTIONCLASS%% extends %%CLASSNAME%%
|
||||
implements PluginDatainjectionInjectionInterface {
|
||||
|
||||
function __construct() {
|
||||
$this->table = getTableForItemType(get_parent_class($this));
|
||||
}
|
||||
|
||||
static function getTable($classname = null) {
|
||||
|
||||
$parenttype = get_parent_class();
|
||||
return $parenttype::getTable();
|
||||
|
||||
}
|
||||
|
||||
function isPrimaryType() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function connectedTo() {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard method to add an object into glpi
|
||||
*
|
||||
* @param values fields to add into glpi
|
||||
* @param options options used during creation
|
||||
* @return an array of IDs of newly created objects : for example [Computer=>1, Networkport=>10]
|
||||
*
|
||||
**/
|
||||
function addOrUpdateObject($values = [], $options = []) {
|
||||
|
||||
$lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options);
|
||||
$lib->processAddOrUpdate();
|
||||
return $lib->getInjectionResults();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get search options formatted for injection mapping usage in datainjection plugin.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function getOptions($primary_type = '') {
|
||||
$plugin = new Plugin();
|
||||
if (!$plugin->isActivated('datainjection')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return PluginDatainjectionCommonInjectionLib::addToSearchOptions(
|
||||
Search::getOptions(get_parent_class($this)),
|
||||
[
|
||||
'ignore_fields' => PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(
|
||||
get_parent_class($this)
|
||||
),
|
||||
],
|
||||
$this
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
BIN
plugins/genericobject/pics/default-icon.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
223
plugins/genericobject/pics/default-icon.svg
Normal file
@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="New document 1">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient3903"
|
||||
y2="20"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x2="20.639999"
|
||||
gradientTransform="matrix(1.7998001,0,0,1.7998001,-1230.8324,1125.8041)"
|
||||
y1="18.593"
|
||||
x1="10.269">
|
||||
<stop
|
||||
id="stop3905"
|
||||
style="stop-color:#b6ff19;stop-opacity:1;"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3907"
|
||||
style="stop-color:#82b80d;stop-opacity:1;"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
gradientTransform="matrix(1.7998001,0,0,1.7998001,-1230.8324,1125.8041)"
|
||||
x2="20.639999"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="20"
|
||||
id="linearGradient2402">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#ef2929"
|
||||
id="stop8344" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#b80d0d"
|
||||
id="stop8346" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2402"
|
||||
id="linearGradient3835"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.7998001,0,0,1.7998001,-1230.8324,1125.8041)"
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
x2="20.639999"
|
||||
y2="20" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2402"
|
||||
id="linearGradient3839"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.64410001,0,0,0.64410001,-265.64822,612.31377)"
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
x2="20.639999"
|
||||
y2="20" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2402-4"
|
||||
id="linearGradient3839-2"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.64410001,0,0,0.64410001,-265.64822,612.31377)"
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
x2="20.639999"
|
||||
y2="20" />
|
||||
<linearGradient
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
gradientTransform="matrix(1.7998001,0,0,1.7998001,-1230.8324,1125.8041)"
|
||||
x2="20.639999"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="20"
|
||||
id="linearGradient2402-4">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#29abef;stop-opacity:1;"
|
||||
id="stop8344-8" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#0d7eb8;stop-opacity:1;"
|
||||
id="stop8346-5" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3903"
|
||||
id="linearGradient3839-8"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.64410001,0,0,0.64410001,-265.64822,612.31377)"
|
||||
x1="10.269"
|
||||
y1="18.593"
|
||||
x2="20.639999"
|
||||
y2="20" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="23.208333"
|
||||
inkscape:cx="11.956912"
|
||||
inkscape:cy="12"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1360"
|
||||
inkscape:window-height="734"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1038"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-168.15861,-203.05603)">
|
||||
<path
|
||||
d="m 180.14132,213.85453 c -0.049,0.007 -0.0959,0.0232 -0.13814,0.0489 l -3.64851,2.08483 c -0.11073,0.0638 -0.17901,0.18173 -0.17923,0.30945 v 3.64816 c -3.9e-4,0.12168 0.0609,0.23512 0.16287,0.30133 l 3.12735,2.08497 c 0.11308,0.073 0.25802,0.0762 0.37433,0.008 l 3.64852,-2.08497 c 0.11058,-0.0637 0.17893,-0.1818 0.17929,-0.30956 v -3.64816 c 3.6e-4,-0.12175 -0.0608,-0.23523 -0.16283,-0.30151 l -3.12745,-2.08479 c -0.0694,-0.046 -0.15317,-0.0661 -0.2362,-0.057 z"
|
||||
style="fill:#640000"
|
||||
id="path9344"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 176.92501,216.5072 2.76611,1.84412 v 3.22694 l -2.76611,-1.84376 v -3.2273 z"
|
||||
style="fill:#d40000"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9348"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 180.15206,214.66329 2.766,1.84391 -3.22694,1.84412 -2.76611,-1.84412 3.22705,-1.84391 z"
|
||||
style="fill:url(#linearGradient3839)"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9350"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 182.91806,216.5072 v 3.2273 l -3.22694,1.84376 v -3.22694 l 3.22694,-1.84412 z"
|
||||
style="fill:#aa0000"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9352"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 176.8451,207.8546 c -0.049,0.007 -0.0959,0.0232 -0.13814,0.0489 l -3.64851,2.08483 c -0.11073,0.0638 -0.17901,0.18173 -0.17923,0.30945 v 3.64816 c -3.9e-4,0.12168 0.0609,0.23512 0.16287,0.30133 l 3.12735,2.08497 c 0.11308,0.073 0.25802,0.0762 0.37433,0.008 l 3.64852,-2.08497 c 0.11058,-0.0637 0.17893,-0.1818 0.17929,-0.30956 v -3.64816 c 3.6e-4,-0.12175 -0.0608,-0.23523 -0.16283,-0.30151 l -3.12745,-2.08479 c -0.0694,-0.046 -0.15317,-0.0661 -0.2362,-0.057 z"
|
||||
style="fill:#640000"
|
||||
id="path9344-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 173.62879,210.50727 2.76611,1.84412 v 3.22694 l -2.76611,-1.84376 v -3.2273 z"
|
||||
style="fill:#008cd4;fill-opacity:1"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9348-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 176.85584,208.66336 2.766,1.84391 -3.22694,1.84412 -2.76611,-1.84412 3.22705,-1.84391 z"
|
||||
style="fill:url(#linearGradient3839-2);fill-opacity:1"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9350-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 179.62184,210.50727 v 3.2273 l -3.22694,1.84376 v -3.22694 l 3.22694,-1.84412 z"
|
||||
style="fill:#0070aa;fill-opacity:1"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9352-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 183.91153,207.72534 c -0.049,0.007 -0.0959,0.0232 -0.13814,0.0489 l -3.64851,2.08483 c -0.11073,0.0638 -0.17901,0.18173 -0.17923,0.30945 v 3.64816 c -3.9e-4,0.12168 0.0609,0.23512 0.16287,0.30133 l 3.12735,2.08497 c 0.11308,0.073 0.25802,0.0762 0.37433,0.008 l 3.64852,-2.08497 c 0.11058,-0.0637 0.17893,-0.1818 0.17929,-0.30956 v -3.64816 c 3.6e-4,-0.12175 -0.0608,-0.23523 -0.16283,-0.30151 l -3.12745,-2.08479 c -0.0694,-0.046 -0.15317,-0.0661 -0.2362,-0.057 z"
|
||||
style="fill:#640000"
|
||||
id="path9344-9"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 180.69522,210.37801 2.76611,1.84412 v 3.22694 l -2.76611,-1.84376 v -3.2273 z"
|
||||
style="fill:#91d400;fill-opacity:1"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9348-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 183.92227,208.5341 2.766,1.84391 -3.22694,1.84412 -2.76611,-1.84412 3.22705,-1.84391 z"
|
||||
style="fill:url(#linearGradient3839-8);fill-opacity:1.0"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9350-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 186.68827,210.37801 v 3.2273 l -3.22694,1.84376 v -3.22694 l 3.22694,-1.84412 z"
|
||||
style="fill:#74aa00;fill-opacity:1"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path9352-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.3 KiB |
BIN
plugins/genericobject/pics/default-icon16.png
Normal file
|
After Width: | Height: | Size: 772 B |
98
plugins/genericobject/pics/icon-examples/car.svg
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
id="svg4320"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="carsilhoutte.svg">
|
||||
<defs
|
||||
id="defs4322" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11.2"
|
||||
inkscape:cx="15.388371"
|
||||
inkscape:cy="2.9950797"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1360"
|
||||
inkscape:window-height="734"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1038"
|
||||
inkscape:window-maximized="1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(403.90655,-375.63331)">
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
d="m -389.59111,383.64474 c -0.0353,4.6e-4 -0.07,9e-4 -0.10306,0.002 -1.05842,0.0333 -3.08695,-0.0663 -3.93957,0.29983 0,0 -2.0868,1.29744 -2.8217,1.82996 -0.73511,0.53251 -2.23445,0.53264 -3.96913,0.73227 -1.73446,0.19964 -2.40295,0.79354 -2.40295,0.79354 -0.4877,0.65132 -0.74798,1.10854 -0.83101,2.00222 -0.0461,0.23119 0.82666,0.58948 0.82309,1.29805 l 1.35211,0 c 0,0 0.17271,-2.34545 2.05411,-2.31214 1.88161,0.0333 1.97411,2.31214 1.97411,2.31214 l 10.29073,0 c 0,0 0.263,-2.27098 1.96907,-2.33737 1.70402,-0.0666 2.02744,2.33737 2.02744,2.33737 0,0 1.52879,-0.035 2.02889,0 0.52024,0.0207 0.39764,-0.75019 0.94057,-0.93264 0.19436,-1.66005 -0.27403,-1.48194 -0.62201,-2.98675 -0.79438,-0.29957 -0.96432,-0.25963 -1.43354,-0.42596 -0.34369,-0.12113 -2.45146,-1.58333 -3.29524,-1.97771 -0.8154,-0.3816 -2.94719,-0.64895 -4.04191,-0.63497 z m 4.48085,4.84915 a 1.5647065,1.5647065 0 0 0 -1.60942,1.56544 1.5647282,1.5647282 0 0 0 3.12946,0 1.5647065,1.5647065 0 0 0 -1.52004,-1.56544 z m -14.29734,7.1e-4 a 1.5647065,1.5647065 0 0 0 -1.60941,1.56473 1.5647282,1.5647282 0 0 0 3.12945,0 1.5647065,1.5647065 0 0 0 -1.52004,-1.56473 z"
|
||||
id="path3070-9-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<metadata
|
||||
id="metadata4429">
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
|
||||
<dc:publisher>
|
||||
<cc:Agent
|
||||
rdf:about="http://openclipart.org/">
|
||||
<dc:title>Openclipart</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:title>Simple side of car silhouette</dc:title>
|
||||
<dc:date>2014-01-11T08:53:56</dc:date>
|
||||
<dc:description>car outline in black and white</dc:description>
|
||||
<dc:source>https://openclipart.org/detail/190006/simple-side-of-car-silhouette-by-z-190006</dc:source>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Z</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>car</rdf:li>
|
||||
<rdf:li>side</rdf:li>
|
||||
<rdf:li>silhouette</rdf:li>
|
||||
<rdf:li>simple</rdf:li>
|
||||
<rdf:li>vehicle</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
216
plugins/genericobject/pics/icon-examples/cube.svg
Normal file
@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:ns1="http://sozi.baierouge.fr"
|
||||
id="svg2"
|
||||
sodipodi:modified="TRUE"
|
||||
viewBox="0 0 30 30"
|
||||
sodipodi:docbase="D:\gfx"
|
||||
inkscape:export-ydpi="45"
|
||||
inkscape:export-xdpi="45"
|
||||
version="1.0"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
sodipodi:docname="icon_cube_red.svg"
|
||||
inkscape:export-filename="D:\proj\icons\released\icon_cube_red.png"
|
||||
inkscape:version="0.46"
|
||||
sodipodi:version="0.32"
|
||||
>
|
||||
<defs
|
||||
id="defs4"
|
||||
>
|
||||
<linearGradient
|
||||
id="linearGradient2402"
|
||||
y2="20"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x2="20.64"
|
||||
gradientTransform="matrix(.64410 0 0 .64410 4.0504 -2.3906)"
|
||||
y1="18.593"
|
||||
x1="10.269"
|
||||
inkscape:collect="always"
|
||||
>
|
||||
<stop
|
||||
id="stop8344"
|
||||
style="stop-color:#ef2929"
|
||||
offset="0"
|
||||
/>
|
||||
<stop
|
||||
id="stop8346"
|
||||
style="stop-color:#b80d0d"
|
||||
offset="1"
|
||||
/>
|
||||
</linearGradient
|
||||
>
|
||||
</defs
|
||||
>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
inkscape:zoom="22.627417"
|
||||
height="49px"
|
||||
borderopacity="1.0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:cx="-0.21905163"
|
||||
inkscape:cy="16.236768"
|
||||
inkscape:grid-points="true"
|
||||
inkscape:grid-bbox="true"
|
||||
showgrid="false"
|
||||
width="60px"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:document-units="px"
|
||||
bordercolor="#666666"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
pagecolor="#ffffff"
|
||||
gridtolerance="10000"
|
||||
inkscape:window-height="1003"
|
||||
>
|
||||
<inkscape:grid
|
||||
id="GridFromPre046Settings"
|
||||
opacity=".2"
|
||||
visible="true"
|
||||
color="#0000ff"
|
||||
enabled="true"
|
||||
originy="0px"
|
||||
originx="0px"
|
||||
empspacing="4"
|
||||
spacingy="1px"
|
||||
spacingx="1px"
|
||||
empopacity="0.4"
|
||||
type="xygrid"
|
||||
empcolor="#0000ff"
|
||||
/>
|
||||
</sodipodi:namedview
|
||||
>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
>
|
||||
<g
|
||||
id="g2406"
|
||||
>
|
||||
<path
|
||||
id="path9344"
|
||||
style="fill:#640000"
|
||||
d="m15.614 3.0787c-0.137 0.0183-0.268 0.0648-0.386 0.1365l-10.195 5.8256c-0.3094 0.1783-0.5002 0.5078-0.5008 0.8647v10.194c-0.0011 0.34 0.1703 0.657 0.4551 0.842l8.7387 5.826c0.316 0.204 0.721 0.213 1.046 0.023l10.195-5.826c0.309-0.178 0.5-0.508 0.501-0.865v-10.194c0.001-0.3402-0.17-0.6573-0.455-0.8425l-8.739-5.8255c-0.194-0.1284-0.428-0.1848-0.66-0.1593z"
|
||||
/>
|
||||
<path
|
||||
id="path9348"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
style="fill:#d40000"
|
||||
d="m6.6267 10.491l7.7293 5.153v9.017l-7.7293-5.152v-9.018z"
|
||||
/>
|
||||
<path
|
||||
id="path9350"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
style="fill:url(#linearGradient2402)"
|
||||
d="m15.644 5.3386l7.729 5.1524-9.017 5.153-7.7293-5.153 9.0173-5.1524z"
|
||||
/>
|
||||
<path
|
||||
id="path9352"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
style="fill:#aa0000"
|
||||
d="m23.373 10.491v9.018l-9.017 5.152v-9.017l9.017-5.153z"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
</g
|
||||
>
|
||||
<metadata
|
||||
>
|
||||
<rdf:RDF
|
||||
>
|
||||
<cc:Work
|
||||
>
|
||||
<dc:format
|
||||
>image/svg+xml</dc:format
|
||||
>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
/>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
|
||||
/>
|
||||
<dc:publisher
|
||||
>
|
||||
<cc:Agent
|
||||
rdf:about="http://openclipart.org/"
|
||||
>
|
||||
<dc:title
|
||||
>Openclipart</dc:title
|
||||
>
|
||||
</cc:Agent
|
||||
>
|
||||
</dc:publisher
|
||||
>
|
||||
<dc:title
|
||||
>icon_cube_red</dc:title
|
||||
>
|
||||
<dc:date
|
||||
>2008-05-26T15:29:22</dc:date
|
||||
>
|
||||
<dc:description
|
||||
/>
|
||||
<dc:source
|
||||
>https://openclipart.org/detail/17062/icon_cube_red-by-jean_victor_balin</dc:source
|
||||
>
|
||||
<dc:creator
|
||||
>
|
||||
<cc:Agent
|
||||
>
|
||||
<dc:title
|
||||
>jean_victor_balin</dc:title
|
||||
>
|
||||
</cc:Agent
|
||||
>
|
||||
</dc:creator
|
||||
>
|
||||
<dc:subject
|
||||
>
|
||||
<rdf:Bag
|
||||
>
|
||||
<rdf:li
|
||||
>cube</rdf:li
|
||||
>
|
||||
<rdf:li
|
||||
>icon</rdf:li
|
||||
>
|
||||
<rdf:li
|
||||
>item</rdf:li
|
||||
>
|
||||
</rdf:Bag
|
||||
>
|
||||
</dc:subject
|
||||
>
|
||||
</cc:Work
|
||||
>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/publicdomain/"
|
||||
>
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction"
|
||||
/>
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution"
|
||||
/>
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
|
||||
/>
|
||||
</cc:License
|
||||
>
|
||||
</rdf:RDF
|
||||
>
|
||||
</metadata
|
||||
>
|
||||
</svg
|
||||
>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
269
plugins/genericobject/setup.php
Normal file
@ -0,0 +1,269 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------------
|
||||
* GenericObject plugin for GLPI
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of GenericObject.
|
||||
*
|
||||
* GenericObject 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
* -------------------------------------------------------------------------
|
||||
* @copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* @link https://github.com/pluginsGLPI/genericobject
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
define ('PLUGIN_GENERICOBJECT_VERSION', '2.11.1');
|
||||
|
||||
// Minimal GLPI version, inclusive
|
||||
define("PLUGIN_GENERICOBJECT_MIN_GLPI", "9.5");
|
||||
// Maximum GLPI version, exclusive
|
||||
define("PLUGIN_GENERICOBJECT_MAX_GLPI", "9.6");
|
||||
|
||||
if (!defined("GENERICOBJECT_DIR")) {
|
||||
define("GENERICOBJECT_DIR", Plugin::getPhpDir("genericobject"));
|
||||
}
|
||||
|
||||
if (!defined("GENERICOBJECT_DOC_DIR")) {
|
||||
define("GENERICOBJECT_DOC_DIR", GLPI_PLUGIN_DOC_DIR . "/genericobject");
|
||||
if (!file_exists(GENERICOBJECT_DOC_DIR)) {
|
||||
mkdir(GENERICOBJECT_DOC_DIR);
|
||||
}
|
||||
}
|
||||
if (!defined("GENERICOBJECT_FRONT_PATH")) {
|
||||
define("GENERICOBJECT_FRONT_PATH", GENERICOBJECT_DOC_DIR."/front");
|
||||
if (!file_exists(GENERICOBJECT_FRONT_PATH)) {
|
||||
mkdir(GENERICOBJECT_FRONT_PATH);
|
||||
}
|
||||
}
|
||||
if (!defined("GENERICOBJECT_AJAX_PATH")) {
|
||||
define("GENERICOBJECT_AJAX_PATH", GENERICOBJECT_DOC_DIR . "/ajax");
|
||||
if (!file_exists(GENERICOBJECT_AJAX_PATH)) {
|
||||
mkdir(GENERICOBJECT_AJAX_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined("GENERICOBJECT_CLASS_PATH")) {
|
||||
define("GENERICOBJECT_CLASS_PATH", GENERICOBJECT_DOC_DIR . "/inc");
|
||||
if (!file_exists(GENERICOBJECT_CLASS_PATH)) {
|
||||
mkdir(GENERICOBJECT_CLASS_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined("GENERICOBJECT_LOCALES_PATH")) {
|
||||
define("GENERICOBJECT_LOCALES_PATH", GENERICOBJECT_DOC_DIR . "/locales");
|
||||
if (!file_exists(GENERICOBJECT_LOCALES_PATH)) {
|
||||
mkdir(GENERICOBJECT_LOCALES_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined("GENERICOBJECT_FIELDS_PATH")) {
|
||||
define("GENERICOBJECT_FIELDS_PATH", GENERICOBJECT_DOC_DIR . "/fields");
|
||||
if (!file_exists(GENERICOBJECT_FIELDS_PATH)) {
|
||||
mkdir(GENERICOBJECT_FIELDS_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined("GENERICOBJECT_PICS_PATH")) {
|
||||
define("GENERICOBJECT_PICS_PATH", GENERICOBJECT_DOC_DIR . "/pics");
|
||||
if (!file_exists(GENERICOBJECT_PICS_PATH)) {
|
||||
mkdir(GENERICOBJECT_PICS_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
// Autoload class generated in files/_plugins/genericobject/inc/
|
||||
include_once( GENERICOBJECT_DIR . "/inc/autoload.php");
|
||||
include_once( GENERICOBJECT_DIR . "/inc/functions.php");
|
||||
if (file_exists(GENERICOBJECT_DIR . "/log_filter.settings.php")) {
|
||||
include_once(GENERICOBJECT_DIR . "/log_filter.settings.php");
|
||||
}
|
||||
|
||||
$go_autoloader = new PluginGenericobjectAutoloader([
|
||||
GENERICOBJECT_CLASS_PATH
|
||||
]);
|
||||
$go_autoloader->register();
|
||||
|
||||
/**
|
||||
* Init hooks of the plugin.
|
||||
* REQUIRED
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function plugin_init_genericobject() {
|
||||
global $PLUGIN_HOOKS, $GO_BLACKLIST_FIELDS,
|
||||
$GENERICOBJECT_PDF_TYPES, $GO_LINKED_TYPES, $GO_READONLY_FIELDS;
|
||||
|
||||
$GO_READONLY_FIELDS = ["is_helpdesk_visible", "comment"];
|
||||
|
||||
$GO_BLACKLIST_FIELDS = ["itemtype", "table", "is_deleted", "id", "entities_id",
|
||||
"is_recursive", "is_template", "notepad", "template_name",
|
||||
"date_mod", "name", "is_helpdesk_visible", "comment",
|
||||
"date_creation"];
|
||||
|
||||
$GO_LINKED_TYPES = ['Computer', 'Phone', 'Peripheral', 'Software', 'Monitor',
|
||||
'Printer', 'NetworkEquipment'];
|
||||
|
||||
$PLUGIN_HOOKS['csrf_compliant']['genericobject'] = true;
|
||||
$GENERICOBJECT_PDF_TYPES = [];
|
||||
$plugin = new Plugin();
|
||||
|
||||
if ($plugin->isInstalled("genericobject")
|
||||
&& $plugin->isActivated("genericobject")
|
||||
&& isset($_SESSION['glpiactiveprofile'])) {
|
||||
|
||||
//if treeview is installed
|
||||
if ($plugin->isInstalled("treeview")
|
||||
&& $plugin->isActivated("treeview")
|
||||
&& class_exists('PluginTreeviewConfig')) {
|
||||
|
||||
//foreach type in genericobject
|
||||
foreach (PluginGenericobjectType::getTypes() as $itemtype => $value) {
|
||||
//check if location_id field exist
|
||||
$fields_in_db = PluginGenericobjectSingletonObjectField::getInstance($itemtype);
|
||||
$objecttype = PluginGenericobjectType::getInstance($itemtype);
|
||||
if (isset($fields_in_db['locations_id']) && $objecttype->canUsePluginTreeview()) {
|
||||
|
||||
//register class
|
||||
PluginTreeviewConfig::registerType($itemtype);
|
||||
$PLUGIN_HOOKS['treeview'][$itemtype] = Plugin::getWebDir('genericobject') . '/pics/default-icon16.png';
|
||||
|
||||
//add hook for overload item show form url
|
||||
$PLUGIN_HOOKS['treeview_params']['genericobject'] = [
|
||||
'PluginGenericobjectObject',
|
||||
'showGenericObjectTreeview'
|
||||
];
|
||||
|
||||
//add hook for overload search form url of itemtype
|
||||
$PLUGIN_HOOKS['treeview_search_url_parent_node']['genericobject'] = [
|
||||
'PluginGenericobjectObject',
|
||||
'getParentNodeSearchUrl'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$PLUGIN_HOOKS['change_profile']['genericobject'] = [
|
||||
'PluginGenericobjectProfile',
|
||||
'changeProfile'
|
||||
];
|
||||
|
||||
plugin_genericobject_includeCommonFields();
|
||||
$PLUGIN_HOOKS['use_massive_action']['genericobject'] = 1;
|
||||
|
||||
// add css styles
|
||||
$PLUGIN_HOOKS['add_css']['genericobject'] = [
|
||||
"css/styles.css"
|
||||
];
|
||||
|
||||
// Display a menu entry ?
|
||||
$PLUGIN_HOOKS['menu_toadd']['genericobject'] = [
|
||||
'config' => 'PluginGenericobjectType',
|
||||
'assets' => 'PluginGenericobjectObject'
|
||||
];
|
||||
|
||||
// Config page
|
||||
if (Session::haveRight('config', READ)) {
|
||||
$PLUGIN_HOOKS['config_page']['genericobject'] = 'front/type.php';
|
||||
}
|
||||
|
||||
$PLUGIN_HOOKS['assign_to_ticket']['genericobject'] = true;
|
||||
$PLUGIN_HOOKS['use_massive_action']['genericobject'] = 1;
|
||||
|
||||
$PLUGIN_HOOKS['post_init']['genericobject'] = 'plugin_post_init_genericobject';
|
||||
$PLUGIN_HOOKS['plugin_datainjection_populate']['genericobject'] = "plugin_datainjection_populate_genericobject";
|
||||
|
||||
$PLUGIN_HOOKS['formcreator_get_glpi_object_types']['genericobject'] = [
|
||||
PluginGenericobjectType::getType(),
|
||||
'getTypesForFormcreator'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
function plugin_post_init_genericobject() {
|
||||
Plugin::registerClass(
|
||||
'PluginGenericobjectProfile',
|
||||
['addtabon' => ['Profile', 'PluginGenericobjectType']]
|
||||
);
|
||||
|
||||
foreach (PluginGenericobjectType::getTypes() as $id => $objecttype) {
|
||||
$itemtype = $objecttype['itemtype'];
|
||||
if (class_exists($itemtype)) {
|
||||
$itemtype::registerType();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name and the version of the plugin
|
||||
* REQUIRED
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function plugin_version_genericobject() {
|
||||
return [
|
||||
'name' => __("Objects management", "genericobject"),
|
||||
'version' => PLUGIN_GENERICOBJECT_VERSION,
|
||||
'author' => "<a href=\"mailto:contact@teclib.com\">Teclib'</a> & siprossii",
|
||||
'homepage' => 'https://github.com/pluginsGLPI/genericobject',
|
||||
'license' => 'GPLv2+',
|
||||
'requirements' => [
|
||||
'glpi' => [
|
||||
'min' => PLUGIN_GENERICOBJECT_MIN_GLPI,
|
||||
'max' => PLUGIN_GENERICOBJECT_MAX_GLPI,
|
||||
'dev' => true, //Required to allow 9.2-dev
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
function plugin_genericobject_haveTypeRight($itemtype, $right) {
|
||||
switch ($itemtype) {
|
||||
case 'PluginGenericobjectType' :
|
||||
return Session::haveRight("config", $right);
|
||||
default :
|
||||
return Session::haveRight($itemtype, $right);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function plugin_genericobject_includeCommonFields($force = false) {
|
||||
//Load genericobject default constants
|
||||
if (!$force) {
|
||||
include_once (GENERICOBJECT_DIR."/fields/field.constant.php");
|
||||
} else {
|
||||
include (GENERICOBJECT_DIR."/fields/field.constant.php");
|
||||
}
|
||||
|
||||
//Include user constants, that must be accessible for all itemtypes
|
||||
if (file_exists(GENERICOBJECT_FIELDS_PATH . "/field.constant.php")) {
|
||||
if (!$force) {
|
||||
include_once ( GENERICOBJECT_FIELDS_PATH . "/field.constant.php");
|
||||
} else {
|
||||
include ( GENERICOBJECT_FIELDS_PATH . "/field.constant.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function plugin_genericobject_haveRight($class, $right) {
|
||||
|
||||
$right_name = PluginGenericobjectProfile::getProfileNameForItemtype($class);
|
||||
return Session::haveRight($right_name, $right);
|
||||
|
||||
}
|
||||
25
plugins/genericobject/tools/HEADER
Normal file
@ -0,0 +1,25 @@
|
||||
-------------------------------------------------------------------------
|
||||
GenericObject plugin for GLPI
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of GenericObject.
|
||||
|
||||
GenericObject 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GenericObject 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 GenericObject. If not, see <http://www.gnu.org/licenses/>.
|
||||
-------------------------------------------------------------------------
|
||||
@copyright Copyright (C) 2009-2022 by GenericObject plugin team.
|
||||
@license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
|
||||
@link https://github.com/pluginsGLPI/genericobject
|
||||
-------------------------------------------------------------------------
|
||||
3
plugins/remove.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Vous pouvez effacer ce fichier sans dommages.
|
||||
|
||||
You can safely remove this file.
|
||||