Compare commits

..
Author SHA1 Message Date
Bachir Soussi Chiadmi 73ec6d3c1e fixed image for anonymous 2016-12-12 14:35:55 +01:00
Bachir Soussi Chiadmi dee5085c89 improved term field restoration batch script 2016-12-12 11:33:34 +01:00
Bachir Soussi Chiadmi c4ab89f177 trying to fix PHP Fatal error: Cannot use [] for reading 2016-12-12 11:30:20 +01:00
Bachir Soussi Chiadmi d1b069ad8b added term field restoration batch script 2016-12-12 11:24:20 +01:00
Bachir Soussi Chiadmi c56a523286 fixed showroom field form bug, removed ordering, fixed card js in node page 2016-12-11 19:50:48 +01:00
Bachir Soussi Chiadmi 8b5d721bfd fixed location field access for administrator, improved disbaled field display 2016-12-11 11:30:39 +01:00
Bachir Soussi Chiadmi 7ed9dc54bf fixed card print css display 2016-12-11 10:34:10 +01:00
Bachir Soussi Chiadmi adee2f54e3 fixed card print css display 2016-12-11 10:30:32 +01:00
Bachir Soussi Chiadmi 41e3e6dfb2 Location -> samples, fixed cs display, fixed empty field 2016-12-11 10:17:00 +01:00
Bachir Soussi Chiadmi 5f6a9ac5d1 fixed showroom location formatter and contentype display
remains css
2016-12-10 19:27:00 +01:00
Bachir Soussi Chiadmi 16d8adc672 trimed contentadminrelink 2016-12-10 18:31:21 +01:00
Bachir Soussi Chiadmi 138b68ac98 commited features for showroom release 2016-12-10 18:30:03 +01:00
Bachir Soussi Chiadmi 026a9bc241 commited custom modules for showroom release 2016-12-10 18:29:27 +01:00
Bachir Soussi Chiadmi adb1437a44 reseted old features as in prod 2016-12-10 11:10:49 +01:00
Bachir Soussi Chiadmi 5d17730143 added helpers scripts 2016-12-10 11:03:19 +01:00
Bachir Soussi Chiadmi 1ec80dc60e finished showroom migration batch function 2016-11-27 19:48:58 +01:00
Bachir Soussi Chiadmi 5423f6d3bc added per user showroom location field access 2016-11-27 12:27:57 +01:00
Bachir Soussi Chiadmi 1ccc5d07d6 coded the showroom field
still have to manage access
2016-11-26 21:18:06 +01:00
Bachir Soussi Chiadmi 597e6c9159 first draft of custom materio showroom location, recording values DOESN'T WORK 2016-11-22 19:12:02 +01:00
Bachir Soussi Chiadmi b26db27098 patched loggintobogan fixed bug against field_permissions
removed field_collection (gonna dev own custom modules for showroom
updated field-permissions to last dev
2016-11-22 19:05:44 +01:00
Bachir Soussi Chiadmi b9ac935de6 with last commit: contrib field_collection mod & custom showroom et translator mods 2016-11-21 19:42:00 +01:00
Bachir Soussi Chiadmi 091c01ce81 updated features : created showroom_localisation field. Perms with showroom role are still failing 2016-11-21 19:39:50 +01:00
Bachir Soussi Chiadmi 039f49aded updated amdin content-types showroom features 2016-11-21 15:32:15 +01:00
Bachir Soussi Chiadmi cc295255a1 Merge branch 'translators' into showroom 2016-11-21 10:50:21 +01:00
Bachir Soussi Chiadmi fedd8f4216 updated Fast permission admin module to last dev 2016-11-21 10:35:49 +01:00
Bachir Soussi Chiadmi 73f871cbcc added translate link to admin view 2016-11-07 17:29:00 +01:00
Bachir Soussi Chiadmi 0f286a2d78 css language switcher for more than 2 languages 2016-11-07 16:32:29 +01:00
Bachir Soussi Chiadmi ac87a57196 created translations feature 2016-11-07 16:31:32 +01:00
Bachir Soussi Chiadmi b00f897952 fixed images display bug in admin 2016-11-07 14:01:48 +01:00
Bachir Soussi Chiadmi 99f92edb37 updatedadmin feature 2016-11-07 13:15:03 +01:00
Bachir Soussi Chiadmi d0566a6155 tryig to fix admin feature 2016-11-07 13:12:59 +01:00
Bachir Soussi Chiadmi 0bf7b4a1c8 added companies views in admin feature 2016-11-07 13:00:45 +01:00
Bachir Soussi Chiadmi 2f02bb6485 fixed niouseletter on mobile 2016-11-07 12:18:15 +01:00
Bachir Soussi Chiadmi a477dbb8ec updated features 2016-11-07 10:51:20 +01:00
Bachir Soussi Chiadmi d4fee57337 removed TAC dependency form showroom feature 2016-11-07 09:56:29 +01:00
Bachir Soussi Chiadmi c97d1d7f75 updated features for showroom 2016-11-06 21:32:21 +01:00
Bachir Soussi Chiadmi c7e2de9e8b updated permission admin feature for showroom 2016-11-06 19:48:20 +01:00
Bachir Soussi Chiadmi cc000ce3d6 updated content admin views for showroom 2016-11-06 19:45:15 +01:00
103 changed files with 11643 additions and 2632 deletions
+4
View File
@@ -29,3 +29,7 @@ views_rss_media
node_export :
- https://www.drupal.org/node/1869918
- https://www.drupal.org/node/1911638
login_tobogan (pd with field permission et donc field collection)
- https://www.drupal.org/node/1365764#comment-10286257
- logintoboggan-exempting_lt_preauth_role_from_user_permissions_js-1365764-52.patch
- interdiff-1365764-23-52-do-not-test.diff
+4
View File
@@ -0,0 +1,4 @@
#! /bin/bash
sudo chown -R $USER:http sites/all/modules/features/
sudo chmod -R g+w sites/all/modules/features/
+14
View File
@@ -0,0 +1,14 @@
diff --git a/logintoboggan.permissions.js b/logintoboggan.permissions.js
index d463d29..492b64c 100644
--- a/logintoboggan.permissions.js
+++ b/logintoboggan.permissions.js
@@ -14,6 +14,9 @@ Drupal.behaviors.LoginTobogganPermissions = {
$('table#permissions', context).once('tobogganPermissions', function () {
$('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
$(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
});
},
@@ -0,0 +1,136 @@
diff --git a/logintoboggan.module b/logintoboggan.module
index 55b93fe..4e4e0fc 100644
--- a/logintoboggan.module
+++ b/logintoboggan.module
@@ -306,26 +306,6 @@ function logintoboggan_form_user_pass_reset_alter(&$form, &$form_state) {
}
/**
- * Implement hook_form_user_admin_permissions_alter().
- *
- * @ingroup logintoboggan_core
- */
-function logintoboggan_form_user_admin_permissions_alter(&$form, &$form_state) {
- // If the pre-auth role isn't the auth user, then add it as a setting.
- $id = logintoboggan_validating_id();
- if ($id != DRUPAL_AUTHENTICATED_RID) {
- $form['#attached']['js'][] = array(
- 'data' => array(
- 'LoginToboggan' => array(
- 'preAuthID' => $id,
- ),
- ),
- 'type' => 'setting',
- );
- }
-}
-
-/**
* Implement hook_form_alter().
*
* @ingroup logintoboggan_core
@@ -410,7 +390,10 @@ function logintoboggan_js_alter(&$javascript) {
// prevent the pre-auth role's checkboxes from being automatically disabled
// when the auth user's checkboxes are checked.
if ($id != DRUPAL_AUTHENTICATED_RID) {
- $javascript['modules/user/user.permissions.js']['data'] = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
+ $javascript['settings']['data'][] = array('LoginToboggan' => array('preAuthID' => $id));
+ $file = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
+ $javascript[$file] = drupal_js_defaults($file);
+ $javascript[$file]['weight'] = 999;
}
}
}
diff --git a/logintoboggan.permissions.js b/logintoboggan.permissions.js
index 1d406cc..492b64c 100644
--- a/logintoboggan.permissions.js
+++ b/logintoboggan.permissions.js
@@ -1,77 +1,25 @@
/**
- * This is a custom implementation of user.permissions.js, which is necessary
- * because LoginToboggan needs its pre-auth role to not be explicitly tied to
- * the auth role. The change is minor -- simply exclude the pre-auth role from
- * all the auto-checking as the anon and auth user roles are.
+ * LoginToboggan needs its pre-auth role to not be explicitly tied to
+ * the auth role.
*/
-
(function ($) {
/**
* Shows checked and disabled checkboxes for inherited permissions.
*/
-Drupal.behaviors.permissions = {
- attach: function (context) {
- var self = this;
- $('table#permissions').once('permissions', function () {
- // On a site with many roles and permissions, this behavior initially has
- // to perform thousands of DOM manipulations to inject checkboxes and hide
- // them. By detaching the table from the DOM, all operations can be
- // performed without triggering internal layout and re-rendering processes
- // in the browser.
- var $table = $(this);
- if ($table.prev().length) {
- var $ancestor = $table.prev(), method = 'after';
- }
- else {
- var $ancestor = $table.parent(), method = 'append';
- }
- $table.detach();
-
- // Create dummy checkboxes. We use dummy checkboxes instead of reusing
- // the existing checkboxes here because new checkboxes don't alter the
- // submitted form. If we'd automatically check existing checkboxes, the
- // permission table would be polluted with redundant entries. This
- // is deliberate, but desirable when we automatically check them.
- var $dummy = $('<input type="checkbox" class="dummy-checkbox" disabled="disabled" checked="checked" />')
- .attr('title', Drupal.t("This permission is inherited from the authenticated user role."))
- .hide();
-
- $('input[type=checkbox]', this).not('.rid-2, .rid-1, .rid-' + Drupal.settings.LoginToboggan.preAuthID).addClass('real-checkbox').each(function () {
- $dummy.clone().insertAfter(this);
+Drupal.behaviors.LoginTobogganPermissions = {
+ attach: function (context, settings) {
+ // Revert changes made by modules/user/user.permissions.js
+ $('table#permissions', context).once('tobogganPermissions', function () {
+ $('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
+ $(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
-
- // Initialize the authenticated user checkbox.
- $('input[type=checkbox].rid-2', this)
- .bind('click.permissions', self.toggle)
- // .triggerHandler() cannot be used here, as it only affects the first
- // element.
- .each(self.toggle);
-
- // Re-insert the table into the DOM.
- $ancestor[method]($table);
});
},
-
- /**
- * Toggles all dummy checkboxes based on the checkboxes' state.
- *
- * If the "authenticated user" checkbox is checked, the checked and disabled
- * checkboxes are shown, the real checkboxes otherwise.
- */
- toggle: function () {
- var authCheckbox = this, $row = $(this).closest('tr');
- // jQuery performs too many layout calculations for .hide() and .show(),
- // leading to a major page rendering lag on sites with many roles and
- // permissions. Therefore, we toggle visibility directly.
- $row.find('.real-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? 'none' : '');
- });
- $row.find('.dummy-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? '' : 'none');
- });
- }
};
})(jQuery);
@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
@@ -0,0 +1,2 @@
Features Translations adds a Features component "Translations" that allows to import/export sets of translated strings.
String sets can be chosen per language and per text group.
@@ -0,0 +1,14 @@
name = Features Translations
description = Import and export string translations with Features.
core = 7.x
package = Features
dependencies[] = features
dependencies[] = locale
; Information added by Drupal.org packaging script on 2015-06-06
version = "7.x-2.0"
core = "7.x"
project = "features_translations"
datestamp = "1433614686"
@@ -0,0 +1,198 @@
<?php
/**
* Implementation of hook_features_api().
*/
function features_translations_features_api() {
$translations = array();
// Legacy option - we don't write to it anymore.
$translations['translations'] = array(
'name' => t('Translations'),
'default_hook' => 'translations_defaults',
'feature_source' => TRUE,
'default_file' => FEATURES_DEFAULTS_INCLUDED,
);
foreach (language_list() as $langcode => $language) {
$machine_langcode = strtr($langcode, array('-' => '_'));
$translations["translations_{$machine_langcode}"] = array(
'name' => t('Translations: !name', array('!name' => t($language->name))),
'default_hook' => "translations_{$machine_langcode}_defaults",
'feature_source' => TRUE,
'base' => 'translations',
'default_file' => FEATURES_DEFAULTS_INCLUDED,
'supersedes' => 'translations',
);
}
return $translations;
}
/**
* Implementation of hook_features_export_options().
*/
function translations_features_export_options($component) {
// Ignore legacy option.
if ($component == 'translations') return array();
$options = array();
$textgroups = module_invoke_all('locale', 'groups');
list(,$machine_langcode) = explode('_', $component, 2);
$langcode = strtr($machine_langcode, array('_' => '-'));
$languages = language_list();
$language = $languages[$langcode];
foreach ($textgroups as $textgroup => $label) {
if ($textgroup == 'default' && $langcode == 'en') continue;
if ($textgroup != 'default' && $langcode == translations_features_string_source_language()) continue;
$options[$machine_langcode . ':' . $textgroup] = t($language->name) . ': ' . $label;
}
return $options;
}
/**
* Helper to return site's string source language.
*/
function translations_features_string_source_language() {
if (module_exists('i18n_string')) {
return i18n_string_source_language();
}
return language_default('language');
}
/**
* Implementation of hook_features_export().
*/
function translations_features_export($data, &$export, $module_name) {
foreach ($data as $component) {
list($machine_langcode,) = explode(':', $component);
$export['features']["translations_{$machine_langcode}"][$component] = $component;
}
$export['dependencies']['features'] = 'features';
$export['dependencies']['features_translations'] = 'features_translations';
return array();
}
/**
* Implementation of hook_features_export_render().
*/
function translations_features_export_render($module_name, $data, $export = NULL) {
$languages = language_list();
$code = array(
' $translations = array();',
' $translatables = array();',
);
$machine_langcode = ''; // won't change in the loop
foreach ($data as $component) {
list($machine_langcode, $textgroup) = explode(':', $component);
$langcode = strtr($machine_langcode, array('_' => '-'));
$strings = _features_translations_locale_export_get_strings($languages[$langcode], $textgroup);
foreach ($strings as $md5 => $string) {
$code[] = " \$translations['{$machine_langcode}:{$textgroup}']['{$md5}'] = " . features_var_export($string, ' ') . ";";
// potx compatibility
$code[] = " \$translatables[] = t('" .
str_replace("'", "\'", $string->source) .
"', array(), array('context' => '" .
str_replace("'", "\'", $string->context) .
"'));";
}
}
$code[] = ' return $translations;';
$code = implode("\n", $code);
return array("translations_{$machine_langcode}_defaults" => $code);
}
/**
* Implementation of hook_features_revert().
*/
function translations_features_revert($module_name, $component) {
include_once('includes/locale.inc');
$translations = features_get_default($component, $module_name);
if (!empty($translations)) {
$report = array('updates' => 0, 'skips' => 0, 'additions' => 0, 'deletes' => 0);
$lids = array();
foreach ($translations as $key => $strings) {
list($machine_langcode, $textgroup) = explode(':', $key);
$langcode = strtr($machine_langcode, array('_' => '-'));
foreach ($strings as $md5 => $string) {
if (!empty($string['plid'])) {
if (!isset($lids[$string['plid']])) {
watchdog('features', 'Translations: importing plid %plid not found for string %source', array(
'%plid' => $string['plid'],
'%source' => $string['source'],
), WATCHDOG_WARNING);
$string['plid'] = 0;
}
else {
$string['plid'] = $lids[$string['plid']];
}
}
$lids[$md5] = _locale_import_one_string_db(
$report,
$langcode,
$string['context'],
$string['source'],
$string['translation'],
$textgroup,
$string['location'],
LOCALE_IMPORT_OVERWRITE,
$string['plid'],
$string['plural']
);
if (module_exists('l10n_update')) {
// Set the "string is customized" flag so featured translations can roundtrip.
db_update('locales_target')
->fields(array(
// Use literal here as the named constant is not available globally in some versions.
'l10n_status' => 1,
))
->condition('language', $langcode)
->condition('lid', $lids[$md5])
->execute();
}
}
}
watchdog('features', 'Translations: results for importing feature %feature: %report', array(
'%feature' => $module_name . ':' . $component,
'%report' => var_export($report, TRUE),
), WATCHDOG_INFO);
}
return TRUE;
}
/**
* Helper to return translated strings in given language and group.
*/
function _features_translations_locale_export_get_strings($language, $group) {
$query = db_select('locales_source', 's');
$query->join('locales_target', 't', 's.lid = t.lid');
$query->fields('s', array('lid', 'source', 'context', 'location'));
$query->fields('t', array('translation', 'plid', 'plural'));
$query->addExpression('MD5(CONCAT(s.source, s.context))', 'source_md5');
$query->condition('t.language', $language->language);
$query->condition('s.textgroup', $group);
//exclude unchanged lids
if (module_exists('l10n_update')) {
// Use literal here as the named constant is not available globally in some versions.
$query->condition('t.l10n_status', 0, '<>');
}
$query->orderBy('t.plural', 'ASC')->orderBy('source_md5', 'ASC');
$result = $query->execute()->fetchAll();
$strings = array();
$lids = array();
foreach ($result as $string) {
$md5 = $string->source_md5;
$lids[$string->lid] = $md5;
if (!empty($string->plid)) {
if (!isset($lids[$string->plid])) {
watchdog('features', 'Translations: exporting plid %plid not found for string %source.', array('%plid' => $string->plid, '%source' => $string->source));
$string->plid = 0;
}
else {
$string->plid = $lids[$string->plid];
}
}
unset($string->lid, $string->source_md5); // don't want those in the export
$strings[$md5] = $string;
}
return $strings;
}
@@ -1,4 +1,3 @@
/* Table cells. */
.field-permissions-cell,
.field-permissions-header {
@@ -29,20 +28,19 @@ html.js .field-permissions-tooltip {
color: #444;
background-color: #f0f0f0;
border: 1px solid #aaa;
/* CSS3 properties not supported by all browsers. */
-webkit-box-shadow: 2px 2px 2px #ccc;
-khtml-box-shadow: 2px 2px 2px #ccc;
-icab-box-shadow: 2px 2px 2px #ccc;
-moz-box-shadow: 2px 2px 2px #ccc;
-o-box-shadow: 2px 2px 2px #ccc;
box-shadow: 2px 2px 2px #ccc;
-khtml-box-shadow: 2px 2px 2px #ccc;
-icab-box-shadow: 2px 2px 2px #ccc;
-moz-box-shadow: 2px 2px 2px #ccc;
-o-box-shadow: 2px 2px 2px #ccc;
box-shadow: 2px 2px 2px #ccc;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
-icab-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
-khtml-border-radius: 5px;
-icab-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
}
.field-permissions-tooltip .item-list,
#field-permissions-tooltip .item-list {
@@ -8,13 +8,13 @@
/**
* Obtain the list of field permissions.
*
* @param $field_label
* @param string $field_label
* The human readable name of the field to use when constructing permission
* names. Usually this will be derived from one or more of the field instance
* labels.
*/
function field_permissions_list($field_label = '') {
return array(
$permissions = array(
'create' => array(
'label' => t('Create field'),
'title' => t('Create own value for field %field', array('%field' => $field_label)),
@@ -36,46 +36,47 @@ function field_permissions_list($field_label = '') {
'title' => t("View anyone's value for field %field", array('%field' => $field_label)),
),
);
drupal_alter('field_permissions_list', $permissions, $field_label);
return $permissions;
}
/**
* Returns field permissions in a format suitable for use in hook_permission().
*
* @param $field
* @param array $field
* The field to return permissions for.
* @param $label
* @param mixed $label
* (optional) The human readable name of the field to use when constructing
* permission names; for example, this might be the label of one of the
* corresponding field instances. If not provided, an appropriate label will
* be automatically derived from all the field's instances.
*
* @return
* @return array
* An array of permission information, suitable for use in hook_permission().
*/
function field_permissions_list_field_permissions($field, $label = NULL) {
$description = '';
// If there is no preferred label, construct one from all the instance
// labels.
if (!isset($label)) {
$labels = array();
foreach ($field['bundles'] as $entity_type => $bundles) {
foreach ($bundles as $bundle_name) {
$instance = field_info_instance($entity_type, $field['field_name'], $bundle_name);
$labels[] = $instance['label'];
$label = $field['field_name'];
}
$instances = array();
$description = '';
foreach ($field['bundles'] as $entity_type => $bundles) {
foreach ($bundles as $bundle_name) {
$instance = field_info_instance($entity_type, $field['field_name'], $bundle_name);
$entity = entity_get_info($entity_type);
if (!isset($entity['bundles'][$bundle_name])) {
continue;
}
$instance_desc_tokens = array(
$entity['label'],
$entity['bundles'][$bundle_name]['label'],
$instance['label'],
);
$instances[] = '"' . implode(':', $instance_desc_tokens) . '"';
}
// If all the instances have the same label, just use that. Otherwise, use
// the field name (with the full list of instance labels as the permission
// description).
$labels = array_unique($labels);
if (count($labels) == 1) {
$label = array_shift($labels);
}
else {
$label = $field['field_name'];
$description = t('This field appears as: %instances', array('%instances' => implode(', ', $labels)));
}
$description = t('This field appears as: %instances.', array('%instances' => implode(', ', $instances)));
}
$permissions = array();
@@ -91,7 +92,7 @@ function field_permissions_list_field_permissions($field, $label = NULL) {
}
/**
* Implementation of hook_permission().
* Implements hook_permission().
*/
function _field_permissions_permission() {
$perms = array(
@@ -145,9 +146,7 @@ function _field_permissions_field_settings_form_alter(&$form, $form_state, $form
'#type' => 'container',
'#states' => array(
'visible' => array(
// We must cast this to a string until http://drupal.org/node/879580 is
// fixed.
':input[name="field[field_permissions][type]"]' => array('value' => (string) FIELD_PERMISSIONS_CUSTOM),
':input[name="field[field_permissions][type]"]' => array('value' => FIELD_PERMISSIONS_CUSTOM),
),
),
// Custom styling for the permissions matrix on the field settings page.
@@ -156,6 +155,23 @@ function _field_permissions_field_settings_form_alter(&$form, $form_state, $form
),
);
$form['field']['field_permissions']['permission_warning'] = array(
'#type' => 'item',
'#markup' => '<div class="messages error"><b>'
. t('Field permissions error')
. '</b><br />'
. t('If you are seeing this message and are not seeing a table of permissions, something is wrong! See !link for more information.', array(
'!link' => l(t('the Field Permission documentation'), 'https://www.drupal.org/node/2802067#known-issues', array(
'attributes' => array('target' => '_blank'),
)),
)) . '</div>',
'#states' => array(
'visible' => array(
':input[name="field[field_permissions][type]"]' => array('value' => FIELD_PERMISSIONS_CUSTOM),
),
),
);
// Add the field permissions matrix itself. Wait until the #pre_render stage
// to move it to the above container, to avoid having the permissions data
// saved as part of the field record.
@@ -183,15 +199,15 @@ function _field_permissions_field_settings_form_alter(&$form, $form_state, $form
* to actually be saved. For an example submit handler, see
* _field_permissions_field_settings_form_submit().
*
* @param $field
* @param array $field
* The field whose permissions will be displayed in the matrix.
* @param $instance
* @param array $instance
* The field instance for which the permissions will be displayed. Although
* the permissions are per-field rather than per-instance, the instance label
* will be used to display an appropriate human-readable name for each
* permission.
*
* @return
* @return array
* A form array defining the permissions matrix.
*
* @see user_admin_permissions()
@@ -327,37 +343,52 @@ function _field_permissions_field_settings_form_submit($form, &$form_state) {
* Menu callback; Field permissions overview.
*/
function field_permissions_overview() {
drupal_add_css(drupal_get_path('module', 'field_permissions') .'/field_permissions.admin.css');
drupal_add_css(drupal_get_path('module', 'field_permissions') . '/field_permissions.admin.css');
$headers = array(t('Field name'), t('Field type'), t('Entity type'), t('Used in'));
$headers = array(
t('Field name'),
t('Field type'),
t('Entity type'),
t('Used in'),
);
foreach (field_permissions_list() as $permission_type => $permission_info) {
$headers[] = array('data' => $permission_info['label'], 'class' => 'field-permissions-header');
}
$destination = drupal_get_destination();
// Load list of field instances, types and bundles in the system.
$instances = field_info_instances();
// Load list of fields, field types and bundles in the system.
$field_types = field_info_field_types();
$bundles = field_info_bundles();
$bundles_info = field_info_bundles();
// Retrieve the permissions for each role.
$role_permissions = user_role_permissions(user_roles());
// Based on field_ui_fields_list() in field_ui.admin.inc.
$rows = array();
foreach ($instances as $obj_type => $type_bundles) {
foreach ($type_bundles as $bundle => $bundle_instances) {
foreach ($bundle_instances as $field_name => $instance) {
foreach (field_info_fields() as $field_name => $field) {
foreach ($field['bundles'] as $entity_type => $bundles) {
foreach ($bundles as $bundle) {
// Some fields might belong to bundles that are disabled (which are not
// returned by field_info_bundles()).
// @see https://www.drupal.org/node/1351506
if (!isset($bundles_info[$entity_type][$bundle])) {
continue;
}
// Each field will have a row in the table.
$field = field_info_field($field_name);
$admin_path = _field_ui_bundle_admin_path($obj_type, $bundle);
if (module_exists('field_ui')) {
$admin_path = _field_ui_bundle_admin_path($entity_type, $bundle);
$field_admin_path = l($bundles_info[$entity_type][$bundle]['label'], $admin_path . '/fields/' . $field_name, array(
'query' => $destination,
'fragment' => 'edit-field-field-permissions-type',
));
}
else {
$field_admin_path = $bundles_info[$entity_type][$bundle]['label'];
}
$rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
$rows[$field_name]['data'][1] = t($field_types[$field['type']]['label']);
$rows[$field_name]['data'][2] = $obj_type;
$rows[$field_name]['data'][3][] = l($bundles[$obj_type][$bundle]['label'], $admin_path . '/fields/'. $field_name, array(
'query' => $destination,
'fragment' => 'edit-field-field-permissions-type',
));
$rows[$field_name]['data'][1] = $field_types[$field['type']]['label'];
$rows[$field_name]['data'][2] = $entity_type;
$rows[$field_name]['data'][3][] = $field_admin_path;
$rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
// Append field permissions information to the report.
@@ -381,7 +412,7 @@ function field_permissions_overview() {
$all_users_have_access = isset($role_permissions[DRUPAL_ANONYMOUS_RID][$permission]) && isset($role_permissions[DRUPAL_AUTHENTICATED_RID][$permission]);
$status_class = $all_users_have_access ? 'field-permissions-status-on' : 'field-permissions-status-off';
$title = $all_users_have_access ? t('All users have this permission') : t('Not all users have this permission');
$data = l('', 'admin/people/permissions', array(
$data = l(NULL, 'admin/people/permissions', array(
'attributes' => array(
'class' => array('field-permissions-status', $status_class),
'title' => $title,
@@ -416,7 +447,7 @@ function field_permissions_overview() {
// Allow external modules alter the table headers and rows.
foreach (module_implements('field_permissions_overview_alter') as $module) {
$function = $module .'_field_permissions_overview_alter';
$function = $module . '_field_permissions_overview_alter';
$function($headers, $rows);
}
@@ -1,63 +1,74 @@
/**
* @file
*/
(function ($) {
Drupal.behaviors.fieldPermissionsSettings = {
attach: function (context) {
// For user fields, we want the "Create own value for field X" permission
// row to only be displayed when it's meaningful (i.e., when the "Display
// on user registration form" checkbox is checked).
var $user_register_form_checkbox, $required_field_checkbox, $create_permission_row;
$user_register_form_checkbox = $('.form-item-instance-settings-user-register-form .form-checkbox', context);
if ($user_register_form_checkbox.length) {
// The "Required field" checkbox can cause the user registration checkbox
// to change, so we need it also.
$required_field_checkbox = $('.form-item-instance-required .form-checkbox', context);
if ($required_field_checkbox.length) {
// Get the permissions table row corresponding to the "Create own value
// for field X" permission. The theme_user_admin_permissions() function
// does not give us a good way to directly detect which row contains
// the create permissions, so we have rely on the fact that it will be
// the first row.
$create_permission_row = $('table#permissions tbody tr', context).filter(':first');
new Drupal.fieldPermissions.HideCreatePermission($user_register_form_checkbox, $required_field_checkbox, $create_permission_row);
Drupal.behaviors.fieldPermissionsSettings = {
attach: function (context) {
// For user fields, we want the "Create own value for field X" permission
// row to only be displayed when it's meaningful (i.e., when the "Display
// on user registration form" checkbox is checked).
var $user_register_form_checkbox, $required_field_checkbox, $create_permission_row;
$user_register_form_checkbox = $('.form-item-instance-settings-user-register-form .form-checkbox', context);
if ($user_register_form_checkbox.length) {
// The "Required field" checkbox can cause the user registration checkbox
// to change, so we need it also.
$required_field_checkbox = $('.form-item-instance-required .form-checkbox', context);
if ($required_field_checkbox.length) {
// Get the permissions table row corresponding to the "Create own value
// for field X" permission. The theme_user_admin_permissions() function
// does not give us a good way to directly detect which row contains
// the create permissions, so we have rely on the fact that it will be
// the first row.
$create_permission_row = $('table#permissions tbody tr', context).filter(':first');
new Drupal.fieldPermissions.HideCreatePermission($user_register_form_checkbox, $required_field_checkbox, $create_permission_row);
}
}
// Show a warning if there's no available permissions matrix.
$('#edit-field-field-permissions-permission-warning').toggle(!$('#permissions').length);
$('[name="field[field_permissions][type]"]').bind('change', function(option) {
$('#edit-field-field-permissions-permission-warning').toggle(!$('#permissions').length);
});
}
}
};
};
Drupal.fieldPermissions = {};
Drupal.fieldPermissions = {};
/**
/**
* Constructor for the HideCreatePermission object.
*
* This object hides and shows the "Create own value for field X" permission
* for user fields when it is appropriate to do so, depending on the state of
* the "Display on user registration form" and "Required field" checkboxes.
*/
Drupal.fieldPermissions.HideCreatePermission = function ($user_register_form_checkbox, $required_field_checkbox, $create_permission_row) {
this.$user_register_form_checkbox = $user_register_form_checkbox;
this.$create_permission_row = $create_permission_row;
// Start off by making sure the create permission row has the correct
// visibility.
this.setCreatePermissionVisibility();
// Set the row's visibility again whenever the user registration checkbox
// changes, or when the required field checkbox (which controls it) changes.
$user_register_form_checkbox.bind('change', $.proxy(this.setCreatePermissionVisibility, this));
$required_field_checkbox.bind('change', $.proxy(this.setCreatePermissionVisibility, this));
};
Drupal.fieldPermissions.HideCreatePermission = function ($user_register_form_checkbox, $required_field_checkbox, $create_permission_row) {
this.$user_register_form_checkbox = $user_register_form_checkbox;
this.$create_permission_row = $create_permission_row;
// Start off by making sure the create permission row has the correct
// visibility.
this.setCreatePermissionVisibility();
// Set the row's visibility again whenever the user registration checkbox
// changes, or when the required field checkbox (which controls it) changes.
$user_register_form_checkbox.bind('change', $.proxy(this.setCreatePermissionVisibility, this));
$required_field_checkbox.bind('change', $.proxy(this.setCreatePermissionVisibility, this));
};
/**
* Set the correct visibility of the "Create own value for field X" permission.
*/
Drupal.fieldPermissions.HideCreatePermission.prototype.setCreatePermissionVisibility = function () {
// Granting permissions for "Create own value for field X" only makes sense
// when the field is configured to appear on the user registration form, so
// only show the row in the permissions table then.
if (this.$user_register_form_checkbox.is(':checked')) {
this.$create_permission_row.show();
}
else {
this.$create_permission_row.hide();
}
};
/**
* Set the correct visibility of the "Create own value for field X" permission.
*/
Drupal.fieldPermissions.HideCreatePermission.prototype.setCreatePermissionVisibility = function () {
// Granting permissions for "Create own value for field X" only makes sense
// when the field is configured to appear on the user registration form, so
// only show the row in the permissions table then.
if (this.$user_register_form_checkbox.is(':checked')) {
this.$create_permission_row.show();
}
else {
this.$create_permission_row.hide();
}
};
})(jQuery);
@@ -0,0 +1,85 @@
<?php
/**
* @file
* Hooks provided by the Field Permission module.
*/
/**
* Defines the owner of an entity.
*
* Because not all entities have uids, this hook allows other modules to specify
* one.
*
* @param int $uid
* The userid that will be checked against the current user's account->uid.
* @param object $entity
* The entity this field belongs to.
*/
// @codingStandardsIgnoreStart
function hook_field_permissions_userid_ENTITY_TYPE_alter(&$uid, $entity) {
// This example always assigns user 15 as the owner of an entity.
$uid = 15;
}
// @codingStandardsIgnoreEnd
/**
* Alter the permissions handled by field_permissions module.
*
* @param array $permissions
* The $permissions array created by the Field permissions module.
* @param string $field_label
* The field name.
*/
function hook_field_permissions_list_alter(&$permissions, $field_label) {
$permissions += array(
'view own node preview' => array(
'label' => t('View own field on node preview'),
'title' => t('View own value for field %field on node preview', array('%field' => $field_label)),
),
'view node preview' => array(
'label' => t('View field on node preview'),
'title' => t("View anyone's value for field %field on node preview", array('%field' => $field_label)),
),
);
}
/**
* Hook invoked with custom field permissions.
*
* This hook can be used to revoke access to the field. If access is not
* revoked, default access of the Field permissions module will apply.
*
* @param string $op
* The operation to be performed. Possible values: 'edit', 'view'.
* @param array $field
* The field on which the operation is to be performed.
* @param string $entity_type
* The type of $entity; for example, 'node' or 'user'.
* @param object $entity
* (optional) The entity for the operation.
* @param object $account
* (optional) The account to check; if not given use currently logged in user.
*
* @return bool
* FALSE if the operation is not allowed.
*
* @see field_permissions_field_access()
* @see field_access()
*/
function hook_field_permissions_custom_field_access($op, $field, $entity_type, $entity, $account) {
if ($op == 'view' && $entity_type == 'node' && !empty($entity)) {
// Check if user has access to view this field in any entity.
if (!user_access('view node preview ' . $field['field_name'], $account)) {
return FALSE;
}
// If the user has permission to view entities that they own, return TRUE if
// they own this entity or FALSE if they don't.
if (user_access('view own node preview ' . $field['field_name'], $account)) {
return _field_permissions_entity_is_owned_by_account($entity, $account);
}
}
return TRUE;
}
@@ -2,14 +2,12 @@ name = Field Permissions
description = Set field-level permissions to create, update or view fields.
package = Fields
core = 7.x
files[] = field_permissions.module
files[] = field_permissions.admin.inc
files[] = field_permissions.test
configure = admin/reports/fields/permissions
; Information added by drupal.org packaging script on 2012-01-25
version = "7.x-1.0-beta2"
; Information added by Drupal.org packaging script on 2016-10-15
version = "7.x-1.0-beta2+21-dev"
core = "7.x"
project = "field_permissions"
datestamp = "1327510549"
datestamp = "1476570240"
@@ -16,6 +16,28 @@ function field_permissions_install() {
->execute();
}
/**
* Implements hook_uninstall().
*/
function field_permissions_uninstall() {
// Collect all the field data that reference "field_permissions", within
// the field_config table.
//
$records = db_query("SELECT * FROM field_config WHERE data LIKE '%field_permissions%'");
foreach ($records as $record) {
$data = $record->data;
$data = unserialize($data);
unset($data['field_permissions']);
$data = serialize($data);
// Update the record.
db_query("UPDATE field_config SET data = :data WHERE id = :id",
array(':data' => $data, ':id' => $record->id));
}
}
/**
* Sets a larger weight for the module so that the Field Permissions become available.
*/
@@ -79,6 +79,13 @@ function field_permissions_form_field_ui_field_edit_form_alter(&$form, &$form_st
return _field_permissions_field_settings_form_alter($form, $form_state, $form_id);
}
/**
* Implements hook_field_permissions_userid_ENTITY_TYPE_alter().
*/
function field_permissions_field_permissions_userid_field_collection_item_alter(&$uid, $entity) {
$uid = isset($entity->hostEntity()->uid) ? $entity->hostEntity()->uid : $uid;
}
/**
* Implementation of hook_field_access().
*
@@ -124,6 +131,12 @@ function field_permissions_field_access($op, $field, $entity_type, $entity, $acc
}
// Otherwise, check access by permission.
elseif ($field['field_permissions']['type'] == FIELD_PERMISSIONS_CUSTOM) {
// Allow other modules to deny access first.
$result = module_invoke_all('field_permissions_custom_field_access', $op, $field, $entity_type, $entity, $account);
if (in_array(FALSE, $result)) {
return FALSE;
}
if (!isset($entity)) {
return field_permissions_empty_entity_access($op, $field['field_name'], $account);
}
@@ -258,5 +271,76 @@ function _field_permissions_entity_is_owned_by_account($entity, $account) {
// set (for example, if the entity type does not store a uid or does not have
// a concept of "ownership"), we need to assume that the provided user
// account does not own it.
return isset($entity->uid) && $entity->uid == $account->uid;
$uid = isset($entity->uid) ? $entity->uid : FALSE;
if (method_exists($entity, 'entityType')) {
drupal_alter('field_permissions_userid_' . $entity->entityType(), $uid, $entity);
}
return $uid === $account->uid;
}
/**
* Implements hook_features_pipe_COMPONENT_alter().
*
* Add field permissions to features when exporting a field_base.
*/
function field_permissions_features_pipe_field_base_alter(&$pipe, $data, $export) {
// Validate if there are field_base components that will be exported for this
// feature.
if (isset($export['features']['field_base'])) {
module_load_include('inc', 'field_permissions', 'field_permissions.admin');
// Iterate through the exported field_base components for this feature and
// add the defined field permissions.
foreach ($export['features']['field_base'] as $field_name) {
$field = field_info_field($field_name);
if (isset($field['field_permissions']['type']) && $field['field_permissions']['type'] == FIELD_PERMISSIONS_CUSTOM) {
$perms = field_permissions_list_field_permissions($field, '');
foreach ($perms as $perm => $info) {
$pipe['user_permission'][] = $perm;
}
}
}
}
}
/**
* Implements hook_field_attach_form().
*/
function field_permissions_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
// Some fields are validated if they are #required even if field's #access
// property is set to false. For example: file/image fields, options fields.
foreach (element_children($form) as $key) {
if (isset($form[$key]['#access']) && !$form[$key]['#access']) {
_field_permissions_make_elements_non_required($form[$key]);
}
}
}
/**
* Sets the #required property to FALSE recursively on form elements.
*/
function _field_permissions_make_elements_non_required(&$elements) {
if (!is_array($elements)) {
return;
}
if (!empty($elements['#required'])) {
$elements['#required'] = FALSE;
}
foreach (element_children($elements) as $key) {
_field_permissions_make_elements_non_required($elements[$key]);
}
}
/**
* Implements hook_field_delete_field().
*/
function field_permissions_field_delete_field($field) {
// Delete any permissions related to the deleted field.
$all_permissions = array_keys(field_permissions_permission());
if (!empty($all_permissions)) {
db_delete('role_permission')
->condition('module', 'field_permissions')
->condition('permission', $all_permissions, 'NOT IN')
->execute();
}
}
@@ -26,7 +26,7 @@ class FieldPermissionsTestCase extends DrupalWebTestCase {
parent::setUp('field_ui', 'field_permissions');
// Create test user.
$admin_permissions = array('access content', 'administer nodes', 'bypass node access', 'administer content types', 'administer taxonomy', 'administer permissions', 'create page content');
$admin_permissions = array('access content', 'administer nodes', 'bypass node access', 'administer content types', 'administer taxonomy', 'administer permissions', 'create page content', 'administer fields');
$this->limited_user = $this->drupalCreateUser($admin_permissions);
$all_rids = array_keys($this->limited_user->roles);
sort($all_rids);
@@ -162,11 +162,11 @@ class FieldPermissionsTestCase extends DrupalWebTestCase {
// See if we have that exposed on the permissions UI as well now.
$this->drupalGet('admin/people/permissions');
$this->assertText(t('Field Permissions'));
$this->assertRaw(t('Create own value for field %field', array('%field' => $field_info['name'])));
$this->assertRaw(t('Edit own value for field %field', array('%field' => $field_info['name'])));
$this->assertRaw(t("Edit anyone's value for field %field", array('%field' => $field_info['name'])));
$this->assertRaw(t('View own value for field %field', array('%field' => $field_info['name'])));
$this->assertRaw(t("View anyone's value for field %field", array('%field' => $field_info['name'])));
$this->assertRaw(t('Create own value for field %field', array('%field' => $field_info['machine_name'])));
$this->assertRaw(t('Edit own value for field %field', array('%field' => $field_info['machine_name'])));
$this->assertRaw(t("Edit anyone's value for field %field", array('%field' => $field_info['machine_name'])));
$this->assertRaw(t('View own value for field %field', array('%field' => $field_info['machine_name'])));
$this->assertRaw(t("View anyone's value for field %field", array('%field' => $field_info['machine_name'])));
// == CREATE ===============================================================
@@ -0,0 +1,3 @@
.project
.settings
/.idea
File diff suppressed because one or more lines are too long
@@ -0,0 +1,389 @@
/**
* Prevent page width change when scroll is required.
* Helps reduce screen redraws.
*/
body.page-admin-people-permissions {
overflow-y: scroll;
}
#user-admin-permissions.ctools-use-modal-processed .compact-link {
display:none;
}
/* Disable the hand tool styling that admin_menu adds for module rows. */
.fpa-container tr.admin-menu-tweak-permissions-processed {
cursor: default;
}
.fpa-container .form-submit {
margin: 1em;
}
/**
* Prevent vertical jitter of dummy checkboxes.
*/
.fpa-container .dummy-checkbox {
vertical-align: middle;
}
.fpa-container {
width: 100%;
}
/**
* Override admin_menu's "Collapse module groups on the Permissions page" functionality.
*/
.fpa-container tr.element-hidden {
display: table-row;
}
.fpa-left-section,
.fpa-right-section {
display: table-cell;
border: 1px solid #D6DBDE;
vertical-align: top;
}
.fpa-left-section {
background-color: #F6F6F6;
width: 1px; /* Keep column as small as possible. Table cells automatically push wider. */
}
.fpa-left-section .item-list ul {
background-color: #EFEFEF;
list-style: none;
margin:0;
padding: 0;
text-align: left;
}
.fpa-left-section .item-list li {
background-color: inherit;
border-bottom: 1px solid #D6DBDE;
cursor: pointer;
font-size: 90%;
line-height: 100%;
margin: 0;
padding: 0;
list-style: none;
white-space: nowrap;
position: relative; /* Fix for IE disappearing bg with negative margin */
}
.fpa-left-section .item-list li > div {
display: table;
width: 100%;
}
.fpa-left-section .item-list li a,
.fpa-left-section .item-list li .fpa-perm-total {
display: table-cell;
padding: 0.5em;
}
.fpa-left-section .item-list li .fpa-perm-total {
min-width: 6em;
}
.fpa-left-section .item-list li a {
text-decoration: none;
color: inherit;
}
.fpa-left-section .item-list li .fpa-perm-total {
text-align: right;
}
.fpa-right-section {
width: 100%;
background-color: white;
border-left-width: 0;
}
.fpa-filter-form {
.form-item {
display: inline-block;
padding: 3px 10px;
vertical-align: top;
float: none;
}
.form-checkboxes .form-type-checkbox,
.form-radios .form-type-radio {
display: block;
}
}
.fpa-filter-form .clear-search {
cursor: pointer;
display: inline-block;
}
.fpa-right-section .fpa-table-wrapper {
padding: 10px;
}
/**
* Module filter 2.x has a simple permissions filter. Hide this if FPA is enabled.
*/
.fpa-table-wrapper .module-filter-inputs-wrapper .form-item-module-filter-name {
display: none;
}
/**
* CTools attempts some styling to compact forms, looks bad with FPA.
*/
div.ctools-modal-content .fpa-container .form-item label {
float: none;
width: auto;
}
/*
* Rubik has some aggressive styling which makes FPA look poor, reset it here.
*/
.fpa-container .block,
.fpa-container .item-list,
.fpa-container .help-items ul,
.fpa-container .form-item,
.fpa-container .confirmation ul,
.fpa-container .admin-list,
.fpa-container .node-type-list,
.fpa-container .admin-panel {
border-width: 0;
}
/**
* Styling for matching permissions counter.
*/
.fpa-left-section li[fpa-module] {
counter-reset: fpa-module-permissions;
}
.fpa-perm-counter {
display: inline;
counter-increment: fpa-module-permissions;
}
.fpa-perm-total:before {
content: counter(fpa-module-permissions);
}
.fpa-perm-total:after {
content: " of " attr(fpa-total);
}
.fpa-toggle-container {
padding: 0.5em;
}
.fpa-toggle-container a {
margin: 0.5em;
}
.fpa-hide-descriptions table#permissions .description {
display: none;
}
.fpa-table-wrapper tr:before {
white-space: nowrap;
.fpa-hide-system-names & {
display: none;
}
}
// Need to have this to now interfere with admin_menu.
.fpa-table-wrapper thead tr:before {
content: "System Name";
display: table-cell;
border-bottom: 3px solid #ccc;
padding-right: 1em;
text-align: left;
vertical-align: middle;
padding: 8px 10px;
border: 0;
color: #000;
text-transform: uppercase;
background: #e1e2dc;
font-weight: normal;
border-width: 1px;
border-style: solid;
border-color: #bebfb9;
}
.fpa-table-wrapper tbody tr {
&:before {
content: attr(fpa-system-name);
display: table-cell;
vertical-align: middle;
padding: 8px 10px;
border: 0;
color: #000;
text-align: left;
}
&.fpa-module-row:before {
font-weight: bold;
}
&.fpa-permission-row:before {
padding-left: 1.5em;
}
}
/**
* Styling for injected checkboxes.
*/
.fpa-table-wrapper th.checkbox {
vertical-align: bottom;
}
.fpa-table-wrapper th input[type="checkbox"] {
display: block;
margin: 0.5em auto;
}
.fpa-hide-descriptions a[fpa-toggle-class="fpa-hide-descriptions"]:before {
content: attr(show);
}
a[fpa-toggle-class="fpa-hide-descriptions"]:before {
content: attr(hide);
}
.fpa-hide-system-names a[fpa-toggle-class="fpa-hide-system-names"]:before {
content: attr(show);
}
a[fpa-toggle-class="fpa-hide-system-names"]:before {
content: attr(hide);
}
#user-admin-permissions .form-submit.fpa-clear-search {
margin: 0;
}
.fpa-mobile input[type="checkbox"] {
width: 4em;
height: 4em;
}
.fpa-permission-container {
display: table;
width: 100%;
}
.fpa-row-toggle-container {
display: table-cell;
vertical-align: middle;
width: 2em;
text-align: center;
}
td.checkbox,
.fpa-row-toggle-container {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#permissions td {
text-align: center;
}
#permissions td.permission,
#permissions td.module {
text-align: left;
}
/**
* [checked] is HTML attribute. ':checked' selector is based on DOM property.
*
* IE: Both :checked and box-shadow are only supported on IE9+, so <=IE8 will not see this feature at all.
*/
.fpa-table-wrapper td.checkbox input[type="checkbox"] {
border-collapse: separate;
// [checked] = state of page load.
// :checked = current state.
&:not([checked]):checked {
box-shadow: 0px 0px 10px 6px rgba(0, 255, 0, 0.5);
}
&[checked]:not(:checked) {
box-shadow: 0px 0px 10px 6px rgba(255, 0, 0, 0.5);
}
}
/**
* Hide aspects of FPA that depend on JS.
*/
.fpa-checkboxes-toggle {
visibility: hidden;
}
html.js .fpa-checkboxes-toggle {
visibility: inherit;
}
.fpa-filter-form {
display: none;
}
html.js .fpa-filter-form {
display: block;
}
/**
* Tweak how the table is initially displayed to prevent premature reflow.
*
* The table is displayed with a <style /> tag immediately after in the HTML.
*/
#permissions {
display: none;
}
.fpa-table-wrapper {
background-repeat: no-repeat;
background-position: center -18px;
background-image: url('data:image/gif;base64,R0lGODlhDwAoAMQAAAAAAAhzvQx7vRh7xhyExjWQykaczlqi02uv2Iu/4bW1taDO57XW7729vb3e78bGxs7OztbW1t7e3sri89bn997v9+fn5+fv9+f3/+/v7+/3//f39/f3//f//////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBgAAACwAAAAADwAoAAAFxiAgApkUWduoAhukvC+UqlujNFD0vI2nuo8ZyRYZZW5C0VExkyiKK8DOIoooJFGAFQtwQldTJXK1FAKFGSLNpsjtbj6aC/ZMqkone3bP7/v/gIGCfhQJCAsVexUGAY2NBxorFQIBAgQBl5gcKowFFQkBCROXCCMUlRceoAkeE42RAAsBCB6qobWMDCIIt7asHrwJIqC0HgwHDLgBugCnAqm1ta4BsACdFdETA7Mqk40GCIyaKxfijgjVKxQLh4mD7/Dx8vIhAAAh+QQFBgAAACwAABQADQANAAAFRyAgAtOSANqoriI3XgQQFEchFunqcUQwvCpPImBwiC6rikxpc5wQooNKulgApIALwjVyTGQskcAzinVZ5qsNsA5HkSvkaRUCACH5BAUGAAAALAAAFAANAA0AAAU/ICAC11iNY4mKKnCKxsqtoudNwjgBweg5hZ7AIzqwjAECDSVI0BAoVYEFyK0cvFZhJ+KmRtOYSGNazlZe8igEACH5BAUGAAAALAAAFAANAA0AAAVIICACVIKMKFClooYKAIwYIsGmtkjFqOdNgIALcAI4EsiEjXFKiJyBaACARDEO2MNydwMChqLVTQUDGIoAAmd0YSHAo91JLAoBACH5BAUGAAAALAAAFAANAA0AAAVJICAC05IA2qiuIjdeBBAUx1ikbH7lgCPuqgvi4vEUeieEqCZIeGqLBaAG2AUChKNjIlM5CgGAwDOKjRyClXl6BLR5U2AQcFqFAAAh+QQFBgAAACwAABQADQANAAAFQCAgAtdYjWOJiipwigZQjNy6DuMEBLYueKIDqgaI2UQJ4AohqvAqShJAMEoEDI5dq6DjEHio7UpjOhJROhF5FAIAIfkEBQYAAAAsAAAUAA0ADQAABUUgIAIUgIwoUKWihgoAjBgiwaa2WMJ34JoiR8KBYpwSIuToqEwCEh4AjVEaJQLQSQtVuSYmAy6PEMgROKMLC/FDlU6rUQgAIfkEBQYAAAAsAAAUAA0ADQAABUYgIAITkADaqK4iN14EEBTHWKRsfuWAI+6qCwJX6J0QohoSUFssmL2AACdylAKAQmDhGQm6osHM4/GtYtlDMcsbHYBBEysEACH5BAUGAAAALAAAFAANAA0AAAVBICAC11iNY4mKKnCKBlCM3LoO4wQEti54ooPoVAPEUJwEzwYj8BCjGUkUMFCAAMeuRZhgdagWbKQxMYsoMKA8CgEAIfkEBQYAAAAsAAAUAA0ADQAABUkgIAJUgowoUKWihgoAjBgiwaa2SMU3EGgJAOFAPDBQjFNgKQoCTs5CYppwiGiMneDi8YwmrVFh1avAAIZTjTO6sBCu1O5EFoUAACH5BAUGAAAALAAAFAANAA0AAAVIICAC05IA2qiuIjdeBBAUx1ikY8yKlxwYlJGDtwAYCIEAAlcAOE4IzgmAENWKgIPHU4mqHBPZDiDw5L4sXbYJYI+zvVVvqgoBACH5BAUGAAAALAAAFAANAA0AAAVBICAC11iNY4mKKnCixcitQSwO48QWwSLqAo/o4HEABCPDyuM5rFAIFkAjspWQK2OgVdD9VlyAUkQVvVazlXeKCgEAOw==');
min-height: 18px;
}
.fpa-role-styles,
.fpa-perm-styles {
display: none;
}
.fpa-wrapper {
display: table;// Need this to go full width.
}
.dummy-checkbox {
display: none;
}
.fpa-authenticated-role-behavior {
input[type="checkbox"] {
display: none;
&.rid-1, &.rid-2, &.dummy-checkbox {
display: inline-block;
}
}
}
@@ -0,0 +1,66 @@
<?php
/**
* @file
* Contains form alter hooks to inject FPA functionality.
*/
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_node_type_form_alter(&$form, &$form_state) {
if (!empty($form['type']['#default_value']) && user_access('administer permissions')) {
fpa_fieldset($form['#node_type']->type . ' content', $form, array('#group' => 'additional_settings'));
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_user_admin_permissions_alter(&$form, &$form_state) {
// Prevent duplication of memory limit warning.
if (module_exists('filter_perms') && empty($form_state['input'])) {
$memory_limit = ini_get('memory_limit');
if (!drupal_check_memory_limit(_fpa_memory_required() . 'b', $memory_limit)) {
drupal_set_message(t('If you attempt to display all roles and permissions on this page at the same time, you will most likely exceed your PHP memory limit of %memory_limit.', array('%memory_limit' => $memory_limit)), 'warning');
}
}
$form['#theme'] = array('fpa_user_admin_permissions');
$fpa_module_path = drupal_get_path('module', 'fpa');
$form['#attached']['library'][] = array('system', 'jquery.cookie');
$form['#attached']['css'][] = $fpa_module_path . '/css/fpa.css';
$form['#attached']['js'][] = $fpa_module_path . '/js/fpa.min.js';
$form['#attached']['js'][] = array(
'type' => 'setting',
'data' => array(
'fpa' => array(
'attr' => array(
'permission' => FPA_ATTR_PERMISSION,
'module' => FPA_ATTR_MODULE,
'role' => FPA_ATTR_ROLE,
'checked' => FPA_ATTR_CHECKED,
'not_checked' => FPA_ATTR_NOT_CHECKED,
'system_name' => FPA_ATTR_SYSTEM_NAME,
),
),
),
);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function fpa_form_filter_perms_admin_perm_filter_alter(&$form, &$form_state) {
$form['#submit'][] = '_fpa_reset_filter_defaults';
}
+4 -4
View File
@@ -1,10 +1,10 @@
name = "Fast Permissions Administration"
description = "Provides quick access to a content type's or field's permissions."
description = "Fast filtering on permissions administration form."
core = 7.x
package = Administration
; Information added by drupal.org packaging script on 2012-04-22
version = "7.x-2.2"
; Information added by Drupal.org packaging script on 2015-05-21
version = "7.x-2.6+2-dev"
core = "7.x"
project = "fpa"
datestamp = "1335136578"
datestamp = "1432171983"
@@ -0,0 +1,46 @@
<?php
/**
* @file
* Install, update, and uninstall functions for the Fast Permissions Administration module.
*/
/**
* Implements hook_requirements().
*/
function fpa_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$permissions_memory_required = _fpa_memory_required();
if (!drupal_check_memory_limit($permissions_memory_required . 'b')) {
$requirements['fpa_memory'] = array(
'severity' => REQUIREMENT_WARNING,
'title' => t('Insufficient memory for permissions page'),
'value' => t('~@permissions_memory_requiredM of memory required', array('@permissions_memory_required' => (int) ($permissions_memory_required / 1024 / 1024))),
'description' => t('It is likely that you will exceed your memory limit when viewing the permissions page for all roles and permissions. If you are unable to load the permissions page, this is most likely the cause.') . '<br />',
);
$filter_perms_link = l('Filter Permissions', 'https://drupal.org/project/filter_perms');
if (!module_exists('filter_perms')) {
$requirements['fpa_memory']['description'] .= t('The !filter_perms_link module can work with Fast Permissions Administration by reducing the amount of the permissions form that is rendered and thereby reducing the memory required on the permissions page.', array('!filter_perms_link' => $filter_perms_link)) . '<br />';
if ($php_ini_path = get_cfg_var('cfg_file_path')) {
$requirements['fpa_memory']['description'] .= t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path)) . '<br />';
}
}
else {
$requirements['fpa_memory']['severity'] = REQUIREMENT_OK;
$requirements['fpa_memory']['description'] = t('The !filter_perms_link module installed should prevent a memory issue as long as viewed permissions and roles are limited.', array('!filter_perms_link' => $filter_perms_link));
}
}
}
return $requirements;
}
+103 -48
View File
@@ -1,5 +1,26 @@
<?php
/**
* @file
* Main module file for FPA.
*/
define('FPA_ATTR_PERMISSION', 'fpa-permission');
define('FPA_ATTR_MODULE', 'fpa-module');
define('FPA_ATTR_ROLE', 'fpa-role');
define('FPA_ATTR_CHECKED', 'fpa-checked');
define('FPA_ATTR_NOT_CHECKED', 'fpa-not-checked');
define('FPA_ATTR_SYSTEM_NAME', 'fpa-system-name');
// Replacement for improper use of hook_hook_info().
require_once dirname(__FILE__) . '/fpa.theme.inc';
require_once dirname(__FILE__) . '/fpa.form_alter.inc';
/**
* Implements hook_menu().
*/
function fpa_menu() {
$items = array();
@@ -7,63 +28,82 @@ function fpa_menu() {
'title' => 'Permissions',
'page callback' => '_fpa_ctools',
'page arguments' => array(1),
'access callback' => TRUE,
'access arguments' => array('administer permissions'),
'type' => MENU_CALLBACK,
);
return $items;
}
/**
* Implements hook_admin_paths().
*/
function fpa_admin_paths() {
return array(
'fpa_modal/*/permissions' => FALSE,
'fpa_modal/*/permissions' => TRUE,
);
}
function fpa_js_load($arg) {
if (module_exists('ctools')) {
return ctools_js_load($arg);
/**
* Implements hook_help().
*/
function fpa_help($path, $arg) {
if ($path == 'admin/people/permissions') {
$output = '';
$output .= '<p>' . t('Permissions and Module names will match on the readable or system name. The system name is provided as a togglable column.') . '</p>';
$output .= '<p>' . t('Enter in the format of "permission@module", e.g. "admin@system" will show only permissions with the text "admin" in modules with the text "system".') . '</p>';
return $output;
}
return 0;
}
/**
* Loader function to wrap ctools loader function.
*/
function fpa_js_load($arg) {
$return_code = 0;
if (module_exists('ctools')) {
$return_code = ctools_js_load($arg);
}
return $return_code;
}
function fpa_l($permission = '', $text = NULL, $options = array()) {
// available modal modules in order of priority
// Available modal module system names in order of priority.
$supported_modules = array(
//'dialog', // dialog api is buggy
'ctools',
'modalframe',
);
if (is_null($text)) {
$text = t('Manage Permissions');
}
// gets the most prefered modal method from the available methods
// Find the most preferred modal method from the available methods.
$modules = array_intersect($supported_modules, array_keys(module_list()));
$method = array_shift($modules);
$path = 'fpa_modal/nojs/permissions';
$query = array(
'fpa_perm' => $permission,
'fpa_method' => $method,
);
$attributes = array();
$query = array('fpa_perm' => $permission, 'fpa_method' => $method);
switch ($method) {
case 'dialog':
dialog_add_js();
$attributes['class'] = 'ctools-use-dialog';
break;
case 'ctools':
ctools_include('ajax');
ctools_include('modal');
ctools_modal_add_js();
$attributes['class'] = 'ctools-use-modal';
break;
case 'modalframe':
modalframe_parent_js();
drupal_add_js(drupal_get_path('module', 'fpa') . '/js/fpa.js');
$attributes['class'] = 'fpa_modalframe';
break;
default:
$path = 'admin/people/permissions';
$attributes['target'] = '_blank';
@@ -76,7 +116,7 @@ function fpa_l($permission = '', $text = NULL, $options = array()) {
return l($text, $path, $options);
}
function fpa_fieldset($permission, &$parent_item, $group = array()) {
function fpa_fieldset($filter_string, &$parent_item, $group = array()) {
$parent_item['fpa_fieldset'] = array(
'#type' => 'fieldset',
@@ -90,39 +130,23 @@ function fpa_fieldset($permission, &$parent_item, $group = array()) {
$parent_item['fpa_fieldset']['fpa'] = array(
'#type' => 'markup',
'#markup' => fpa_l($permission),
'#markup' => fpa_l($filter_string),
);
}
function fpa_form_node_type_form_alter(&$form, &$form_state) {
if (!empty($form['type']['#default_value']) && user_access('administer permissions')) {
fpa_fieldset($form['#node_type']->type . ':', $form, array('#group' => 'additional_settings'));
}
}
function fpa_form_user_admin_permissions_alter(&$form, &$form_state) {
if (isset($_GET['fpa_method']) && $_GET['fpa_method'] == 'modalframe') {
modalframe_child_js();
$form['#submit'][] = '_fpa_modalframe_submit';
}
$fpa_module_path = drupal_get_path('module', 'fpa');
drupal_add_css($fpa_module_path .'/css/fpa.css');
drupal_add_js($fpa_module_path .'/js/fpa.js');
drupal_add_js(array('fpa' => array('perm' => isset($_GET['fpa_perm']) && $_GET['fpa_perm'] ? check_plain($_GET['fpa_perm']) : '')), array('type' => 'setting'));
}
function _fpa_modalframe_submit() {
modalframe_close_dialog();
}
/**
* Page callback for CTools modal path.
*/
function _fpa_ctools($js = NULL) {
// Need to include the file that contains the permissions form.
module_load_include('inc', 'user', 'user.admin');
$form_id = 'user_admin_permissions';
// Fall back if $js is not set.
if (!$js) {
return drupal_get_form('user_admin_permissions');
return drupal_get_form($form_id);
}
ctools_include('modal');
@@ -133,11 +157,8 @@ function _fpa_ctools($js = NULL) {
);
switch ($_GET['fpa_method']) {
case 'dialog':
$output = dialog_get_form('user_admin_permissions', $form_state);
break;
case 'ctools':
$output = ctools_modal_form_wrapper('user_admin_permissions', $form_state);
$output = ctools_modal_form_wrapper($form_id, $form_state);
break;
}
@@ -149,3 +170,37 @@ function _fpa_ctools($js = NULL) {
echo ajax_render($output);
exit;
}
/**
* @return int Approximate number of bytes of ram required to render the permissions form.
*/
function _fpa_memory_required() {
$permissions_count = count(module_invoke_all('permission'));
$user_roles_count = count(user_roles());
$page_ram_required = (9 * 1024 * 1024);
// Takes ~26kb per row without any checkboxes.
$permission_row_overhead = 27261.028783658;
$permissions_ram_required = $permissions_count * $permission_row_overhead;
// Determined by checking peak ram on permissions page, over several different number of visible roles.
$bytes_per_checkbox = 18924.508820799;
$checkboxes_ram_required = $permissions_count * $user_roles_count * $bytes_per_checkbox;
return (int) ($page_ram_required + $permissions_ram_required + $checkboxes_ram_required);
}
function _fpa_reset_filter_defaults() {
setcookie("fpa_module_match", "", time() - 3600, '/');
setcookie("fpa_filter", "", time() - 3600, '/');
setcookie("fpa_roles", "", time() - 3600, '/');
}
@@ -0,0 +1,769 @@
<?php
/**
* @file
* Theme callbacks to pre-tag rows for FPA functionality.
*/
/**
* Implements hook_theme().
*/
function fpa_theme($existing, $type, $theme, $path) {
return array(
'fpa_user_admin_permissions' => array(
'render element' => 'form',
'file' => 'fpa.theme.inc',
),
);
}
/**
* Theme function to pre-mark rows with FPA attributes.
*
* Based on Drupal Core's permissions form theme function.
*
* @see theme_user_admin_permissions().
*/
function theme_fpa_user_admin_permissions($variables) {
$form = $variables['form'];
$nameless_checkbox = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'checkbox',
'class' => array(
'rid-1', // Prevents Drupal core Drupal.behaviors.permissions.toggle from applying.
'form-checkbox',
'fpa-checkboxes-toggle',
),
),
);
$nameless_checkbox_output = drupal_render($nameless_checkbox);
$dummy_checkbox = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'checkbox',
'disabled' => 'disabled',
'checked' => 'checked',
'title' => t('This permission is inherited from the authenticated user role.'),
'class' => array(
'dummy-checkbox',
),
),
);
$dummy_checkbox_output = drupal_render($dummy_checkbox);
$permission_col_template = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-permission-container',
),
),
'description' => array(
'#markup' => '',
),
'checkbox_cell' => array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-row-toggle-container',
),
),
'checkbox_form_item' => array(
'#type' => 'container',
'#attributes' => array(
'title' => t('Toggle visible checkboxes in this row.'),
'class' => array(
'form-item',
'form-type-checkbox',
),
),
'label' => array(
'#type' => 'html_tag',
'#tag' => 'label',
'#attributes' => array(
'class' => array(
'element-invisible',
),
),
'#value' => 'test',
),
'checkbox' => array(
'#markup' => $nameless_checkbox_output,
),
),
),
);
$checkboxes_children = element_children($form['checkboxes']);
// Prepare role names processed by drupal_html_class() ahead of time.
$roles_attr_values = array();
foreach ($checkboxes_children as $rid) {
$roles_attr_values[$rid] = drupal_html_class($form['role_names'][$rid]['#markup']);
}
$first_role_index = array_shift($checkboxes_children);
// Lists for wrapper.
$modules = array();
$user_roles = array();
// Index of current module row.
$module = NULL;
// Row counter.
$i = 0;
$rows = array();
// Iterate over rows in form table.
foreach (element_children($form['permission']) as $key) {
// Row template.
$row = array(
'data' => array(), // Array of table cells.
'title' => array(), // HTML attribute on table row tag.
FPA_ATTR_MODULE => array(), // HTML attribute on table row tag.
FPA_ATTR_PERMISSION => array(), // HTML attribute on table row tag.
FPA_ATTR_CHECKED => array(),
FPA_ATTR_NOT_CHECKED => array(),
);
// Determine if row is module or permission.
if (is_numeric($key)) {
// Module row.
$row['class'][] = 'fpa-module-row';
// Mark current row with escaped module name.
$row[FPA_ATTR_MODULE] = array(
// System name
0 => $form['permission'][$key]['#id'],
// Readable name
1 => strip_tags($form['permission'][$key]['#markup']),
);
// Readable
$row['data'][] = array(
'data' => drupal_render($form['permission'][$key]),
'class' => array('module'),
'id' => 'module-' . $form['permission'][$key]['#id'],
'colspan' => count($form['role_names']['#value']) + 1,
);
$row['title'] = array($form['permission'][$key]['#id']);
$row[FPA_ATTR_SYSTEM_NAME] = $row[FPA_ATTR_MODULE][0];
$row[FPA_ATTR_MODULE] = array_unique(array_map('drupal_html_class', $row[FPA_ATTR_MODULE]));
// Add modules to left-side modules list.
$modules[$row[FPA_ATTR_MODULE][0]] = array(
'text' => strip_tags($form['permission'][$key]['#markup']),
'title' => array($form['permission'][$key]['#id']),
FPA_ATTR_MODULE => $row[FPA_ATTR_MODULE],
FPA_ATTR_PERMISSION => array(),
);
// Save row number for current module.
$module = $i;
}
else {
// Permission row.
$row['class'][] = 'fpa-permission-row';
$permission_system_name = '';
// Might be empty if no modules are displayed in Permissions Filter module.
if (!empty($form['checkboxes'][$first_role_index])) {
$permission_system_name = $form['checkboxes'][$first_role_index][$key]['#return_value'];
}
$label = $permission_col_template;
$label['description']['#markup'] = drupal_render($form['permission'][$key]);
// Permissions filter might cause no Roles to display.
if (count(element_children($form['checkboxes'])) == 0) {
unset($label['checkbox_cell']);
}
// Readable
$row['data'][] = array(
'data' => drupal_render($label),
'class' => array('permission'),
);
foreach (element_children($form['checkboxes']) as $rid) {
$form['checkboxes'][$rid][$key]['#title'] = $form['role_names'][$rid]['#markup'] . ': ' . $form['permission'][$key]['#markup'];
$form['checkboxes'][$rid][$key]['#title_display'] = 'invisible';
// Filter permissions strips role id class from checkbox. Used by Drupal core functionality.
$form['checkboxes'][$rid][$key]['#attributes']['class'][] = 'rid-' . $rid;
// Set authenticated role behavior class on page load.
if ($rid == 2 && $form['checkboxes'][$rid][$key]['#checked'] === TRUE) {
$row['class'][] = 'fpa-authenticated-role-behavior';
}
// For all roles that inherit permissions from 'authenticated user' role, add in dummy checkbox for authenticated role behavior.
if ($rid > 2) {
$form['checkboxes'][$rid][$key]['#suffix'] = $dummy_checkbox_output; // '#suffix' doesn't have wrapping HTML like '#field_suffix'.
}
// Add rid's to row attribute for checked status filter.
if ($form['checkboxes'][$rid][$key]['#checked'] === TRUE) {
$row[FPA_ATTR_CHECKED][] = $rid;
}
else {
$row[FPA_ATTR_NOT_CHECKED][] = $rid;
}
$row['data'][] = array(
'data' => drupal_render($form['checkboxes'][$rid][$key]),
'class' => array(
'checkbox',
),
'title' => array(
$form['role_names'][$rid]['#markup'],
),
// For role filter
FPA_ATTR_ROLE => array(
$rid,
),
);
}
if (!empty($rid)) {
$row['title'] = array(
$form['checkboxes'][$rid][$key]['#return_value'],
);
$row[FPA_ATTR_SYSTEM_NAME] = array(
$form['checkboxes'][$rid][$key]['#return_value'],
);
}
// Mark current row with escaped permission name.
$row[FPA_ATTR_PERMISSION] = array(
// Permission system name.
0 => $permission_system_name,
// Readable description.
1 => strip_tags($form['permission'][$key]['#markup']),
);
// Mark current row with current module.
$row[FPA_ATTR_MODULE] = $rows[$module][FPA_ATTR_MODULE];
$row[FPA_ATTR_PERMISSION] = array_unique(array_map('drupal_html_class', $row[FPA_ATTR_PERMISSION]));
// Add current permission to current module row.
$rows[$module][FPA_ATTR_PERMISSION] = array_merge($rows[$module][FPA_ATTR_PERMISSION], $row[FPA_ATTR_PERMISSION]);
$rows[$module][FPA_ATTR_CHECKED] = array_unique(array_merge($rows[$module][FPA_ATTR_CHECKED], $row[FPA_ATTR_CHECKED]));
$rows[$module][FPA_ATTR_NOT_CHECKED] = array_unique(array_merge($rows[$module][FPA_ATTR_NOT_CHECKED], $row[FPA_ATTR_NOT_CHECKED]));
$modules[$rows[$module][FPA_ATTR_MODULE][0]][FPA_ATTR_PERMISSION][] = $row[FPA_ATTR_PERMISSION];
}
$rows[$i++] = $row;
}
$reset_button = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => 'reset',
'class' => 'form-submit',
'value' => t('Reset changes'),
),
);
// If there is no submit button, don't add the reset button.
if (count(element_children($form['actions'])) > 0) {
// Have the reset button appear before the submit button.
array_unshift($form['actions'], $reset_button);
}
$actions_output = drupal_render_children($form['actions']);
$header = array();
$header[] = array(
'data' => t('Permission') . $actions_output,
);
foreach (element_children($form['role_names']) as $rid) {
$header[] = array(
'data' => drupal_render($form['role_names'][$rid]) . $nameless_checkbox_output,
'class' => array(
'checkbox',
),
'title' => array(
$form['role_names'][$rid]['#markup'],
),
FPA_ATTR_ROLE => array(
$rid,
),
);
$user_roles[$rid] = $form['role_names'][$rid]['#markup'];
}
$table = array(
'header' => $header,
'rows' => $rows,
);
$output = _fpa_wrapper($table, $modules, $user_roles, $actions_output);
$output .= drupal_render_children($form);
return $output;
}
/**
* Wraps table output in the FPA filter.
*/
function _fpa_wrapper($permissions_table, $modules, $user_roles, $actions_output) {
$same_page = trim(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH), '/') == $_GET['q'];
$render = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-container',
),
),
);
$hiders = array(
'fpa-hide-descriptions' => array(
'hide' => t('Hide descriptions'),
'show' => t('Show descriptions'),
),
'fpa-hide-system-names' => array(
'hide' => t('Hide system names'),
'show' => t('Show system names'),
),
);
$render['#attributes']['class'][] = 'fpa-hide-system-names';
$hide_container = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-toggle-container',
),
),
);
foreach ($hiders as $hide_class => $labels) {
$hide_container[$hide_class] = array(
'#theme' => 'link',
'#text' => '',
'#path' => '',
'#options' => array(
'attributes' => array_merge($labels, array(
'fpa-toggle-class' => $hide_class,
)),
'html' => TRUE,
'fragment' => ' ',
'external' => TRUE, // Prevent base path from being added to link.
),
);
}
$render['hide_container'] = $hide_container;
$wrapper = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-wrapper',
),
),
);
$render['wrapper'] = &$wrapper;
/**
* <style /> block template.
*/
$style_template = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'style-wrapper-class-name', // Override on specific block.
),
),
);
$style_template['style'] = array(
'#type' => 'html_tag',
'#tag' => 'style',
'#attributes' => array(
'type' => array(
'text/css',
),
),
'#value' => '', // #value needed for closing tag.
);
/**
* <style /> block for role filtering.
*/
$wrapper['role_styles'] = $style_template;
$wrapper['role_styles']['#attributes']['class'][0] = 'fpa-role-styles';
/**
* <style /> block for permission filtering.
*/
$wrapper['perm_styles'] = $style_template;
$wrapper['perm_styles']['#attributes']['class'][0] = 'fpa-perm-styles';
/**
* Left section contains module list and form submission button.
*/
$left_section = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-left-section',
),
),
);
$wrapper['left_section'] = &$left_section;
/**
* Right section contains filter form and permissions table.
*/
$right_section = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-right-section',
),
),
);
$wrapper['right_section'] = &$right_section;
$module_template = array(
FPA_ATTR_MODULE => array(),
FPA_ATTR_PERMISSION => array(),
'data' => array(
'#type' => 'container',
'#attributes' => array(),
'link' => array(
'#type' => 'markup',
'#markup' => '', // l($module['text'], 'admin/people/permissions', $options)
),
'counters' => array(),
'total' => array(
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => array(
'class' => array('fpa-perm-total'),
'fpa-total' => 0,
),
'#value' => '', // #value needed for closing tag.
),
),
);
$counter_template = array(
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => array(
'class' => array('fpa-perm-counter'),
FPA_ATTR_PERMISSION => array(), // Counters only count permissions match.
),
'#value' => '', // #value required for closing tag.
);
$items = array();
$all_modules = array(
'text' => t('All modules'),
FPA_ATTR_MODULE => array(),
FPA_ATTR_PERMISSION => array(),
);
array_unshift($modules, $all_modules);
$all_modules_counters = array();
foreach ($modules as $module) {
$module_item = $module_template;
$module_item[FPA_ATTR_MODULE] = $module[FPA_ATTR_MODULE];
$module_item[FPA_ATTR_PERMISSION] = array_reduce(array_pad($module[FPA_ATTR_PERMISSION], 1, array()), 'array_merge', array());
// Use link for accessibility and tabability.
$options = array(
'fragment' => 'all',
);
if (!empty($module['title'])) {
$options['fragment'] = 'module-' . $module['title'][0];
$options['attributes']['title'] = $module['title'][0];
}
$module_item['data']['link']['#markup'] = l($module['text'], 'admin/people/permissions', $options);
foreach ($module[FPA_ATTR_PERMISSION] as $module_perm) {
$counter_item = $counter_template;
$counter_item['#attributes'][FPA_ATTR_PERMISSION] = $module_perm;
$all_modules_counters[] = $counter_item;
$module_item['data']['counters'][] = $counter_item;
}
$module_item['data']['total']['#attributes']['fpa-total'] = count($module[FPA_ATTR_PERMISSION]);
$items[] = $module_item;
}
$items[0]['data']['counters'] = $all_modules_counters;
$items[0]['data']['total']['#attributes']['fpa-total'] = count($all_modules_counters);
foreach ($items as &$item) {
$item['data'] = drupal_render($item['data']);
}
$left_section['list'] = array(
'#items' => $items,
'#theme' => 'item_list',
);
$left_section['buttons'] = array(
'#type' => 'markup',
'#markup' => $actions_output,
);
$filter_form = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-filter-form',
),
),
);
$clear_button = array(
'#type' => 'html_tag',
'#tag' => 'input',
'#attributes' => array(
'type' => array(
'button',
),
'class' => array(
'fpa-clear-search',
'form-submit',
),
'value' => 'Clear filter',
),
);
$default_filter = '';
if (!empty($_GET['fpa_perm'])) {
$default_filter = $_GET['fpa_perm'];
}
if (!empty($_COOKIE['fpa_filter']) && $same_page) {
$default_filter = $_COOKIE['fpa_filter'];
}
$filter_form['permission_module_filter'] = array(
'#type' => 'textfield',
'#title' => t('Filter:'),
'#description' => t('<p>Enter in the format of "permission@module",</p><p>e.g. <em>admin@system</em> will show only permissions with the<br>text "admin" in modules with the text "system".</p><p>This will also match on system name of a permission.</p>'),
'#size' => 25,
'#field_suffix' => drupal_render($clear_button),
'#attributes' => array(
'placeholder' => array(
'permission@module',
),
'autofocus' => 'autofocus',
),
'#value' => $default_filter,
);
/*
* Populate the permission filter styles.
*/
$matches = array();
preg_match('/^\s*([^@]*)@?(.*?)\s*$/i', $filter_form['permission_module_filter']['#value'], $matches);
array_shift($matches); // Remove whole match item.
$safe_matches = array_map('drupal_html_class', $matches);
$module_match = !empty($_COOKIE['module_match']) ? $_COOKIE['module_match'] : '*=';
$filters = array(
drupal_strlen($safe_matches[0]) > 0 ? ('[' . FPA_ATTR_PERMISSION . '*="' . $safe_matches[0] . '"]') : '',
drupal_strlen($safe_matches[1]) > 0 ? ('[' . FPA_ATTR_MODULE . $module_match . '"' . $safe_matches[1] . '"]') : '',
);
$filter_styles = array(
'.fpa-table-wrapper tr[' . FPA_ATTR_MODULE . ']{display: none;}',
'.fpa-table-wrapper tr[' . FPA_ATTR_MODULE . ']',
$filters[0],
$filters[1],
'{display: table-row;}',
'.fpa-perm-counter{display: none;}',
'.fpa-perm-counter',
$filters[0],
'{display: inline;}',
'.fpa-left-section li[' . FPA_ATTR_MODULE . ']',
drupal_strlen($filters[1]) > 0 ? $filters[1] : '[' . FPA_ATTR_MODULE . '=""]',
'{margin-right:-1px; background-color: white; border-right: solid 1px transparent;}',
);
$wrapper['perm_styles']['style']['#value'] = implode('', $filter_styles);
$cookie_roles = (!empty($_COOKIE['fpa_roles']) && $same_page) ? json_decode($_COOKIE['fpa_roles']) : array();
$options = array(
'*' => t('--All Roles'),
);
if (!empty($user_roles)) {
$options += $user_roles; // Preserves keys.
}
if (in_array('*', $cookie_roles)) {
$cookie_roles = array('*');
}
$filter_form['role_filter'] = array(
'#type' => 'select',
'#title' => t('Roles:'),
'#description' => t('Select which roles to display.<br>Ctrl+click to select multiple.'),
'#size' => 5,
'#options' => $options,
'#attributes' => array(
'multiple' => 'multiple',
'autocomplete' => 'off', // Keep browser from populating this from 'cached' input.
),
'#value' => count(array_intersect($cookie_roles, array_keys($options))) > 0 ? $cookie_roles : array('*'),
);
/*
* Populate the roles styles.
*/
if (!in_array('*', $filter_form['role_filter']['#value'])) {
$role_styles = array(
'.fpa-table-wrapper [' . FPA_ATTR_ROLE . '] {display: none;}',
);
foreach ($filter_form['role_filter']['#value'] as $value) {
$role_styles[] = '.fpa-table-wrapper [' . FPA_ATTR_ROLE . '="' . $value . '"] {display: table-cell;}';
}
$role_styles[] = '.fpa-table-wrapper [' . FPA_ATTR_ROLE . '="' . end($filter_form['role_filter']['#value']) . '"] {border-right: 1px solid #bebfb9;}';
$wrapper['role_styles']['style']['#value'] = implode('', $role_styles);
}
$checked_status = array(
'#type' => 'checkboxes',
'#title' => t('Display permissions that are:'),
'#options' => array(
FPA_ATTR_CHECKED => t('Checked'),
FPA_ATTR_NOT_CHECKED => t('Not Checked'),
),
'#attributes' => array(),
'#title_display' => 'before',
'#description' => t('Applies to all visible roles.<br />Unsaved changes are not counted.<br />Most effective when a single role is visible.<br />Empty module rows sometimes display when used with permission filter.'),
);
$checked_status_keys = array_keys($checked_status['#options']);
$checked_status['#value'] = array_combine($checked_status_keys, $checked_status_keys);
$filter_form['checked_status'] = form_process_checkboxes($checked_status);
foreach (element_children($filter_form['checked_status']) as $key) {
$filter_form['checked_status'][$key]['#checked'] = TRUE;
}
$right_section['filter_form'] = $filter_form;
$table_wrapper = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fpa-table-wrapper',
),
),
);
$table_wrapper['table'] = array(
'#theme' => 'table',
'#header' => $permissions_table['header'],
'#rows' => $permissions_table['rows'],
'#attributes' => array(
'id' => 'permissions',
),
);
// Show after full table HTML is loaded. Reduces progressive table load reflow/repaint.
$table_wrapper['show_table'] = array(
'#type' => 'html_tag',
'#tag' => 'style',
'#attributes' => array(
'type' => array(
'text/css',
),
),
'#value' => '#permissions {display: table;} .fpa-table-wrapper {background: none;}',
);
$table_wrapper['buttons'] = array(
'#type' => 'markup',
'#markup' => $actions_output,
);
$right_section['table_wrapper'] = $table_wrapper;
return drupal_render($render);
}
+627 -181
View File
@@ -1,220 +1,666 @@
(function ($) {
var fpa = {
selector : {
form: '#user-admin-permissions',
table : '#permissions',
row : 'tbody tr',
filter : 'td.permission',
grouping : 'td.module'
},
dom : {
table : '', // jquery object for entire permissions table
rows : '', // jquery object containing just the rows
perm_style : '', // jquery object containing permissions style
role_style : '', // jquery object containing roles style
section_left: '',
section_right: ''
},
search:''
/**
* @file
* JS functionality that creates dynamic CSS which hides permission rows and role columns.
*/
// Wrapper normalizes 'jQuery' to '$'.
;(function fpa_scope($, Drupal, window, document) {
"use strict";
var Fpa = function (context, settings) {
this.init(context, settings);
return this;
};
Fpa.prototype.selector = {
form: '#user-admin-permissions',
table : '#permissions'
};
Fpa.prototype.init = function (context, settings) {
this.drupal_html_class_cache = {};
this.dom = {};
this.attr = settings.attr;
this.filter_timeout= null;
this.filter_timeout_time = 0;
this.module_match = '*=';
this.filter_selector_cache = {
'*=': {},
'~=': {}
};
this.selector.table_base_selector = '.fpa-table-wrapper tr[' + this.attr.module + ']';
this.selector.list_counter_selector = '.fpa-perm-counter';
this.selector.list_base_selector = '.fpa-left-section li[' + this.attr.module + ']';
if (this.select(context)) {
this.prepare();
this.authenticated_role_behavior();
}
};
Fpa.prototype.styles = {
module_active_style: '{margin-right:-1px; background-color: white; border-right: solid 1px transparent;}'
};
/**
* Kick a function to the Back Of The Line.
* Select all elements that are used by FPA ahead of time and cache on 'Fpa' instance.
*/
Fpa.prototype.select = function (context) {
this.dom.context = $(context);
this.dom.form = this.dom.context.find(this.selector.form);
// Prevent anything else from running if the form is not found.
if (this.dom.form.length === 0) {
return false;
}
this.dom.container = this.dom.form.find('.fpa-container');
// Raw element since $().html(); does not work for <style /> elements.
this.dom.perm_style = this.dom.container.find('.fpa-perm-styles style').get(0);
this.dom.role_style = this.dom.container.find('.fpa-role-styles style').get(0);
this.dom.section_left = this.dom.container.find('.fpa-left-section');
this.dom.section_right = this.dom.container.find('.fpa-right-section');
this.dom.table_wrapper = this.dom.section_right.find('.fpa-table-wrapper');
this.dom.table = this.dom.table_wrapper.find(this.selector.table);
this.dom.module_list = this.dom.section_left.find('ul');
this.dom.filter_form = this.dom.container.find('.fpa-filter-form');
this.dom.filter = this.dom.filter_form.find('input[type="text"]');
this.dom.role_select = this.dom.filter_form.find('select');
this.dom.checked_status = this.dom.filter_form.find('input[type="checkbox"]');
return true;
};
/**
* Prepares a string for use as a CSS identifier (element, class, or ID name).
*
* Anything that is botl'd will run after other attach events, like sticky table headers.
* @see https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_clean_css_identifier/7
*/
fpa.botl = function (func) {
setTimeout(function () {
func();
}, 0);
Fpa.prototype.drupal_clean_css_identifier = function (str) {
return str
// replace ' ', '_', '/', '[' with '-'
.replace(/[ _\/\[]/g, '-')
// replace ']' with ''
.replace(/\]/g, '')
// Valid characters in a CSS identifier are:
// - the hyphen (U+002D)
// - a-z (U+0030 - U+0039)
// - A-Z (U+0041 - U+005A)
// - the underscore (U+005F)
// - 0-9 (U+0061 - U+007A)
// - ISO 10646 characters U+00A1 and higher
// We strip out any character not in the above list.
.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/, '');
};
/**
* Changes a string into a safe single css class.
* Prepares a string for use as a valid class name.
*
* @see https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_html_class/7
*/
fpa.classify = function (str) {
return str.toLowerCase().replace(/ /ig, '-');
Fpa.prototype.drupal_html_class = function (str) {
if (this.drupal_html_class_cache[str] === undefined) {
this.drupal_html_class_cache[str] = this.drupal_clean_css_identifier(str.toLowerCase());
}
return this.drupal_html_class_cache[str];
};
/**
* Handles applying styles to <style /> tags.
*/
Fpa.prototype.set_style = (function () {
// Feature detection. Mainly for IE8.
if ($('<style type="text/css" />').get(0).styleSheet) {
return function (element, styles) {
element.styleSheet.cssText = styles;
};
}
// Default that works in modern browsers.
return function (element, styles) {
element.innerHTML = styles;
};
})();
/**
* Callback for click events on module list.
*/
fpa.filter_module = function () {
var $this = $(this);
$('div.fpa-left-section ul li').removeClass('active');
$this.parent().addClass('active');
Fpa.prototype.filter_module = function (e) {
var current_perm = fpa.dom.filter.val().split('@');
current_perm[1] = $this.attr('title');
fpa.dom.filter.val(current_perm.join('@').replace(/@$/ig, '')); // remove trailing @ as that means no module; clean 'All' filter value
fpa.filter('=');
e.preventDefault();
e.stopPropagation();
var $this = $(e.currentTarget);
this.dom.filter.val([
// remove current module filter string.
this.dom.filter.val().replace(/(@.*)/, ''),
// remove trailing @ as that means no module; clean 'All' filter value
$this.attr(this.attr.module) !== '' ? '@' + $this.find('a[href]').text() : ''
].join(''));
/**
* ~= matches exactly one whitespace separated word in attribute.
*
* @see http://www.w3.org/TR/CSS2/selector.html#matching-attrs
*/
this.module_match = '~=';
this.filter();
};
fpa.filter = function (module_match) {
module_match = module_match || '*=';
perm = fpa.dom.filter.val();
fpa.botl(function () {
if (typeof perm != 'undefined' && ['', '@'].indexOf(perm) == -1) {
var perm_copy = fpa.classify(perm).split('@');
var selector = fpa.selector.table + ' ' + fpa.selector.row;
Fpa.prototype.build_filter_selectors = function (filter_string) {
// Extracts 'permissions@module', trimming leading and trailing whitespace.
var matches = filter_string.match(/^\s*([^@]*)@?(.*?)\s*$/i);
matches.shift(); // Remove whole match item.
var safe_matches = $.map(matches, $.proxy(this.drupal_html_class, this));
this.filter_selector_cache[this.module_match][filter_string] = [
safe_matches[0].length > 0 ? '[' + this.attr.permission + '*="' + safe_matches[0] + '"]' : '',
safe_matches[1].length > 0 ? '[' + this.attr.module + this.module_match + '"' + safe_matches[1] + '"]' : ''
];
return this.filter_selector_cache[this.module_match][filter_string];
};
Fpa.prototype.get_filter_selectors = function (filter_string) {
filter_string = filter_string || this.dom.filter.val();
return this.filter_selector_cache[this.module_match][filter_string] || this.build_filter_selectors(filter_string);
};
Fpa.prototype.permission_grid_styles = function (filters) {
filters = filters || this.get_filter_selectors();
var checked_filters = this.build_checked_selectors();
var styles = [
this.selector.table_base_selector,
'{display: none;}'
];
for (var i = 0; i < checked_filters.length; i++) {
styles = styles.concat([
this.selector.table_base_selector,
var perm_style_code = selector + '[fpa-module]{display:none;}';
checked_filters[i],
if (perm_copy[0]) selector += '[fpa-permission*="' + perm_copy[0] + '"]';
if (perm_copy[1]) selector += '[fpa-module' + module_match + '"' + perm_copy[1] + '"]';
filters[0],
filters[1],
'{display: table-row;}'
]);
}
return styles.join('');
};
Fpa.prototype.counter_styles = function (filters) {
filters = filters || this.get_filter_selectors();
return [
this.selector.list_counter_selector,
'{display: none;}',
this.selector.list_counter_selector,
filters[0],
'{display: inline;}'
].join('');
};
Fpa.prototype.module_list_styles = function (filters) {
filters = filters || this.get_filter_selectors();
return [
this.selector.list_base_selector,
(filters[1].length > 0 ? filters[1] : '[' + this.attr.module + '=""]'),
this.styles.module_active_style
].join('');
};
Fpa.prototype.filter = function () {
var perm = this.dom.filter.val();
$.cookie('fpa_filter', perm, {path: '/'});
$.cookie('fpa_module_match', this.module_match, {path: '/'});
this.save_filters();
var filter_selector = this.get_filter_selectors(perm);
this.set_style(this.dom.perm_style, [
this.permission_grid_styles(filter_selector),
this.counter_styles(filter_selector),
this.module_list_styles(filter_selector)
].join(''));
};
Fpa.prototype.build_role_selectors = function (roles) {
roles = roles || this.dom.role_select.val();
var selectors = ['*'];
if ($.inArray('*', roles) === -1) {
selectors = $.map(roles, $.proxy(function (value, index) {
perm_style_code += selector + '{display: table-row;}';
return '[' + this.attr.role + '="' + value + '"]';
fpa.dom.perm_style[0].innerHTML = perm_style_code;
}, this));
}
return selectors;
};
Fpa.prototype.build_checked_selectors = function (roles) {
roles = roles || this.dom.role_select.val();
var checked_boxes = $.map(this.dom.checked_status, function (element, index) {
return element.checked ? $(element).val() : null;
});
var selectors = [''];
if ($.inArray('*', roles) !== -1) {
roles = $.map(this.dom.role_select.find('option').not('[value="*"]'), $.proxy(function (element, index) {
return $(element).attr('value');
}, this));
}
if (checked_boxes.length != this.dom.checked_status.length) {
selectors = $.map(roles, $.proxy(function (value, index) {
return $.map(checked_boxes, $.proxy(function (checked_attr, index) {
return '[' + checked_attr + '~="' + value + '"]';
}, this));
}, this));
}
return selectors;
};
// Even handler for role selection.
Fpa.prototype.filter_roles = function () {
this.save_filters();
var values = this.dom.role_select.val() || [];
var role_style_code = [];
$.cookie('fpa_roles', JSON.stringify(values), {path: '/'});
// Only filter if "All Roles" is not selected.
if ($.inArray('*', values) === -1) {
role_style_code.push('.fpa-table-wrapper [' + this.attr.role + '] {display: none;}');
if (values.length > 0) {
var role_selectors = this.build_role_selectors(values);
role_style_code = role_style_code.concat($.map(role_selectors, $.proxy(function (value, index) {
return '.fpa-table-wrapper ' + value + ' {display: table-cell;}';
}, this)));
// Ensure right border on last visible role.
role_style_code.push('.fpa-table-wrapper ' + role_selectors.pop() + ' {border-right: 1px solid #bebfb9;}');
}
else {
fpa.dom.perm_style[0].innerHTML = '';
role_style_code.push('td[class="permission"] {border-right: 1px solid #bebfb9;}');
}
});
};
fpa.prepare = function (context) {
fpa.dom.form = $(fpa.selector.form, context);
if (fpa.dom.form.length == 0) {
return;
}
fpa.dom.table = fpa.dom.form.find(fpa.selector.table);
fpa.dom.section_right = fpa.dom.table.wrap('<div class="fpa-right-section" />').parent();
fpa.dom.module_list = $('<ul />').insertBefore(fpa.dom.section_right).wrap('<div class="fpa-left-section" />');
// create module list
fpa.dom.all_modules = $('<div />')
.appendTo(fpa.dom.module_list)
.wrap('<li class="active" />')
.text('All modules')
.attr('title', '')
.click(fpa.filter_module);
this.set_style(this.dom.role_style, role_style_code.join(''));
fpa.dom.table.find(fpa.selector.grouping).each(function () {
var module_id = $(this).text();
// Add new item to module list.
$('<div />')
.appendTo(fpa.dom.module_list)
.wrap('<li />')
.text(module_id.replace(/ module$/ig, ''))
.attr('title', module_id)
.attr('fpa-module', fpa.classify(module_id))
.click(fpa.filter_module);
this.filter();
};
/**
* Prevent the current filter from being cleared on form reset.
*/
Fpa.prototype.save_filters = function () {
/**
* element.defaultValue is what 'text' elements reset to.
*
* @link http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-26091157
*/
this.dom.filter.get(0).defaultValue = this.dom.filter.val();
/**
* element.defaultSelected is what 'option' elements reset to.
*
* @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-37770574
*/
this.dom.role_select.find('option').each(function (index, element) {
element.defaultSelected = element.selected;
});
// tag rows with required classes
fpa.botl(function () {
fpa.dom.filter_form = $('<div class="fpa-filter-form" />').prependTo(fpa.dom.section_right);
fpa.dom.perm_style = $('<style type="text/css" />').prependTo(fpa.dom.section_right);
fpa.dom.role_style = $('<style type="text/css" />').prependTo(fpa.dom.section_right);
// Put the "Save Permissions" button at the top and bottom.
fpa.dom.form.find('input[type="submit"][name="op"]').remove()
.clone().insertAfter(fpa.dom.module_list)
.clone().insertAfter(fpa.dom.table);
/**
* element.defaultChecked is what 'checkbox' elements reset to.
*
* @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-20509171
*/
this.dom.checked_status.each(function (index, element) {
element.defaultChecked = element.checked;
});
};
Fpa.prototype.prepare = function () {
this.filter_timeout_time = Math.min(this.dom.table.find('tr').length, 200);
this.dom.form
.delegate('.fpa-toggle-container a', 'click', $.proxy(function fpa_toggle(e) {
e.preventDefault();
fpa.dom.filter = $('<input id="fpa_filter" type="text" class="form-text" placeholder="permission@module" />')
.appendTo(fpa.dom.filter_form)
.keypress(function (e) {
//prevent enter key from submitting form
if (e.which == 13) {
return false;
}
})
.keyup(function (e) {
fpa.filter();
})
.wrap('<div id="fpa-filter-perm" class="form-item" />')
.before('<label for="fpa_filter">Filter:</label>')
.after('<div class="description">Enter in the format of permission@module;<br /> E.g. admin@system will show only permissions with<br />the text "admin" in modules with the text "system".</div>')
.val(Drupal.settings.fpa.perm);
var toggle_class = $(e.currentTarget).attr('fpa-toggle-class');
$('<button class="clear-search">Clear Filter</button>')
.insertAfter(fpa.dom.filter)
.click(function (e) {
this.dom.container.toggleClass(toggle_class).hasClass(toggle_class);
}, this))
;
this.dom.section_left
.delegate('li', 'click', $.proxy(this.filter_module, this))
;
this.dom.filter
// Prevent Enter/Return from submitting form.
.keypress(function fpa_prevent_form_submission(e) {
if (e.which === 13) {
e.preventDefault();
fpa.dom.filter.val('');
fpa.filter();
fpa.dom.all_modules.click();
});
var roles_select = $('<select multiple="multiple" size=5 />')
.appendTo(fpa.dom.filter_form)
.wrap('<div id="fpa-filter-role" class="form-item" />')
.before('<label for="fpa_filter">Roles:</label>')
.after('<div class="description">Select which roles to display.<br />Ctrl+click to select multiple.</div>')
.change(function () {
var values = $(this).val();
var selector_array = [];
var role_style_code = fpa.selector.table + ' .checkbox{display:none;}';
for (i in values) {
selector_array.push(fpa.selector.table + ' .checkbox[title^="' + values[i] + '"]');
}
role_style_code += selector_array.join(',') + '{display: table-cell;}';
fpa.dom.role_style[0].innerHTML = role_style_code;
});
fpa.dom.rows = fpa.dom.table.find(fpa.selector.row);
var roles = fpa.dom.table.find('thead th.checkbox').each(function () {
$this = $(this);
var role_text = $this.text();
var index = $this.attr('title', role_text).index() + 1;
fpa.dom.rows.find('td:nth-child(' + index + ')').attr('title', role_text);
$('<option />')
.appendTo(roles_select)
.attr('value', $this.text())
.attr('selected', 'selected')
.text($this.text());
});
var module_id = '';
var $module_row;
// iterate over the rows
fpa.dom.rows.each(function () {
var $this = $(this);
// Is this a module row?
var new_module_id = $this.find(fpa.selector.grouping).text();
if (new_module_id != '') {
$module_row = $this.addClass('module');
module_id = fpa.classify(new_module_id);
e.stopPropagation();
}
var perm = $this.find(fpa.selector.filter).clone();
perm.find('div.description').remove();
var permission = fpa.classify($.trim(perm.text()));
$this.attr('fpa-module', module_id).attr('fpa-permission', permission);
$module_row.attr('fpa-permission', $module_row.attr('fpa-permission') + ' ' + permission);
});
})
// Prevent non-character keys from triggering filter.
.keyup($.proxy(function fpa_filter_keyup(e) {
// Prevent ['Enter', 'Shift', 'Ctrl', 'Alt'] from triggering filter.
if ($.inArray(e.which, [13, 16, 17, 18]) === -1) {
window.clearTimeout(this.filter_timeout);
this.filter_timeout = window.setTimeout($.proxy(function () {
this.dom.table_wrapper
.detach()
.each($.proxy(function (index, element) {
this.module_match = '*=';
this.filter();
}, this))
.appendTo(this.dom.section_right)
;
}, this), this.filter_timeout_time);
}
}, this))
;
// Handle links to sections on permission admin page.
this.dom.form
.delegate('a[href*="admin/people/permissions#"]', 'click', $.proxy(function fpa_inter_page_links_click(e) {
e.preventDefault();
e.stopPropagation();
this.dom.module_list
.find('li[' + this.attr.module + '~="' + this.drupal_html_class(e.currentTarget.hash.substring(8)) + '"]')
.click()
;
$('body').scrollTop(this.dom.container.position().top);
}, this))
;
// Handler for links that use #hash and can't be capture server side.
if(window.location.hash.indexOf('module-') === 1) {
if (Drupal.settings.fpa.perm == '' && window.location.hash.indexOf('module-') > -1) {
fpa.dom.filter.val('@' + window.location.hash.substring(8));
fpa.filter('=');
this.dom.module_list
.find('li[' + this.attr.module + '~="' + this.drupal_html_class(window.location.hash.substring(8)) + '"]')
.click()
;
}
/**
* Reset authenticated role behavior when form resets.
*
* @todo should this be synchronous? Would have to trigger reset on elements while detached.
*/
this.dom.form.bind('reset', $.proxy(function fpa_form_reset(e) {
// Wait till after the form elements have been reset.
window.setTimeout($.proxy(function fpa_fix_authenticated_behavior() {
this.dom.table_wrapper
.detach() // Don't make numerous changes while elements are in the rendered DOM.
.each($.proxy(function (index, element) {
$(element)
.find('input[type="checkbox"].rid-2')
.each(this.dummy_checkbox_behavior)
;
}, this))
.appendTo(this.dom.section_right)
;
}, this), 0);
}, this));
// Role checkboxes toggle all visible permissions for this column.
this.dom.section_right
.delegate('th[' + this.attr.role + '] input[type="checkbox"].fpa-checkboxes-toggle', 'change', $.proxy(function fpa_role_permissions_toggle(e) {
var $this = $(e.currentTarget);
// Get visible rows selectors.
var filters = this.get_filter_selectors(this.dom.filter.val());
this.dom.table_wrapper
.detach()
.each($.proxy(function (index, element) {
var rid = $this.closest('[' + this.attr.role + ']').attr(this.attr.role);
$(element)
.find([
'tr' + filters.join(''),
'td.checkbox[' + this.attr.role + '="' + rid + '"]',
'input[type="checkbox"][name]'
].join(' ')) // Array is easier to read, separated for descendant selectors.
.attr('checked', $this.attr('checked'))
.filter('.rid-2') // Following only applies to "Authenticated User" role.
.each(this.dummy_checkbox_behavior)
;
}, this))
.appendTo(this.dom.section_right)
;
}, this))
;
// Permission checkboxes toggle all visible permissions for this row.
this.dom.section_right
.delegate('td.permission input[type="checkbox"].fpa-checkboxes-toggle', 'change', $.proxy(function fpa_role_permissions_toggle(e) {
// Get visible rows selectors.
var $row = $(e.currentTarget).closest('tr');
$row.prev('tr').after(
$row
.detach()
.each($.proxy(function (index, element) {
$(element)
.find('td.checkbox')
.filter(this.build_role_selectors().join(','))
.find('input[type="checkbox"][name]')
.attr('checked', e.currentTarget.checked)
.filter('.rid-2') // Following only applies to "Authenticated User" role.
.each(this.dummy_checkbox_behavior)
;
}, this))
);
}, this))
;
// Clear contents of search field and reset visible permissions.
this.dom.section_right
.delegate('.fpa-clear-search', 'click', $.proxy(function (e) {
this.dom.filter
.val('')
;
this.filter();
}, this))
;
// Change visible roles.
this.dom.role_select
.bind('change blur', $.proxy(this.filter_roles, this))
;
this.dom.checked_status
.bind('change', $.proxy(function (e) {
this.save_filters();
this.filter();
}, this))
;
/**
* System name is not normally selectable because its a pseudo-element.
*
* This detects clicks directly on the TR, which happens when a click is on
* the pseudo-element, and displays a prompt() with the system name as the
* pre-populated value.
*/
this.dom.table
.delegate('tr[' + this.attr.system_name + ']', 'click', $.proxy(function (e) {
var $target = $(e.target);
if ($target.is('tr[' + this.attr.system_name + ']')) {
window.prompt('You can grab the system name here', $target.attr(this.attr.system_name));
}
}, this))
;
// Focus on element takes long time, bump after normal execution.
window.setTimeout($.proxy(function fpa_filter_focus() {
this.dom.filter.focus();
}, this), 0);
};
/**
* Event handler/iterator.
*
* Should not be $.proxy()'d.
*/
Fpa.prototype.dummy_checkbox_behavior = function () {
// 'this' refers to the element, not the 'Fpa' instance.
$(this).closest('tr').toggleClass('fpa-authenticated-role-behavior', this.checked);
};
Fpa.prototype.authenticated_role_behavior = function () {
this.dom.table_wrapper
.delegate('input[type=checkbox].rid-2', 'mousedown', function (e) {
$(e.currentTarget).unbind('click.permissions');
})
.delegate('input[type=checkbox].rid-2', 'change.fpa_authenticated_role', this.dummy_checkbox_behavior)
;
};
Drupal.behaviors.fpa = {
attach: function (context, settings) {
// Add touch-screen styling for checkboxes to make easier to use.
if (document.documentElement.ontouchstart !== undefined) {
$(document.body).addClass('fpa-mobile');
}
fpa.filter();
fpa.dom.form.addClass('show');
fpa.dom.filter.focus();
});
// Fix table sticky table headers width due to changes in visible roles.
$(window)
.bind('scroll', function fpa_fix_tableheader(e) {
$(e.currentTarget).triggerHandler('resize.drupal-tableheader');
})
;
new Fpa(context, settings.fpa);
}
};
fpa.modalframe = function (context) {
$('a.fpa_modalframe', context).click(function (e) {
e.preventDefault();
e.stopPropagation();
Drupal.modalFrame.open({
url: $(this).attr('href'),
draggable: false
});
});
};
// Override Drupal core's Authenticated role checkbox behavior.
Drupal.behaviors.permissions.attach = $.noop;
Drupal.behaviors.fpa = {attach: function (context) {
fpa.prepare(context);
fpa.modalframe(context);
}};
})(jQuery);
// Drupal.behaviors.formUpdated.attach = $.noop;
})(jQuery, Drupal, window, document);
File diff suppressed because one or more lines are too long
@@ -0,0 +1,91 @@
--- logintoboggan.permissions.js
+++ logintoboggan.permissions.js
@@ -1,77 +1,25 @@
/**
- * This is a custom implementation of user.permissions.js, which is necessary
- * because LoginToboggan needs its pre-auth role to not be explicitly tied to
- * the auth role. The change is minor -- simply exclude the pre-auth role from
- * all the auto-checking as the anon and auth user roles are.
+ * LoginToboggan needs its pre-auth role to not be explicitly tied to
+ * the auth role.
*/
-
(function ($) {
/**
* Shows checked and disabled checkboxes for inherited permissions.
*/
-Drupal.behaviors.permissions = {
- attach: function (context) {
- var self = this;
- $('table#permissions').once('permissions', function () {
- // On a site with many roles and permissions, this behavior initially has
- // to perform thousands of DOM manipulations to inject checkboxes and hide
- // them. By detaching the table from the DOM, all operations can be
- // performed without triggering internal layout and re-rendering processes
- // in the browser.
- var $table = $(this);
- if ($table.prev().length) {
- var $ancestor = $table.prev(), method = 'after';
- }
- else {
- var $ancestor = $table.parent(), method = 'append';
- }
- $table.detach();
-
- // Create dummy checkboxes. We use dummy checkboxes instead of reusing
- // the existing checkboxes here because new checkboxes don't alter the
- // submitted form. If we'd automatically check existing checkboxes, the
- // permission table would be polluted with redundant entries. This
- // is deliberate, but desirable when we automatically check them.
- var $dummy = $('<input type="checkbox" class="dummy-checkbox" disabled="disabled" checked="checked" />')
- .attr('title', Drupal.t("This permission is inherited from the authenticated user role."))
- .hide();
-
- $('input[type=checkbox]', this).not('.rid-2, .rid-1, .rid-' + Drupal.settings.LoginToboggan.preAuthID).addClass('real-checkbox').each(function () {
- $dummy.clone().insertAfter(this);
+Drupal.behaviors.LoginTobogganPermissions = {
+ attach: function (context, settings) {
+ // Revert changes made by modules/user/user.permissions.js
+ $('table#permissions', context).once('tobogganPermissions', function () {
+ $('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
+ $(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
-
- // Initialize the authenticated user checkbox.
- $('input[type=checkbox].rid-2', this)
- .bind('click.permissions', self.toggle)
- // .triggerHandler() cannot be used here, as it only affects the first
- // element.
- .each(self.toggle);
-
- // Re-insert the table into the DOM.
- $ancestor[method]($table);
});
},
-
- /**
- * Toggles all dummy checkboxes based on the checkboxes' state.
- *
- * If the "authenticated user" checkbox is checked, the checked and disabled
- * checkboxes are shown, the real checkboxes otherwise.
- */
- toggle: function () {
- var authCheckbox = this, $row = $(this).closest('tr');
- // jQuery performs too many layout calculations for .hide() and .show(),
- // leading to a major page rendering lag on sites with many roles and
- // permissions. Therefore, we toggle visibility directly.
- $row.find('.real-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? 'none' : '');
- });
- $row.find('.dummy-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? '' : 'none');
- });
- }
};
})(jQuery);
@@ -0,0 +1,14 @@
diff --git a/logintoboggan.permissions.js b/logintoboggan.permissions.js
index d463d29..492b64c 100644
--- a/logintoboggan.permissions.js
+++ b/logintoboggan.permissions.js
@@ -14,6 +14,9 @@ Drupal.behaviors.LoginTobogganPermissions = {
$('table#permissions', context).once('tobogganPermissions', function () {
$('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
$(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
});
},
@@ -0,0 +1,136 @@
diff --git a/logintoboggan.module b/logintoboggan.module
index 55b93fe..4e4e0fc 100644
--- a/logintoboggan.module
+++ b/logintoboggan.module
@@ -306,26 +306,6 @@ function logintoboggan_form_user_pass_reset_alter(&$form, &$form_state) {
}
/**
- * Implement hook_form_user_admin_permissions_alter().
- *
- * @ingroup logintoboggan_core
- */
-function logintoboggan_form_user_admin_permissions_alter(&$form, &$form_state) {
- // If the pre-auth role isn't the auth user, then add it as a setting.
- $id = logintoboggan_validating_id();
- if ($id != DRUPAL_AUTHENTICATED_RID) {
- $form['#attached']['js'][] = array(
- 'data' => array(
- 'LoginToboggan' => array(
- 'preAuthID' => $id,
- ),
- ),
- 'type' => 'setting',
- );
- }
-}
-
-/**
* Implement hook_form_alter().
*
* @ingroup logintoboggan_core
@@ -410,7 +390,10 @@ function logintoboggan_js_alter(&$javascript) {
// prevent the pre-auth role's checkboxes from being automatically disabled
// when the auth user's checkboxes are checked.
if ($id != DRUPAL_AUTHENTICATED_RID) {
- $javascript['modules/user/user.permissions.js']['data'] = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
+ $javascript['settings']['data'][] = array('LoginToboggan' => array('preAuthID' => $id));
+ $file = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
+ $javascript[$file] = drupal_js_defaults($file);
+ $javascript[$file]['weight'] = 999;
}
}
}
diff --git a/logintoboggan.permissions.js b/logintoboggan.permissions.js
index 1d406cc..492b64c 100644
--- a/logintoboggan.permissions.js
+++ b/logintoboggan.permissions.js
@@ -1,77 +1,25 @@
/**
- * This is a custom implementation of user.permissions.js, which is necessary
- * because LoginToboggan needs its pre-auth role to not be explicitly tied to
- * the auth role. The change is minor -- simply exclude the pre-auth role from
- * all the auto-checking as the anon and auth user roles are.
+ * LoginToboggan needs its pre-auth role to not be explicitly tied to
+ * the auth role.
*/
-
(function ($) {
/**
* Shows checked and disabled checkboxes for inherited permissions.
*/
-Drupal.behaviors.permissions = {
- attach: function (context) {
- var self = this;
- $('table#permissions').once('permissions', function () {
- // On a site with many roles and permissions, this behavior initially has
- // to perform thousands of DOM manipulations to inject checkboxes and hide
- // them. By detaching the table from the DOM, all operations can be
- // performed without triggering internal layout and re-rendering processes
- // in the browser.
- var $table = $(this);
- if ($table.prev().length) {
- var $ancestor = $table.prev(), method = 'after';
- }
- else {
- var $ancestor = $table.parent(), method = 'append';
- }
- $table.detach();
-
- // Create dummy checkboxes. We use dummy checkboxes instead of reusing
- // the existing checkboxes here because new checkboxes don't alter the
- // submitted form. If we'd automatically check existing checkboxes, the
- // permission table would be polluted with redundant entries. This
- // is deliberate, but desirable when we automatically check them.
- var $dummy = $('<input type="checkbox" class="dummy-checkbox" disabled="disabled" checked="checked" />')
- .attr('title', Drupal.t("This permission is inherited from the authenticated user role."))
- .hide();
-
- $('input[type=checkbox]', this).not('.rid-2, .rid-1, .rid-' + Drupal.settings.LoginToboggan.preAuthID).addClass('real-checkbox').each(function () {
- $dummy.clone().insertAfter(this);
+Drupal.behaviors.LoginTobogganPermissions = {
+ attach: function (context, settings) {
+ // Revert changes made by modules/user/user.permissions.js
+ $('table#permissions', context).once('tobogganPermissions', function () {
+ $('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
+ $(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
-
- // Initialize the authenticated user checkbox.
- $('input[type=checkbox].rid-2', this)
- .bind('click.permissions', self.toggle)
- // .triggerHandler() cannot be used here, as it only affects the first
- // element.
- .each(self.toggle);
-
- // Re-insert the table into the DOM.
- $ancestor[method]($table);
});
},
-
- /**
- * Toggles all dummy checkboxes based on the checkboxes' state.
- *
- * If the "authenticated user" checkbox is checked, the checked and disabled
- * checkboxes are shown, the real checkboxes otherwise.
- */
- toggle: function () {
- var authCheckbox = this, $row = $(this).closest('tr');
- // jQuery performs too many layout calculations for .hide() and .show(),
- // leading to a major page rendering lag on sites with many roles and
- // permissions. Therefore, we toggle visibility directly.
- $row.find('.real-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? 'none' : '');
- });
- $row.find('.dummy-checkbox').each(function () {
- this.style.display = (authCheckbox.checked ? '' : 'none');
- });
- }
};
})(jQuery);
@@ -305,26 +305,6 @@ function logintoboggan_form_user_pass_reset_alter(&$form, &$form_state) {
}
}
/**
* Implement hook_form_user_admin_permissions_alter().
*
* @ingroup logintoboggan_core
*/
function logintoboggan_form_user_admin_permissions_alter(&$form, &$form_state) {
// If the pre-auth role isn't the auth user, then add it as a setting.
$id = logintoboggan_validating_id();
if ($id != DRUPAL_AUTHENTICATED_RID) {
$form['#attached']['js'][] = array(
'data' => array(
'LoginToboggan' => array(
'preAuthID' => $id,
),
),
'type' => 'setting',
);
}
}
/**
* Implement hook_form_alter().
*
@@ -410,7 +390,10 @@ function logintoboggan_js_alter(&$javascript) {
// prevent the pre-auth role's checkboxes from being automatically disabled
// when the auth user's checkboxes are checked.
if ($id != DRUPAL_AUTHENTICATED_RID) {
$javascript['modules/user/user.permissions.js']['data'] = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
$javascript['settings']['data'][] = array('LoginToboggan' => array('preAuthID' => $id));
$file = drupal_get_path('module', 'logintoboggan') . '/logintoboggan.permissions.js';
$javascript[$file] = drupal_js_defaults($file);
$javascript[$file]['weight'] = 999;
}
}
}
@@ -1,77 +1,25 @@
/**
* This is a custom implementation of user.permissions.js, which is necessary
* because LoginToboggan needs its pre-auth role to not be explicitly tied to
* the auth role. The change is minor -- simply exclude the pre-auth role from
* all the auto-checking as the anon and auth user roles are.
* LoginToboggan needs its pre-auth role to not be explicitly tied to
* the auth role.
*/
(function ($) {
/**
* Shows checked and disabled checkboxes for inherited permissions.
*/
Drupal.behaviors.permissions = {
attach: function (context) {
var self = this;
$('table#permissions').once('permissions', function () {
// On a site with many roles and permissions, this behavior initially has
// to perform thousands of DOM manipulations to inject checkboxes and hide
// them. By detaching the table from the DOM, all operations can be
// performed without triggering internal layout and re-rendering processes
// in the browser.
var $table = $(this);
if ($table.prev().length) {
var $ancestor = $table.prev(), method = 'after';
}
else {
var $ancestor = $table.parent(), method = 'append';
}
$table.detach();
// Create dummy checkboxes. We use dummy checkboxes instead of reusing
// the existing checkboxes here because new checkboxes don't alter the
// submitted form. If we'd automatically check existing checkboxes, the
// permission table would be polluted with redundant entries. This
// is deliberate, but desirable when we automatically check them.
var $dummy = $('<input type="checkbox" class="dummy-checkbox" disabled="disabled" checked="checked" />')
.attr('title', Drupal.t("This permission is inherited from the authenticated user role."))
.hide();
$('input[type=checkbox]', this).not('.rid-2, .rid-1, .rid-' + Drupal.settings.LoginToboggan.preAuthID).addClass('real-checkbox').each(function () {
$dummy.clone().insertAfter(this);
Drupal.behaviors.LoginTobogganPermissions = {
attach: function (context, settings) {
// Revert changes made by modules/user/user.permissions.js
$('table#permissions', context).once('tobogganPermissions', function () {
$('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
$(this).next().filter('.dummy-checkbox').remove();
$('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
this.style.display = '';
});
});
// Initialize the authenticated user checkbox.
$('input[type=checkbox].rid-2', this)
.bind('click.permissions', self.toggle)
// .triggerHandler() cannot be used here, as it only affects the first
// element.
.each(self.toggle);
// Re-insert the table into the DOM.
$ancestor[method]($table);
});
},
/**
* Toggles all dummy checkboxes based on the checkboxes' state.
*
* If the "authenticated user" checkbox is checked, the checked and disabled
* checkboxes are shown, the real checkboxes otherwise.
*/
toggle: function () {
var authCheckbox = this, $row = $(this).closest('tr');
// jQuery performs too many layout calculations for .hide() and .show(),
// leading to a major page rendering lag on sites with many roles and
// permissions. Therefore, we toggle visibility directly.
$row.find('.real-checkbox').each(function () {
this.style.display = (authCheckbox.checked ? 'none' : '');
});
$row.find('.dummy-checkbox').each(function () {
this.style.display = (authCheckbox.checked ? '' : 'none');
});
}
};
})(jQuery);
@@ -0,0 +1,12 @@
--- logintoboggan.permissions.js
+++ logintoboggan.permissions.js
@@ -14,6 +14,9 @@ Drupal.behaviors.LoginTobogganPermissions = {
$('table#permissions', context).once('tobogganPermissions', function () {
$('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
$(this).next().filter('.dummy-checkbox').remove();
+ $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
+ this.style.display = '';
+ });
});
});
},
@@ -18,7 +18,7 @@ function mailing_default_elysia_cron_rules() {
$cron_rule->rule = '* * * * *';
$cron_rule->weight = -11;
$cron_rule->context = 'mailing';
$cron_rules[''] = $cron_rule;
$cron_rules['simplenews_cron'] = $cron_rule;
$cron_rule = new stdClass;
$cron_rule->disabled = FALSE; /* Edit this to true to make a default cron_rule disabled initially */
@@ -28,7 +28,7 @@ function mailing_default_elysia_cron_rules() {
$cron_rule->rule = '* * * * *';
$cron_rule->weight = NULL;
$cron_rule->context = NULL;
$cron_rules[''] = $cron_rule;
$cron_rules['simplenews_scheduler_cron'] = $cron_rule;
return $cron_rules;
@@ -171,6 +171,47 @@ table[width|cellpadding|cellspacing|border], tr[align|valign], td[align|valign|w
'video_filter_autoplay' => 1,
'video_filter_related' => 0,
'video_filter_html5' => 1,
'video_filter_codecs' => array(
'archive' => 'Archive.org',
'bliptv' => 'Blip.tv',
'candidcareer' => 'Candid Career',
'capped' => 'Capped',
'collegehumor' => 'College Humor',
'coub' => 'Coub',
'dailymotion' => 'DailyMotion',
'democracynow_fullshow' => 'DemocracyNow Fullshow',
'democracynow_story' => 'DemocracyNow Story',
'flickr_slideshows' => 'Flickr Slideshows',
'flickr_video' => 'Flickr Video',
'foxnews' => 'Fox News',
'gametrailers' => 'Game Trailers',
'gamevideos' => 'Game Videos',
'giphy' => 'Giphy',
'godtube' => 'GodTube',
'google' => 'Google Video',
'instagram' => 'Instagram',
'metacafe' => 'Meta Cafe',
'mailru' => 'Mail.Ru',
'myspace' => 'MySpace',
'myvideo' => 'MyVideo',
'picasa_slideshows' => 'Picasa Slideshows',
'rutube' => 'Rutube',
'slideshare' => 'Slideshare',
'streamhoster' => 'Streamhoster',
'teachertube' => 'Teachertube',
'ted' => 'TED',
'twitch' => 'Twitch',
'ustream' => 'Ustream',
'vbox' => 'Vbox7',
'vimeo' => 'Vimeo',
'vine' => 'Vine',
'whatchado' => 'whatchado',
'wistia' => 'Wistia',
'youku' => 'YouKu',
'youtube' => 'YouTube',
'youtube_playlist' => 'YouTube (Playlist)',
),
'video_filter_multiple_sources' => TRUE,
),
),
'pathologic' => array(
@@ -18,7 +18,7 @@ function materio_administration_default_elysia_cron_rules() {
$cron_rule->rule = NULL;
$cron_rule->weight = NULL;
$cron_rule->context = NULL;
$cron_rules[''] = $cron_rule;
$cron_rules['workflow_cron'] = $cron_rule;
return $cron_rules;
@@ -22,3 +22,144 @@ function materio_administration_ctools_plugin_api($module = NULL, $api = NULL) {
function materio_administration_views_api($module = NULL, $api = NULL) {
return array("api" => "3.0");
}
/**
* Implements hook_workflow_default_workflows().
*/
function materio_administration_workflow_default_workflows() {
$workflows = array();
// Exported workflow: Publication
$workflows['Publication'] = array(
'name' => 'Publication',
'tab_roles' => '',
'options' => 'a:4:{s:16:"comment_log_node";i:0;s:15:"comment_log_tab";i:0;s:13:"name_as_title";i:0;s:12:"watchdog_log";i:1;}',
'states' => array(
0 => array(
'state' => '(creation)',
'weight' => -50,
'sysid' => 1,
'status' => 1,
'name' => 'Publication',
),
1 => array(
'state' => 'Importé',
'weight' => 0,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
2 => array(
'state' => 'Édité',
'weight' => 1,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
3 => array(
'state' => 'Masqué',
'weight' => 2,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
4 => array(
'state' => 'Publié',
'weight' => 3,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
),
'transitions' => array(
0 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Masqué',
),
1 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Publié',
),
2 => array(
'roles' => 'root',
'state' => '(creation)',
'target_state' => 'Importé',
),
3 => array(
'roles' => 'administrator,root',
'state' => 'Importé',
'target_state' => 'Édité',
),
4 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Masqué',
),
5 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Publié',
),
6 => array(
'roles' => 'root',
'state' => 'Édité',
'target_state' => 'Importé',
),
7 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Masqué',
),
8 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Publié',
),
9 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Publié',
),
10 => array(
'roles' => 'root',
'state' => 'Masqué',
'target_state' => 'Importé',
),
11 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Édité',
),
12 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Masqué',
),
13 => array(
'roles' => 'root',
'state' => 'Publié',
'target_state' => 'Importé',
),
14 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Édité',
),
),
'node_types' => array(
0 => 'breve',
1 => 'company',
2 => 'didactique',
3 => 'faq',
4 => 'looping_embed_video',
5 => 'materiau',
6 => 'page',
7 => 'publication',
8 => 'simplenews',
),
);
return $workflows;
}
@@ -14,9 +14,8 @@ function materio_administration_user_default_permissions() {
$permissions['access admin theme'] = array(
'name' => 'access admin theme',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -27,15 +26,44 @@ function materio_administration_user_default_permissions() {
$permissions['access administration menu'] = array(
'name' => 'access administration menu',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'admin_menu',
);
// Exported permission: 'access content'.
$permissions['access content'] = array(
'name' => 'access content',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
'Translator' => 'Translator',
'Unverified' => 'Unverified',
'Utilisateur' => 'Utilisateur',
'administrator' => 'administrator',
'anonymous user' => 'anonymous user',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'access content overview'.
$permissions['access content overview'] = array(
'name' => 'access content overview',
'roles' => array(
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'access workflow summary views'.
$permissions['access workflow summary views'] = array(
'name' => 'access workflow summary views',
@@ -93,6 +121,15 @@ function materio_administration_user_default_permissions() {
'module' => 'translate_perms',
);
// Exported permission: 'administer content types'.
$permissions['administer content types'] = array(
'name' => 'administer content types',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'administer entity translation'.
$permissions['administer entity translation'] = array(
'name' => 'administer entity translation',
@@ -102,6 +139,24 @@ function materio_administration_user_default_permissions() {
'module' => 'entity_translation',
);
// Exported permission: 'administer login destination settings'.
$permissions['administer login destination settings'] = array(
'name' => 'administer login destination settings',
'roles' => array(
'root' => 'root',
),
'module' => 'login_destination',
);
// Exported permission: 'administer nodes'.
$permissions['administer nodes'] = array(
'name' => 'administer nodes',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'administer remove_duplicates'.
$permissions['administer remove_duplicates'] = array(
'name' => 'administer remove_duplicates',
@@ -112,6 +167,15 @@ function materio_administration_user_default_permissions() {
'module' => 'remove_duplicates',
);
// Exported permission: 'administer themes'.
$permissions['administer themes'] = array(
'name' => 'administer themes',
'roles' => array(
'root' => 'root',
),
'module' => 'system',
);
// Exported permission: 'administer workflow'.
$permissions['administer workflow'] = array(
'name' => 'administer workflow',
@@ -210,6 +274,108 @@ function materio_administration_user_default_permissions() {
'module' => 'role_delegation',
);
// Exported permission: 'bypass node access'.
$permissions['bypass node access'] = array(
'name' => 'bypass node access',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'create breve content'.
$permissions['create breve content'] = array(
'name' => 'create breve content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'create looping_embed_video content'.
$permissions['create looping_embed_video content'] = array(
'name' => 'create looping_embed_video content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'create materiau content'.
$permissions['create materiau content'] = array(
'name' => 'create materiau content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete any breve content'.
$permissions['delete any breve content'] = array(
'name' => 'delete any breve content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete any looping_embed_video content'.
$permissions['delete any looping_embed_video content'] = array(
'name' => 'delete any looping_embed_video content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete any materiau content'.
$permissions['delete any materiau content'] = array(
'name' => 'delete any materiau content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete own breve content'.
$permissions['delete own breve content'] = array(
'name' => 'delete own breve content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete own looping_embed_video content'.
$permissions['delete own looping_embed_video content'] = array(
'name' => 'delete own looping_embed_video content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete own materiau content'.
$permissions['delete own materiau content'] = array(
'name' => 'delete own materiau content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'delete revisions'.
$permissions['delete revisions'] = array(
'name' => 'delete revisions',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'display drupal links'.
$permissions['display drupal links'] = array(
'name' => 'display drupal links',
@@ -219,6 +385,36 @@ function materio_administration_user_default_permissions() {
'module' => 'admin_menu',
);
// Exported permission: 'edit any breve content'.
$permissions['edit any breve content'] = array(
'name' => 'edit any breve content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit any looping_embed_video content'.
$permissions['edit any looping_embed_video content'] = array(
'name' => 'edit any looping_embed_video content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit any materiau content'.
$permissions['edit any materiau content'] = array(
'name' => 'edit any materiau content',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit node original values'.
$permissions['edit node original values'] = array(
'name' => 'edit node original values',
@@ -233,6 +429,8 @@ function materio_administration_user_default_permissions() {
$permissions['edit node translation shared fields'] = array(
'name' => 'edit node translation shared fields',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -243,12 +441,42 @@ function materio_administration_user_default_permissions() {
$permissions['edit original values'] = array(
'name' => 'edit original values',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'entity_translation',
);
// Exported permission: 'edit own breve content'.
$permissions['edit own breve content'] = array(
'name' => 'edit own breve content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit own looping_embed_video content'.
$permissions['edit own looping_embed_video content'] = array(
'name' => 'edit own looping_embed_video content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit own materiau content'.
$permissions['edit own materiau content'] = array(
'name' => 'edit own materiau content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit taxonomy_term original values'.
$permissions['edit taxonomy_term original values'] = array(
'name' => 'edit taxonomy_term original values',
@@ -273,6 +501,8 @@ function materio_administration_user_default_permissions() {
$permissions['edit translation shared fields'] = array(
'name' => 'edit translation shared fields',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -311,12 +541,11 @@ function materio_administration_user_default_permissions() {
'name' => 'participate in workflow',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'Translator' => 'Translator',
'Unverified' => 'Unverified',
'Utilisateur' => 'Utilisateur',
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
@@ -337,6 +566,16 @@ function materio_administration_user_default_permissions() {
'module' => 'translate_perms',
);
// Exported permission: 'revert revisions'.
$permissions['revert revisions'] = array(
'name' => 'revert revisions',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'schedule workflow transitions'.
$permissions['schedule workflow transitions'] = array(
'name' => 'schedule workflow transitions',
@@ -400,29 +639,6 @@ function materio_administration_user_default_permissions() {
'module' => 'materio_user',
);
// Exported permission: 'subscribe to simplenews category 6374'.
$permissions['subscribe to simplenews category 6374'] = array(
'name' => 'subscribe to simplenews category 6374',
'roles' => array(
'Adhérent' => 'Adhérent',
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'materio_user',
);
// Exported permission: 'subscribe to simplenews category 6585'.
$permissions['subscribe to simplenews category 6585'] = array(
'name' => 'subscribe to simplenews category 6585',
'roles' => array(
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'materio_user',
);
// Exported permission: 'toggle field translatability'.
$permissions['toggle field translatability'] = array(
'name' => 'toggle field translatability',
@@ -446,9 +662,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate any entity'] = array(
'name' => 'translate any entity',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -459,9 +672,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate content'] = array(
'name' => 'translate content',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -472,9 +682,7 @@ function materio_administration_user_default_permissions() {
$permissions['translate node entities'] = array(
'name' => 'translate node entities',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -485,9 +693,6 @@ function materio_administration_user_default_permissions() {
$permissions['translate taxonomy_term entities'] = array(
'name' => 'translate taxonomy_term entities',
'roles' => array(
'Translator CN' => 'Translator CN',
'Translator EN' => 'Translator EN',
'Translator FR' => 'Translator FR',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -523,5 +728,36 @@ function materio_administration_user_default_permissions() {
'module' => 'translate_perms',
);
// Exported permission: 'view own unpublished content'.
$permissions['view own unpublished content'] = array(
'name' => 'view own unpublished content',
'roles' => array(
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'view revisions'.
$permissions['view revisions'] = array(
'name' => 'view revisions',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'view the administration theme'.
$permissions['view the administration theme'] = array(
'name' => 'view the administration theme',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'system',
);
return $permissions;
}
@@ -0,0 +1,26 @@
<?php
/**
* @file
* materio_administration.features.user_role.inc
*/
/**
* Implements hook_user_default_roles().
*/
function materio_administration_user_default_roles() {
$roles = array();
// Exported role: utilisateur anonyme.
$roles['utilisateur anonyme'] = array(
'name' => 'utilisateur anonyme',
'weight' => 0,
);
// Exported role: utilisateur authentifié.
$roles['utilisateur authentifié'] = array(
'name' => 'utilisateur authentifié',
'weight' => 1,
);
return $roles;
}
@@ -0,0 +1,366 @@
<?php
/**
* @file
* materio_administration.features.workflow_access.inc
*/
/**
* Implements hook_workflow_access_features_default_settings().
*/
function materio_administration_workflow_access_features_default_settings() {
$workflows = array();
$workflows['Publication'] = array();
$workflows['Publication']['(creation)'] = array();
$workflows['Publication']['(creation)']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Utilisateur Alpha Tester'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Translator'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé'] = array();
$workflows['Publication']['Importé']['Admin showroom'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Utilisateur Alpha Tester'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Translator'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité'] = array();
$workflows['Publication']['Édité']['Student'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Adhérent'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Premium'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Admin showroom'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Utilisateur Alpha Tester'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Translator'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué'] = array();
$workflows['Publication']['Masqué']['Utilisateur Alpha Tester'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Admin showroom'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Translator'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié'] = array();
$workflows['Publication']['Publié']['utilisateur anonyme'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['utilisateur authentifié'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Unverified'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Utilisateur Alpha Tester'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Translator'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Admin showroom'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['administrator'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Publié']['root'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Publié']['workflow_features_author_name'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
return $workflows;
}
@@ -2,34 +2,24 @@ name = Materio Administration
core = 7.x
package = Materio
dependencies[] = admin
dependencies[] = admin_menu
dependencies[] = admin_menu_source
dependencies[] = admin_menu_toolbar
dependencies[] = admin_theme
dependencies[] = ctools
dependencies[] = elysia_cron
dependencies[] = entity_translation
dependencies[] = entity_translation_actions
dependencies[] = entity_translation_export_import
dependencies[] = features
dependencies[] = i18n_string
dependencies[] = login_destination
dependencies[] = logintoboggan
dependencies[] = logintoboggan_rules
dependencies[] = logintoboggan_variable
dependencies[] = materio_user
dependencies[] = menu
dependencies[] = remove_duplicates
dependencies[] = role_delegation
dependencies[] = simplenews
dependencies[] = strongarm
dependencies[] = taxonomy_csv
dependencies[] = taxonomy_wrangler
dependencies[] = title
dependencies[] = translate_perms
dependencies[] = translation
dependencies[] = views
dependencies[] = views_bulk_operations
dependencies[] = views_data_export
dependencies[] = workflow
dependencies[] = workflow_access
@@ -42,36 +32,79 @@ features[ctools][] = views:views_default:3.0
features[elysia_cron][] = workflow_cron
features[features_api][] = api:2
features[menu_custom][] = navigation
features[menu_links][] = navigation_:materio_search_api_ajax/actuality
features[menu_links][] = navigation_add-content:node/add
features[menu_links][] = navigation_add-user:admin/people/create
features[menu_links][] = navigation_adhsions:node/11186/webform-results
features[menu_links][] = navigation_ajouter-un-tag-libre:admin/structure/taxonomy/tag_libres/add
features[menu_links][] = navigation_breve:node/add/breve
features[menu_links][] = navigation_companies:admin/content/companies
features[menu_links][] = navigation_company:admin/structure/taxonomy_manager/voc/company
features[menu_links][] = navigation_company:node/add/company
features[menu_links][] = navigation_compose-tips:filter/tips
features[menu_links][] = navigation_customers:http://www.materio.com/fr/admin/store/customers
features[menu_links][] = navigation_content-types:admin/config/regional/translate/table/nodetype
features[menu_links][] = navigation_customers:admin/store/customers
features[menu_links][] = navigation_didactique:node/add/didactique
features[menu_links][] = navigation_duplicate-mails:admin/users/duplicatemails
features[menu_links][] = navigation_duplicates:admin/config/content/remove_duplicates
features[menu_links][] = navigation_faq:node/add/faq
features[menu_links][] = navigation_feedback:admin/reports/feedback
features[menu_links][] = navigation_formulaires-dadhsion:http://www.materio.com/fr/node/11186/webform-results
features[menu_links][] = navigation_frequently-asked-questions:faq-page
features[menu_links][] = navigation_gratuits:admin/users/gratuits
features[menu_links][] = navigation_industriels:admin/industriels
features[menu_links][] = navigation_industriels:admin/users/industriels
features[menu_links][] = navigation_ip-address-tracking:admin/reports/ip_tracking
features[menu_links][] = navigation_looping-embed-video:node/add/looping-embed-video
features[menu_links][] = navigation_mandrill:admin/reports/mandrill
features[menu_links][] = navigation_materiau:node/add/materiau
features[menu_links][] = navigation_members:admin/users/members
features[menu_links][] = navigation_menus:admin/config/regional/translate/table/menu
features[menu_links][] = navigation_merge-duplicates:admin/structure/taxonomy/tag_libres/merge/duplicates
features[menu_links][] = navigation_my-sessions:mysessions
features[menu_links][] = navigation_newletters:admin/content/simplenews
features[menu_links][] = navigation_node-export-import:node/add/node_export
features[menu_links][] = navigation_onthologie:admin/structure/taxonomy/onthologie
features[menu_links][] = navigation_onthologie:admin/structure/taxonomy_manager/voc/onthologie
features[menu_links][] = navigation_orders:admin/store/orders/view
features[menu_links][] = navigation_page:node/add/page
features[menu_links][] = navigation_pages--didactique--faq:admin/content/pages
features[menu_links][] = navigation_panneau:node/add/panel
features[menu_links][] = navigation_produit:node/add/product
features[menu_links][] = navigation_publication:node/add/publication
features[menu_links][] = navigation_reports:admin/store/reports
features[menu_links][] = navigation_shopping-cart:cart
features[menu_links][] = navigation_store:http://www.materio.com/fr/admin/store
features[menu_links][] = navigation_showrooms:admin/content/showrooms
features[menu_links][] = navigation_simplenews-newsletter:node/add/simplenews
features[menu_links][] = navigation_store:admin/store
features[menu_links][] = navigation_strings-search:admin/config/regional/translate/translate
features[menu_links][] = navigation_students:admin/students
features[menu_links][] = navigation_students:admin/users/students
features[menu_links][] = navigation_subscriptions-newsletter:admin/people/simplenews
features[menu_links][] = navigation_tag-libres:admin/structure/taxonomy/tag_libres
features[menu_links][] = navigation_tag-libres:admin/structure/taxonomy_manager/voc/tag_libres
features[menu_links][] = navigation_taxonomy-manager:admin/structure/taxonomy_manager/voc
features[menu_links][] = navigation_taxonomy:admin/config/regional/translate/table/taxonomy
features[menu_links][] = navigation_taxonomy:admin/structure/taxonomie/admin-taxo
features[menu_links][] = navigation_user-account:user
features[menu_links][] = navigation_users:admin/users
features[menu_links][] = navigation_webform:node/add/webform
features[user_permission][] = access admin theme
features[user_permission][] = access administration menu
features[user_permission][] = access content
features[user_permission][] = access content overview
features[user_permission][] = access workflow summary views
features[user_permission][] = access_translation_table_content_type
features[user_permission][] = access_translation_table_fields
features[user_permission][] = access_translation_table_menu
features[user_permission][] = access_translation_table_taxonomy
features[user_permission][] = access_translations_overview
features[user_permission][] = administer content types
features[user_permission][] = administer entity translation
features[user_permission][] = administer login destination settings
features[user_permission][] = administer nodes
features[user_permission][] = administer remove_duplicates
features[user_permission][] = administer themes
features[user_permission][] = administer workflow
features[user_permission][] = assign Adhérent role
features[user_permission][] = assign Contact opérationnel role
@@ -82,10 +115,27 @@ features[user_permission][] = assign Utilisateur Alpha Tester role
features[user_permission][] = assign Utilisateur role
features[user_permission][] = assign administrator role
features[user_permission][] = assign all roles
features[user_permission][] = bypass node access
features[user_permission][] = create breve content
features[user_permission][] = create looping_embed_video content
features[user_permission][] = create materiau content
features[user_permission][] = delete any breve content
features[user_permission][] = delete any looping_embed_video content
features[user_permission][] = delete any materiau content
features[user_permission][] = delete own breve content
features[user_permission][] = delete own looping_embed_video content
features[user_permission][] = delete own materiau content
features[user_permission][] = delete revisions
features[user_permission][] = display drupal links
features[user_permission][] = edit any breve content
features[user_permission][] = edit any looping_embed_video content
features[user_permission][] = edit any materiau content
features[user_permission][] = edit node original values
features[user_permission][] = edit node translation shared fields
features[user_permission][] = edit original values
features[user_permission][] = edit own breve content
features[user_permission][] = edit own looping_embed_video content
features[user_permission][] = edit own materiau content
features[user_permission][] = edit taxonomy_term original values
features[user_permission][] = edit taxonomy_term translation shared fields
features[user_permission][] = edit translation shared fields
@@ -94,14 +144,13 @@ features[user_permission][] = flush caches
features[user_permission][] = import_translations
features[user_permission][] = participate in workflow
features[user_permission][] = refresh_strings
features[user_permission][] = revert revisions
features[user_permission][] = schedule workflow transitions
features[user_permission][] = select different theme
features[user_permission][] = send newsletter
features[user_permission][] = show workflow state form
features[user_permission][] = subscribe to newsletters
features[user_permission][] = subscribe to simplenews category 6274
features[user_permission][] = subscribe to simplenews category 6374
features[user_permission][] = subscribe to simplenews category 6585
features[user_permission][] = toggle field translatability
features[user_permission][] = translate admin strings
features[user_permission][] = translate any entity
@@ -111,6 +160,11 @@ features[user_permission][] = translate taxonomy_term entities
features[user_permission][] = translate user-defined strings
features[user_permission][] = translate_strings
features[user_permission][] = update_modules_translations
features[user_permission][] = view own unpublished content
features[user_permission][] = view revisions
features[user_permission][] = view the administration theme
features[user_role][] = utilisateur anonyme
features[user_role][] = utilisateur authentifié
features[variable][] = admin_menu_cache_client
features[variable][] = admin_menu_devel_modules_enabled
features[variable][] = admin_menu_devel_modules_skip
@@ -118,9 +172,11 @@ features[variable][] = admin_menu_display
features[variable][] = admin_menu_margin_top
features[variable][] = admin_menu_position_fixed
features[variable][] = admin_menu_show_all
features[variable][] = admin_menu_source_settings
features[variable][] = admin_menu_tweak_modules
features[variable][] = admin_menu_tweak_permissions
features[variable][] = admin_menu_tweak_tabs
features[variable][] = admin_theme
features[variable][] = content_type_extras_title_hide_breve
features[variable][] = content_type_extras_title_hide_company
features[variable][] = content_type_extras_title_hide_didactique
@@ -200,4 +256,18 @@ features[views_view][] = admin_contents
features[views_view][] = admin_peoples
features[views_view][] = admin_taxo
features[views_view][] = taxonomy_companies_manager
features[workflow][] = Publication
features[workflow_access][] = Publication
features_exclude[dependencies][materio_publications] = materio_publications
features_exclude[dependencies][materio_subscriptions] = materio_subscriptions
features_exclude[dependencies][admin_menu] = admin_menu
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][entity_translation] = entity_translation
features_exclude[dependencies][menu] = menu
features_exclude[dependencies][role_delegation] = role_delegation
features_exclude[dependencies][strongarm] = strongarm
features_exclude[dependencies][translations] = translations
features_exclude[dependencies][showroom] = showroom
features_exclude[user_role][Translator] = Translator
features_exclude[user_role][Admin showroom] = Admin showroom
project path = sites/all/modules/features
@@ -71,6 +71,53 @@ function materio_administration_strongarm() {
$strongarm->value = 0;
$export['admin_menu_show_all'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'admin_menu_source_settings';
$strongarm->value = array(
1 => array(
'source' => '',
),
2 => array(
'source' => '',
),
9 => array(
'source' => '',
),
7 => array(
'source' => '',
),
10 => array(
'source' => '',
),
11 => array(
'source' => '',
),
6 => array(
'source' => '',
),
5 => array(
'source' => '',
),
8 => array(
'source' => '',
),
12 => array(
'source' => 'navigation',
),
3 => array(
'source' => 'navigation',
),
4 => array(
'source' => '',
),
13 => array(
'source' => 'navigation',
),
);
$export['admin_menu_source_settings'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -92,6 +139,13 @@ function materio_administration_strongarm() {
$strongarm->value = 0;
$export['admin_menu_tweak_tabs'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'admin_theme';
$strongarm->value = 'guibik';
$export['admin_theme'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -127,6 +181,7 @@ function materio_administration_strongarm() {
$strongarm->value = array(
'node' => 'node',
'taxonomy_term' => 'taxonomy_term',
'field_collection_item' => 0,
'user' => 0,
);
$export['entity_translation_entity_types'] = $strongarm;
@@ -112,7 +112,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'entity_types' => array(),
'field_name' => 'field_breve_ref',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'target_id' => array(
@@ -131,9 +131,6 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
),
),
'sort' => array(
'direction' => 'ASC',
'field' => 'body:value',
'property' => 'nid',
'type' => 'none',
),
'target_bundles' => array(
@@ -418,7 +415,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
// Exported field_base: 'field_localisation'.
$field_bases['field_localisation'] = array(
'active' => 1,
'cardinality' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_localisation',
@@ -449,7 +446,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'entity_types' => array(),
'field_name' => 'field_materiau_image',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'fid' => array(
@@ -517,6 +514,9 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_nature_titre',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'format' => array(
0 => 'format',
@@ -527,6 +527,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'settings' => array(
'entity_translation_sync' => FALSE,
'max_length' => 255,
'profile2_private' => FALSE,
),
'translatable' => 1,
'type' => 'text',
@@ -574,7 +575,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'entity_types' => array(),
'field_name' => 'field_onthologie',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'tid' => array(
@@ -743,7 +744,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'entity_types' => array(),
'field_name' => 'field_tags_libres',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'tid' => array(
@@ -808,36 +809,6 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'type' => 'taxonomy_term_reference',
);
// Exported field_base: 'field_used_on_advanced_search'.
$field_bases['field_used_on_advanced_search'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_used_on_advanced_search',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'value' => array(
0 => 'value',
),
),
'locked' => 0,
'module' => 'list',
'settings' => array(
'allowed_values' => array(
0 => 0,
1 => 1,
),
'allowed_values_function' => '',
'entity_translation_sync' => FALSE,
'profile2_private' => FALSE,
),
'translatable' => 0,
'type' => 'list_boolean',
);
// Exported field_base: 'field_video_filter'.
$field_bases['field_video_filter'] = array(
'active' => 1,
@@ -846,7 +817,7 @@ $entity_field[0][\'value\'] = format_date($entity->created, \'breves\');',
'entity_types' => array(),
'field_name' => 'field_video_filter',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'height' => array(
@@ -1036,7 +1007,7 @@ foreach ($states as $state) {
'entity_types' => array(),
'field_name' => 'title_field',
'field_permissions' => array(
'type' => 0,
'type' => 2,
),
'indexes' => array(
'format' => array(
@@ -182,7 +182,7 @@ function materio_content_types_field_default_field_instances() {
'formatter_settings' => array(),
),
'type' => 'field_extrawidgets_read_only',
'weight' => 21,
'weight' => 7,
),
);
@@ -356,7 +356,7 @@ function materio_content_types_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 4,
'weight' => 5,
),
);
@@ -928,7 +928,7 @@ function materio_content_types_field_default_field_instances() {
'formatter_settings' => array(),
),
'type' => 'field_extrawidgets_read_only',
'weight' => 23,
'weight' => 8,
),
);
@@ -2301,14 +2301,14 @@ function materio_content_types_field_default_field_instances() {
'module' => 'file',
'settings' => array(),
'type' => 'file_default',
'weight' => 17,
'weight' => 18,
),
'cardmedium' => array(
'label' => 'hidden',
'module' => 'file',
'settings' => array(),
'type' => 'file_default',
'weight' => 12,
'weight' => 23,
),
'cardsmall' => array(
'label' => 'above',
@@ -2382,7 +2382,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 9,
'weight' => 12,
),
'cardfull' => array(
'label' => 'above',
@@ -2394,7 +2394,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 13,
'weight' => 16,
),
'cardsmall' => array(
'label' => 'above',
@@ -2447,7 +2447,7 @@ function materio_content_types_field_default_field_instances() {
'size' => 60,
),
'type' => 'entityreference_autocomplete',
'weight' => 28,
'weight' => 10,
),
);
@@ -2480,7 +2480,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'cardfull',
),
'type' => 'tode',
'weight' => 19,
'weight' => 20,
),
'cardmedium' => array(
'label' => 'above',
@@ -2489,7 +2489,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'cardmedium',
),
'type' => 'tode',
'weight' => 10,
'weight' => 23,
),
'cardsmall' => array(
'label' => 'above',
@@ -2517,7 +2517,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'print',
),
'type' => 'tode',
'weight' => 8,
'weight' => 9,
),
'teaser' => array(
'label' => 'above',
@@ -2577,7 +2577,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'cardfull',
),
'type' => 'tode',
'weight' => 18,
'weight' => 19,
),
'cardmedium' => array(
'label' => 'above',
@@ -2586,7 +2586,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'cardmedium',
),
'type' => 'tode',
'weight' => 9,
'weight' => 22,
),
'cardsmall' => array(
'label' => 'above',
@@ -2614,7 +2614,7 @@ function materio_content_types_field_default_field_instances() {
'viewmode' => 'print',
),
'type' => 'tode',
'weight' => 7,
'weight' => 8,
),
'teaser' => array(
'label' => 'above',
@@ -2730,7 +2730,7 @@ function materio_content_types_field_default_field_instances() {
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => -3,
'weight' => -2,
),
);
@@ -2751,7 +2751,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 8,
'weight' => 11,
),
'cardfull' => array(
'label' => 'above',
@@ -2763,7 +2763,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 6,
'weight' => 11,
),
'cardsmall' => array(
'label' => 'above',
@@ -2832,7 +2832,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 7,
'weight' => 10,
),
'cardfull' => array(
'label' => 'above',
@@ -2844,7 +2844,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 7,
'weight' => 12,
),
'cardsmall' => array(
'label' => 'above',
@@ -2891,7 +2891,7 @@ function materio_content_types_field_default_field_instances() {
'module' => 'computed_field',
'settings' => array(),
'type' => 'computed',
'weight' => 2,
'weight' => 3,
),
);
@@ -2910,31 +2910,27 @@ function materio_content_types_field_default_field_instances() {
),
'cardbig' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'type' => 'hidden',
'weight' => 8,
),
'cardfull' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'type' => 'hidden',
'weight' => 19,
),
'cardmedium' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 21,
'type' => 'hidden',
'weight' => 17,
),
'cardsmall' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_plain',
'weight' => 8,
'type' => 'hidden',
'weight' => 9,
),
'default' => array(
'label' => 'hidden',
@@ -2951,9 +2947,8 @@ function materio_content_types_field_default_field_instances() {
),
'print' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_plain',
'type' => 'hidden',
'weight' => 5,
),
'teaser' => array(
@@ -2979,7 +2974,7 @@ function materio_content_types_field_default_field_instances() {
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 4,
'weight' => -3,
),
);
@@ -3129,7 +3124,7 @@ function materio_content_types_field_default_field_instances() {
'link' => 1,
),
'type' => 'entityreference_label',
'weight' => 20,
'weight' => 21,
),
'cardmedium' => array(
'label' => 'above',
@@ -3138,7 +3133,7 @@ function materio_content_types_field_default_field_instances() {
'link' => 1,
),
'type' => 'entityreference_label',
'weight' => 13,
'weight' => 24,
),
'cardsmall' => array(
'label' => 'above',
@@ -3191,7 +3186,7 @@ function materio_content_types_field_default_field_instances() {
'size' => 60,
),
'type' => 'entityreference_autocomplete',
'weight' => 27,
'weight' => 9,
),
);
@@ -3212,7 +3207,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 11,
'weight' => 14,
),
'cardfull' => array(
'label' => 'above',
@@ -3224,7 +3219,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 9,
'weight' => 14,
),
'cardsmall' => array(
'label' => 'above',
@@ -3388,7 +3383,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 10,
'weight' => 13,
),
'cardfull' => array(
'label' => 'above',
@@ -3400,7 +3395,7 @@ function materio_content_types_field_default_field_instances() {
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 8,
'weight' => 13,
),
'cardsmall' => array(
'label' => 'above',
@@ -3545,7 +3540,7 @@ function materio_content_types_field_default_field_instances() {
'module' => 'computed_field',
'settings' => array(),
'type' => 'computed',
'weight' => 3,
'weight' => 4,
),
);
@@ -3567,7 +3562,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 5,
'weight' => 9,
),
'cardfull' => array(
'label' => 'above',
@@ -3579,7 +3574,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 11,
'weight' => 15,
),
'cardsmall' => array(
'label' => 'above',
@@ -3626,12 +3621,12 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'module' => 'synonyms',
'settings' => array(
'auto_creation' => 0,
'autocomplete_path' => 'synonyms/autocomplete',
'size' => 60,
'suggest_only_unique' => 0,
'suggestion_size' => 10,
'synonyms_autocomplete_path' => 'synonyms/autocomplete-taxonomy-term',
),
'type' => 'synonyms_autocomplete',
'type' => 'synonyms_autocomplete_taxonomy_term',
'weight' => 23,
),
);
@@ -3653,7 +3648,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 3,
'weight' => 8,
),
'cardfull' => array(
'label' => 'above',
@@ -3665,7 +3660,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 8,
'weight' => 9,
),
'cardsmall' => array(
'label' => 'above',
@@ -3736,7 +3731,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'weight' => 6,
),
'cardfull' => array(
'label' => 'above',
@@ -3748,7 +3743,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'weight' => 10,
),
'cardsmall' => array(
'label' => 'above',
@@ -3798,7 +3793,7 @@ Vous devez avant d\'utiliser un nouveau tag le créer <a href="/admin/structure/
'formatter_settings' => array(),
),
'type' => 'field_extrawidgets_read_only',
'weight' => 29,
'weight' => 11,
),
);
@@ -15,6 +15,7 @@ function materio_content_types_user_default_permissions() {
'name' => 'access print',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Premium' => 'Premium',
'administrator' => 'administrator',
'root' => 'root',
@@ -59,6 +60,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_breve_ref'.
$permissions['create field_breve_ref'] = array(
'name' => 'create field_breve_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_company'.
$permissions['create field_company'] = array(
'name' => 'create field_company',
@@ -89,6 +100,15 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_department'.
$permissions['create field_department'] = array(
'name' => 'create field_department',
'roles' => array(
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_description'.
$permissions['create field_description'] = array(
'name' => 'create field_description',
@@ -143,6 +163,25 @@ function materio_content_types_user_default_permissions() {
// Exported permission: 'create field_localisation'.
$permissions['create field_localisation'] = array(
'name' => 'create field_localisation',
'roles' => array(
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_materiau_image'.
$permissions['create field_materiau_image'] = array(
'name' => 'create field_materiau_image',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_materiau_ref'.
$permissions['create field_materiau_ref'] = array(
'name' => 'create field_materiau_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
@@ -160,6 +199,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_nature_titre'.
$permissions['create field_nature_titre'] = array(
'name' => 'create field_nature_titre',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_note'.
$permissions['create field_note'] = array(
'name' => 'create field_note',
@@ -170,6 +219,46 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_onthologie'.
$permissions['create field_onthologie'] = array(
'name' => 'create field_onthologie',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_public_address'.
$permissions['create field_public_address'] = array(
'name' => 'create field_public_address',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_public_email'.
$permissions['create field_public_email'] = array(
'name' => 'create field_public_email',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_public_phone'.
$permissions['create field_public_phone'] = array(
'name' => 'create field_public_phone',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_reference_materio'.
$permissions['create field_reference_materio'] = array(
'name' => 'create field_reference_materio',
@@ -180,6 +269,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_tags_libres'.
$permissions['create field_tags_libres'] = array(
'name' => 'create field_tags_libres',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_tode_company'.
$permissions['create field_tode_company'] = array(
'name' => 'create field_tode_company',
@@ -190,6 +289,26 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_video_filter'.
$permissions['create field_video_filter'] = array(
'name' => 'create field_video_filter',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_website'.
$permissions['create field_website'] = array(
'name' => 'create field_website',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_weight'.
$permissions['create field_weight'] = array(
'name' => 'create field_weight',
@@ -209,6 +328,15 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create title_field'.
$permissions['create title_field'] = array(
'name' => 'create title_field',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_attachments'.
$permissions['edit field_attachments'] = array(
'name' => 'edit field_attachments',
@@ -219,6 +347,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_breve_ref'.
$permissions['edit field_breve_ref'] = array(
'name' => 'edit field_breve_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_company'.
$permissions['edit field_company'] = array(
'name' => 'edit field_company',
@@ -249,6 +387,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_department'.
$permissions['edit field_department'] = array(
'name' => 'edit field_department',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_description'.
$permissions['edit field_description'] = array(
'name' => 'edit field_description',
@@ -302,6 +450,25 @@ function materio_content_types_user_default_permissions() {
// Exported permission: 'edit field_localisation'.
$permissions['edit field_localisation'] = array(
'name' => 'edit field_localisation',
'roles' => array(
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_materiau_image'.
$permissions['edit field_materiau_image'] = array(
'name' => 'edit field_materiau_image',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_materiau_ref'.
$permissions['edit field_materiau_ref'] = array(
'name' => 'edit field_materiau_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
@@ -319,6 +486,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_nature_titre'.
$permissions['edit field_nature_titre'] = array(
'name' => 'edit field_nature_titre',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_note'.
$permissions['edit field_note'] = array(
'name' => 'edit field_note',
@@ -329,6 +506,46 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_onthologie'.
$permissions['edit field_onthologie'] = array(
'name' => 'edit field_onthologie',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_public_address'.
$permissions['edit field_public_address'] = array(
'name' => 'edit field_public_address',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_public_email'.
$permissions['edit field_public_email'] = array(
'name' => 'edit field_public_email',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_public_phone'.
$permissions['edit field_public_phone'] = array(
'name' => 'edit field_public_phone',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_reference_materio'.
$permissions['edit field_reference_materio'] = array(
'name' => 'edit field_reference_materio',
@@ -339,6 +556,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_tags_libres'.
$permissions['edit field_tags_libres'] = array(
'name' => 'edit field_tags_libres',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_tode_company'.
$permissions['edit field_tode_company'] = array(
'name' => 'edit field_tode_company',
@@ -349,6 +576,26 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_video_filter'.
$permissions['edit field_video_filter'] = array(
'name' => 'edit field_video_filter',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_website'.
$permissions['edit field_website'] = array(
'name' => 'edit field_website',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_weight'.
$permissions['edit field_weight'] = array(
'name' => 'edit field_weight',
@@ -377,6 +624,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_breve_ref'.
$permissions['edit own field_breve_ref'] = array(
'name' => 'edit own field_breve_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_company'.
$permissions['edit own field_company'] = array(
'name' => 'edit own field_company',
@@ -406,6 +663,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_department'.
$permissions['edit own field_department'] = array(
'name' => 'edit own field_department',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_description'.
$permissions['edit own field_description'] = array(
'name' => 'edit own field_description',
@@ -464,10 +731,41 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_materiau_image'.
$permissions['edit own field_materiau_image'] = array(
'name' => 'edit own field_materiau_image',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_materiau_ref'.
$permissions['edit own field_materiau_ref'] = array(
'name' => 'edit own field_materiau_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_memo'.
$permissions['edit own field_memo'] = array(
'name' => 'edit own field_memo',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_nature_titre'.
$permissions['edit own field_nature_titre'] = array(
'name' => 'edit own field_nature_titre',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
@@ -482,6 +780,46 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_onthologie'.
$permissions['edit own field_onthologie'] = array(
'name' => 'edit own field_onthologie',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_public_address'.
$permissions['edit own field_public_address'] = array(
'name' => 'edit own field_public_address',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_public_email'.
$permissions['edit own field_public_email'] = array(
'name' => 'edit own field_public_email',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_public_phone'.
$permissions['edit own field_public_phone'] = array(
'name' => 'edit own field_public_phone',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_reference_materio'.
$permissions['edit own field_reference_materio'] = array(
'name' => 'edit own field_reference_materio',
@@ -491,6 +829,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_tags_libres'.
$permissions['edit own field_tags_libres'] = array(
'name' => 'edit own field_tags_libres',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_tode_company'.
$permissions['edit own field_tode_company'] = array(
'name' => 'edit own field_tode_company',
@@ -500,6 +848,26 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_video_filter'.
$permissions['edit own field_video_filter'] = array(
'name' => 'edit own field_video_filter',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_website'.
$permissions['edit own field_website'] = array(
'name' => 'edit own field_website',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_weight'.
$permissions['edit own field_weight'] = array(
'name' => 'edit own field_weight',
@@ -519,6 +887,24 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own title_field'.
$permissions['edit own title_field'] = array(
'name' => 'edit own title_field',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit title_field'.
$permissions['edit title_field'] = array(
'name' => 'edit title_field',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'field_permissions',
);
// Exported permission: 'node-specific print configuration'.
$permissions['node-specific print configuration'] = array(
'name' => 'node-specific print configuration',
@@ -533,6 +919,7 @@ function materio_content_types_user_default_permissions() {
'name' => 'show breve title',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
@@ -565,6 +952,7 @@ function materio_content_types_user_default_permissions() {
'name' => 'show materiau title',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
@@ -579,6 +967,7 @@ function materio_content_types_user_default_permissions() {
'name' => 'show page title',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
@@ -597,6 +986,7 @@ function materio_content_types_user_default_permissions() {
'name' => 'show webform title',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Contact opérationnel' => 'Contact opérationnel',
'Premium' => 'Premium',
'Student' => 'Student',
@@ -623,6 +1013,18 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view field_breve_ref'.
$permissions['view field_breve_ref'] = array(
'name' => 'view field_breve_ref',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_company'.
$permissions['view field_company'] = array(
'name' => 'view field_company',
@@ -659,6 +1061,19 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view field_department'.
$permissions['view field_department'] = array(
'name' => 'view field_department',
'roles' => array(
'Adhérent' => 'Adhérent',
'Premium' => 'Premium',
'Student' => 'Student',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_description'.
$permissions['view field_description'] = array(
'name' => 'view field_description',
@@ -726,10 +1141,31 @@ function materio_content_types_user_default_permissions() {
// Exported permission: 'view field_localisation'.
$permissions['view field_localisation'] = array(
'name' => 'view field_localisation',
'roles' => array(
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_materiau_image'.
$permissions['view field_materiau_image'] = array(
'name' => 'view field_materiau_image',
'roles' => array(
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_materiau_ref'.
$permissions['view field_materiau_ref'] = array(
'name' => 'view field_materiau_ref',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Premium' => 'Premium',
'Student' => 'Student',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -746,6 +1182,18 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view field_nature_titre'.
$permissions['view field_nature_titre'] = array(
'name' => 'view field_nature_titre',
'roles' => array(
'administrator' => 'administrator',
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_note'.
$permissions['view field_note'] = array(
'name' => 'view field_note',
@@ -756,13 +1204,78 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view field_onthologie'.
$permissions['view field_onthologie'] = array(
'name' => 'view field_onthologie',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_public_address'.
$permissions['view field_public_address'] = array(
'name' => 'view field_public_address',
'roles' => array(
'Adhérent' => 'Adhérent',
'Premium' => 'Premium',
'Student' => 'Student',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_public_email'.
$permissions['view field_public_email'] = array(
'name' => 'view field_public_email',
'roles' => array(
'Adhérent' => 'Adhérent',
'Premium' => 'Premium',
'Student' => 'Student',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_public_phone'.
$permissions['view field_public_phone'] = array(
'name' => 'view field_public_phone',
'roles' => array(
'Adhérent' => 'Adhérent',
'Premium' => 'Premium',
'Student' => 'Student',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_reference_materio'.
$permissions['view field_reference_materio'] = array(
'name' => 'view field_reference_materio',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Premium' => 'Premium',
'Student' => 'Student',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_tags_libres'.
$permissions['view field_tags_libres'] = array(
'name' => 'view field_tags_libres',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -782,6 +1295,26 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view field_video_filter'.
$permissions['view field_video_filter'] = array(
'name' => 'view field_video_filter',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'view field_website'.
$permissions['view field_website'] = array(
'name' => 'view field_website',
'roles' => array(
'Adhérent' => 'Adhérent',
'Premium' => 'Premium',
'Student' => 'Student',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_weight'.
$permissions['view field_weight'] = array(
'name' => 'view field_weight',
@@ -810,6 +1343,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_breve_ref'.
$permissions['view own field_breve_ref'] = array(
'name' => 'view own field_breve_ref',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_company'.
$permissions['view own field_company'] = array(
'name' => 'view own field_company',
@@ -822,7 +1365,12 @@ function materio_content_types_user_default_permissions() {
// Exported permission: 'view own field_company_distrib'.
$permissions['view own field_company_distrib'] = array(
'name' => 'view own field_company_distrib',
'roles' => array(),
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
@@ -833,6 +1381,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_department'.
$permissions['view own field_department'] = array(
'name' => 'view own field_department',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_description'.
$permissions['view own field_description'] = array(
'name' => 'view own field_description',
@@ -854,7 +1412,12 @@ function materio_content_types_user_default_permissions() {
// Exported permission: 'view own field_famille'.
$permissions['view own field_famille'] = array(
'name' => 'view own field_famille',
'roles' => array(),
'roles' => array(
'Admin showroom' => 'Admin showroom',
'Translator' => 'Translator',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
@@ -887,10 +1450,37 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_materiau_image'.
$permissions['view own field_materiau_image'] = array(
'name' => 'view own field_materiau_image',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_materiau_ref'.
$permissions['view own field_materiau_ref'] = array(
'name' => 'view own field_materiau_ref',
'roles' => array(
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_memo'.
$permissions['view own field_memo'] = array(
'name' => 'view own field_memo',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_nature_titre'.
$permissions['view own field_nature_titre'] = array(
'name' => 'view own field_nature_titre',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
@@ -905,6 +1495,46 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_onthologie'.
$permissions['view own field_onthologie'] = array(
'name' => 'view own field_onthologie',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_public_address'.
$permissions['view own field_public_address'] = array(
'name' => 'view own field_public_address',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_public_email'.
$permissions['view own field_public_email'] = array(
'name' => 'view own field_public_email',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_public_phone'.
$permissions['view own field_public_phone'] = array(
'name' => 'view own field_public_phone',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_reference_materio'.
$permissions['view own field_reference_materio'] = array(
'name' => 'view own field_reference_materio',
@@ -914,6 +1544,16 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_tags_libres'.
$permissions['view own field_tags_libres'] = array(
'name' => 'view own field_tags_libres',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_tode_company'.
$permissions['view own field_tode_company'] = array(
'name' => 'view own field_tode_company',
@@ -923,6 +1563,26 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_video_filter'.
$permissions['view own field_video_filter'] = array(
'name' => 'view own field_video_filter',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_website'.
$permissions['view own field_website'] = array(
'name' => 'view own field_website',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_weight'.
$permissions['view own field_weight'] = array(
'name' => 'view own field_weight',
@@ -941,5 +1601,24 @@ function materio_content_types_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own title_field'.
$permissions['view own title_field'] = array(
'name' => 'view own title_field',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'field_permissions',
);
// Exported permission: 'view title_field'.
$permissions['view title_field'] = array(
'name' => 'view title_field',
'roles' => array(
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
),
'module' => 'field_permissions',
);
return $permissions;
}
@@ -21,7 +21,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 4',
'weight' => '3',
'weight' => '4',
'children' => array(
0 => 'field_company_fab',
1 => 'field_company_distrib',
@@ -238,8 +238,7 @@ function materio_content_types_field_group_info() {
'label' => 'head right',
'weight' => '3',
'children' => array(
0 => 'field_localisation',
1 => 'field_reference_materio',
0 => 'field_reference_materio',
),
'format_type' => 'div',
'format_settings' => array(
@@ -471,8 +470,7 @@ function materio_content_types_field_group_info() {
'children' => array(
0 => 'field_nature_titre',
1 => 'title_field',
2 => 'field_localisation',
3 => 'field_reference_materio',
2 => 'field_reference_materio',
),
'format_type' => 'div',
'format_settings' => array(
@@ -506,8 +504,7 @@ function materio_content_types_field_group_info() {
'children' => array(
0 => 'field_nature_titre',
1 => 'title_field',
2 => 'field_localisation',
3 => 'field_reference_materio',
2 => 'field_reference_materio',
),
'format_type' => 'div',
'format_settings' => array(
@@ -537,12 +534,11 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'header',
'weight' => '0',
'weight' => '1',
'children' => array(
0 => 'field_nature_titre',
1 => 'title_field',
2 => 'field_localisation',
3 => 'field_reference_materio',
2 => 'field_reference_materio',
),
'format_type' => 'div',
'format_settings' => array(
@@ -576,8 +572,8 @@ function materio_content_types_field_group_info() {
'children' => array(
0 => 'field_nature_titre',
1 => 'title_field',
2 => 'field_localisation',
3 => 'field_reference_materio',
2 => 'field_reference_materio',
3 => 'field_location',
),
'format_type' => 'div',
'format_settings' => array(
@@ -641,6 +637,8 @@ function materio_content_types_field_group_info() {
2 => 'group_fichiers',
3 => 'group_media',
4 => 'group_referencement',
5 => 'group_showroom',
6 => 'group_liens',
),
'format_type' => 'htabs',
'format_settings' => array(
@@ -972,6 +970,34 @@ function materio_content_types_field_group_info() {
);
$field_groups['group_images|node|materiau|cardsmall'] = $field_group;
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_liens|node|materiau|form';
$field_group->group_name = 'group_liens';
$field_group->entity_type = 'node';
$field_group->bundle = 'materiau';
$field_group->mode = 'form';
$field_group->parent_name = 'group_htabs';
$field_group->data = array(
'label' => 'Liens',
'weight' => '16',
'children' => array(
0 => 'field_materiau_ref',
1 => 'field_breve_ref',
),
'format_type' => 'htab',
'format_settings' => array(
'formatter' => 'closed',
'instance_settings' => array(
'description' => '',
'classes' => 'group-liens field-group-htab',
'required_fields' => 1,
),
),
);
$field_groups['group_liens|node|materiau|form'] = $field_group;
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
@@ -1133,7 +1159,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 1',
'weight' => '0',
'weight' => '1',
'children' => array(
0 => 'group_header',
1 => 'group_images',
@@ -1166,7 +1192,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 1',
'weight' => '1',
'weight' => '2',
'children' => array(
0 => 'group_images',
),
@@ -1262,7 +1288,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 2',
'weight' => '1',
'weight' => '2',
'children' => array(
0 => 'field_description',
),
@@ -1294,7 +1320,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 2',
'weight' => '2',
'weight' => '3',
'children' => array(
0 => 'field_description',
),
@@ -1388,15 +1414,16 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 3',
'weight' => '2',
'weight' => '3',
'children' => array(
0 => 'field_video_filter',
0 => 'field_location',
),
'format_type' => 'hidden',
'format_type' => 'div',
'format_settings' => array(
'label' => 'side 3',
'instance_settings' => array(
'classes' => 'side group-side3 field-group-hidden',
'id' => 'node_materiau_cardbig_group_side2',
'classes' => 'side group-side2 field-group-div',
'description' => '',
'show_label' => '0',
'label_element' => 'h3',
@@ -1419,15 +1446,16 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 3',
'weight' => '3',
'weight' => '4',
'children' => array(
0 => 'field_video_filter',
0 => 'field_location',
),
'format_type' => 'hidden',
'format_type' => 'div',
'format_settings' => array(
'label' => 'side 3',
'instance_settings' => array(
'classes' => 'side group-side3 field-group-hidden',
'id' => 'node_materiau_cardmedium_group_side_3',
'classes' => 'side group-side2 field-group-div',
'description' => '',
'show_label' => '0',
'label_element' => 'h3',
@@ -1516,7 +1544,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 4',
'weight' => '4',
'weight' => '5',
'children' => array(
0 => 'field_company_fab',
1 => 'field_company_distrib',
@@ -1549,7 +1577,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 5',
'weight' => '4',
'weight' => '5',
'children' => array(
0 => 'field_attachments',
1 => 'field_materiau_ref',
@@ -1582,7 +1610,7 @@ function materio_content_types_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 5',
'weight' => '5',
'weight' => '6',
'children' => array(
0 => 'field_attachments',
1 => 'field_materiau_ref',
@@ -1684,6 +1712,7 @@ function materio_content_types_field_group_info() {
0 => 'field_description',
1 => 'field_company_fab',
2 => 'field_company_distrib',
3 => 'field_location',
),
'format_type' => 'div',
'format_settings' => array(
@@ -1755,7 +1784,8 @@ function materio_content_types_field_group_info() {
2 => 'field_company_fab',
3 => 'field_company_distrib',
4 => 'field_materiau_ref',
5 => 'group_header',
5 => 'field_location',
6 => 'group_header',
),
'format_type' => 'div',
'format_settings' => array(
@@ -1841,6 +1871,7 @@ function materio_content_types_field_group_info() {
t('Contenus');
t('Fichiers');
t('Header');
t('Liens');
t('Médias');
t('Référencement');
t('Side left');
@@ -20,10 +20,10 @@ dependencies[] = list
dependencies[] = materio_page_title
dependencies[] = materio_subscriptions
dependencies[] = materio_user_profiles
dependencies[] = node
dependencies[] = options
dependencies[] = print
dependencies[] = print_ui
dependencies[] = showroom
dependencies[] = strongarm
dependencies[] = synonyms
dependencies[] = taxonomy
@@ -65,7 +65,6 @@ features[field_base][] = field_reference_materio
features[field_base][] = field_source
features[field_base][] = field_tags_libres
features[field_base][] = field_tode_company
features[field_base][] = field_used_on_advanced_search
features[field_base][] = field_video_filter
features[field_base][] = field_visible_sur_la_home
features[field_base][] = field_visuel
@@ -103,6 +102,7 @@ features[field_group][] = group_images|node|materiau|cardbig
features[field_group][] = group_images|node|materiau|cardfull
features[field_group][] = group_images|node|materiau|cardmedium
features[field_group][] = group_images|node|materiau|cardsmall
features[field_group][] = group_liens|node|materiau|form
features[field_group][] = group_media|node|materiau|form
features[field_group][] = group_referencement|node|breve|form
features[field_group][] = group_referencement|node|materiau|form
@@ -200,53 +200,92 @@ features[user_permission][] = access private fields
features[user_permission][] = administer field permissions
features[user_permission][] = administer print
features[user_permission][] = create field_attachments
features[user_permission][] = create field_breve_ref
features[user_permission][] = create field_company
features[user_permission][] = create field_company_distrib
features[user_permission][] = create field_company_fab
features[user_permission][] = create field_department
features[user_permission][] = create field_description
features[user_permission][] = create field_displayed_in_home
features[user_permission][] = create field_famille
features[user_permission][] = create field_identifiant
features[user_permission][] = create field_infos_from_company
features[user_permission][] = create field_localisation
features[user_permission][] = create field_materiau_image
features[user_permission][] = create field_materiau_ref
features[user_permission][] = create field_memo
features[user_permission][] = create field_nature_titre
features[user_permission][] = create field_note
features[user_permission][] = create field_onthologie
features[user_permission][] = create field_public_address
features[user_permission][] = create field_public_email
features[user_permission][] = create field_public_phone
features[user_permission][] = create field_reference_materio
features[user_permission][] = create field_tags_libres
features[user_permission][] = create field_tode_company
features[user_permission][] = create field_video_filter
features[user_permission][] = create field_website
features[user_permission][] = create field_weight
features[user_permission][] = create field_workflow_state
features[user_permission][] = create title_field
features[user_permission][] = edit field_attachments
features[user_permission][] = edit field_breve_ref
features[user_permission][] = edit field_company
features[user_permission][] = edit field_company_distrib
features[user_permission][] = edit field_company_fab
features[user_permission][] = edit field_department
features[user_permission][] = edit field_description
features[user_permission][] = edit field_displayed_in_home
features[user_permission][] = edit field_famille
features[user_permission][] = edit field_identifiant
features[user_permission][] = edit field_infos_from_company
features[user_permission][] = edit field_localisation
features[user_permission][] = edit field_materiau_image
features[user_permission][] = edit field_materiau_ref
features[user_permission][] = edit field_memo
features[user_permission][] = edit field_nature_titre
features[user_permission][] = edit field_note
features[user_permission][] = edit field_onthologie
features[user_permission][] = edit field_public_address
features[user_permission][] = edit field_public_email
features[user_permission][] = edit field_public_phone
features[user_permission][] = edit field_reference_materio
features[user_permission][] = edit field_tags_libres
features[user_permission][] = edit field_tode_company
features[user_permission][] = edit field_video_filter
features[user_permission][] = edit field_website
features[user_permission][] = edit field_weight
features[user_permission][] = edit field_workflow_state
features[user_permission][] = edit own field_attachments
features[user_permission][] = edit own field_breve_ref
features[user_permission][] = edit own field_company
features[user_permission][] = edit own field_company_distrib
features[user_permission][] = edit own field_company_fab
features[user_permission][] = edit own field_department
features[user_permission][] = edit own field_description
features[user_permission][] = edit own field_displayed_in_home
features[user_permission][] = edit own field_famille
features[user_permission][] = edit own field_identifiant
features[user_permission][] = edit own field_infos_from_company
features[user_permission][] = edit own field_localisation
features[user_permission][] = edit own field_materiau_image
features[user_permission][] = edit own field_materiau_ref
features[user_permission][] = edit own field_memo
features[user_permission][] = edit own field_nature_titre
features[user_permission][] = edit own field_note
features[user_permission][] = edit own field_onthologie
features[user_permission][] = edit own field_public_address
features[user_permission][] = edit own field_public_email
features[user_permission][] = edit own field_public_phone
features[user_permission][] = edit own field_reference_materio
features[user_permission][] = edit own field_tags_libres
features[user_permission][] = edit own field_tode_company
features[user_permission][] = edit own field_video_filter
features[user_permission][] = edit own field_website
features[user_permission][] = edit own field_weight
features[user_permission][] = edit own field_workflow_state
features[user_permission][] = edit own title_field
features[user_permission][] = edit title_field
features[user_permission][] = node-specific print configuration
features[user_permission][] = show breve title
features[user_permission][] = show company title
@@ -254,37 +293,63 @@ features[user_permission][] = show materiau title
features[user_permission][] = show page title
features[user_permission][] = show webform title
features[user_permission][] = view field_attachments
features[user_permission][] = view field_breve_ref
features[user_permission][] = view field_company
features[user_permission][] = view field_company_distrib
features[user_permission][] = view field_company_fab
features[user_permission][] = view field_department
features[user_permission][] = view field_description
features[user_permission][] = view field_displayed_in_home
features[user_permission][] = view field_famille
features[user_permission][] = view field_identifiant
features[user_permission][] = view field_infos_from_company
features[user_permission][] = view field_localisation
features[user_permission][] = view field_materiau_image
features[user_permission][] = view field_materiau_ref
features[user_permission][] = view field_memo
features[user_permission][] = view field_nature_titre
features[user_permission][] = view field_note
features[user_permission][] = view field_onthologie
features[user_permission][] = view field_public_address
features[user_permission][] = view field_public_email
features[user_permission][] = view field_public_phone
features[user_permission][] = view field_reference_materio
features[user_permission][] = view field_tags_libres
features[user_permission][] = view field_tode_company
features[user_permission][] = view field_video_filter
features[user_permission][] = view field_website
features[user_permission][] = view field_weight
features[user_permission][] = view field_workflow_state
features[user_permission][] = view own field_attachments
features[user_permission][] = view own field_breve_ref
features[user_permission][] = view own field_company
features[user_permission][] = view own field_company_distrib
features[user_permission][] = view own field_company_fab
features[user_permission][] = view own field_department
features[user_permission][] = view own field_description
features[user_permission][] = view own field_displayed_in_home
features[user_permission][] = view own field_famille
features[user_permission][] = view own field_identifiant
features[user_permission][] = view own field_infos_from_company
features[user_permission][] = view own field_localisation
features[user_permission][] = view own field_materiau_image
features[user_permission][] = view own field_materiau_ref
features[user_permission][] = view own field_memo
features[user_permission][] = view own field_nature_titre
features[user_permission][] = view own field_note
features[user_permission][] = view own field_onthologie
features[user_permission][] = view own field_public_address
features[user_permission][] = view own field_public_email
features[user_permission][] = view own field_public_phone
features[user_permission][] = view own field_reference_materio
features[user_permission][] = view own field_tags_libres
features[user_permission][] = view own field_tode_company
features[user_permission][] = view own field_video_filter
features[user_permission][] = view own field_website
features[user_permission][] = view own field_weight
features[user_permission][] = view own field_workflow_state
features[user_permission][] = view own title_field
features[user_permission][] = view title_field
features[variable][] = field_bundle_settings_node__breve
features[variable][] = field_bundle_settings_node__company
features[variable][] = field_bundle_settings_node__materiau
@@ -471,4 +536,21 @@ features[variable][] = print_urls
features[variable][] = print_urls_anchors
features[views_view][] = entity_reference_materiaux_breves
features_exclude[dependencies][i18n_taxonomy] = i18n_taxonomy
features_exclude[dependencies][showroom] = showroom
features_exclude[dependencies][materio_showroom] = materio_showroom
features_exclude[field_base][field_showroom] = field_showroom
features_exclude[field_base][field_location] = field_location
features_exclude[field_base][field_used_on_advanced_search] = field_used_on_advanced_search
features_exclude[field_instance][node-breve-field_showroom] = node-breve-field_showroom
features_exclude[field_instance][node-materiau-field_location] = node-materiau-field_location
features_exclude[user_permission][create field_showroom] = create field_showroom
features_exclude[user_permission][edit own field_showroom] = edit own field_showroom
features_exclude[user_permission][edit field_showroom] = edit field_showroom
features_exclude[user_permission][view own field_showroom] = view own field_showroom
features_exclude[user_permission][view field_showroom] = view field_showroom
features_exclude[user_permission][create field_location] = create field_location
features_exclude[user_permission][edit own field_location] = edit own field_location
features_exclude[user_permission][edit field_location] = edit field_location
features_exclude[user_permission][view own field_location] = view own field_location
features_exclude[user_permission][view field_location] = view field_location
project path = sites/all/modules/features
@@ -44,7 +44,7 @@ function materio_content_types_strongarm() {
'weight' => '9',
),
'path' => array(
'weight' => '5',
'weight' => '6',
),
'workflow' => array(
'weight' => '3',
@@ -52,6 +52,12 @@ function materio_content_types_strongarm() {
'language' => array(
'weight' => '2',
),
'metatags' => array(
'weight' => '10',
),
'redirect' => array(
'weight' => '9',
),
),
'display' => array(
'language' => array(
@@ -340,10 +346,10 @@ function materio_content_types_strongarm() {
'weight' => '5',
),
'metatags' => array(
'weight' => '40',
'weight' => '13',
),
'redirect' => array(
'weight' => '30',
'weight' => '12',
),
),
'display' => array(
@@ -375,11 +381,11 @@ function materio_content_types_strongarm() {
),
'workflow_current_state' => array(
'cardmedium' => array(
'weight' => '-99',
'weight' => '0',
'visible' => TRUE,
),
'cardbig' => array(
'weight' => '-99',
'weight' => '0',
'visible' => TRUE,
),
'cardfull' => array(
@@ -398,14 +404,18 @@ function materio_content_types_strongarm() {
'weight' => '0',
'visible' => FALSE,
),
'cardsmall' => array(
'weight' => '-99',
'visible' => TRUE,
),
),
'workflow' => array(
'cardmedium' => array(
'weight' => '99',
'visible' => TRUE,
'weight' => '8',
'visible' => FALSE,
),
'cardbig' => array(
'weight' => '99',
'weight' => '15',
'visible' => FALSE,
),
'cardfull' => array(
@@ -424,6 +434,10 @@ function materio_content_types_strongarm() {
'weight' => '8',
'visible' => FALSE,
),
'cardsmall' => array(
'weight' => '99',
'visible' => TRUE,
),
),
),
),
@@ -724,21 +738,21 @@ function materio_content_types_strongarm() {
'region' => 'main',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Vertical tabs',
'title' => 'Onglets verticaux',
'hidden' => 0,
),
'actions' => array(
'region' => 'right',
'weight' => '4',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Save',
'title' => 'Enregistrer',
'hidden' => 0,
),
'language' => array(
'region' => 'right',
'weight' => '1',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Language',
'title' => 'Langue',
'hidden' => 0,
),
'body' => array(
@@ -764,7 +778,7 @@ function materio_content_types_strongarm() {
),
'field_memo' => array(
'region' => 'right',
'weight' => '2',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Mémo',
'hidden' => 0,
@@ -819,10 +833,23 @@ function materio_content_types_strongarm() {
),
'workflow' => array(
'region' => 'right',
'weight' => '3',
'weight' => '4',
'has_required' => FALSE,
'title' => 'Publication',
'collapsed' => 0,
'title' => 'Importé',
'hidden' => 0,
),
'entity_translation_entity_form_language_update' => array(
'region' => 'main',
'weight' => '0',
'has_required' => FALSE,
'title' => NULL,
'hidden' => 0,
),
'field_showroom' => array(
'region' => 'right',
'weight' => '1',
'has_required' => FALSE,
'title' => 'Showroom',
'hidden' => 0,
),
);
@@ -1037,114 +1064,45 @@ function materio_content_types_strongarm() {
$strongarm->value = array(
'title' => array(
'region' => 'main',
'weight' => '0',
'weight' => '3',
'has_required' => TRUE,
'title' => 'Nom',
),
'additional_settings' => array(
'region' => 'main',
'weight' => '9',
'weight' => '6',
'has_required' => FALSE,
'title' => 'Vertical tabs',
'title' => 'Onglets verticaux',
'hidden' => 0,
),
'actions' => array(
'region' => 'right',
'region' => 'footer',
'weight' => '8',
'has_required' => FALSE,
'title' => 'Save',
'title' => 'Enregistrer',
'hidden' => 0,
),
'language' => array(
'region' => 'right',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Language',
'hidden' => 0,
),
'field_attachments' => array(
'region' => 'main',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Fichiers joints',
'hidden' => 0,
),
'field_description' => array(
'region' => 'main',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Description',
'hidden' => 0,
),
'field_nature_titre' => array(
'region' => 'main',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Nature Titre',
'hidden' => 0,
),
'field_materiau_image' => array(
'region' => 'main',
'weight' => '6',
'has_required' => FALSE,
'title' => 'Image',
'hidden' => 0,
),
'field_video_filter' => array(
'region' => 'main',
'weight' => '7',
'has_required' => FALSE,
'title' => 'video',
'title' => 'Langue',
'hidden' => 0,
),
'field_memo' => array(
'region' => 'right',
'weight' => '7',
'weight' => '9',
'has_required' => FALSE,
'title' => 'Mémo',
'hidden' => 0,
),
'title_field' => array(
'region' => 'main',
'weight' => '1',
'has_required' => TRUE,
'title' => 'Nom',
),
'field_localisation' => array(
'region' => 'right',
'weight' => '2',
'region' => 'main',
'weight' => '14',
'has_required' => FALSE,
'title' => 'Localisation',
'hidden' => 0,
),
'field_tags_libres' => array(
'region' => 'main',
'weight' => '10',
'has_required' => FALSE,
'title' => 'Tags libres',
'hidden' => 0,
),
'field_onthologie' => array(
'region' => 'main',
'weight' => '8',
'has_required' => FALSE,
'title' => 'Onthologie',
'hidden' => 0,
),
'field_company_fab' => array(
'region' => 'main',
'weight' => '11',
'has_required' => FALSE,
'title' => 'Manufacturer',
'hidden' => 0,
),
'field_company_distrib' => array(
'region' => 'main',
'weight' => '12',
'has_required' => FALSE,
'title' => 'Distributor',
'hidden' => 0,
),
'field_famille' => array(
'region' => 'right',
'weight' => '0',
@@ -1159,39 +1117,121 @@ function materio_content_types_strongarm() {
'hidden' => 0,
),
'field_reference_materio' => array(
'region' => 'main',
'weight' => '4',
'region' => 'right',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Référence Materio',
'hidden' => 0,
),
'field_materiau_ref' => array(
'region' => 'right',
'weight' => '3',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Materiau(x) lié(s)',
'hidden' => 0,
),
'field_breve_ref' => array(
'region' => 'right',
'weight' => '4',
'weight' => '6',
'has_required' => FALSE,
'title' => 'Brève(s) liée(s)',
'hidden' => 0,
),
'field_workflow_state' => array(
'region' => 'main',
'weight' => '13',
'weight' => '9',
'has_required' => FALSE,
'title' => 'Workflow State',
'hidden' => 0,
),
'workflow' => array(
'region' => 'right',
'weight' => '6',
'weight' => '8',
'has_required' => FALSE,
'title' => 'Publication',
'collapsed' => 0,
'title' => 'Importé',
'hidden' => 0,
),
'entity_translation_entity_form_language_update' => array(
'region' => 'main',
'weight' => '4',
'has_required' => FALSE,
'title' => NULL,
'hidden' => 0,
),
'field_attachments' => array(
'region' => 'main',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Fichiers joints',
'hidden' => 0,
),
'field_description' => array(
'region' => 'main',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Description',
'hidden' => 0,
),
'field_nature_titre' => array(
'region' => 'main',
'weight' => '1',
'has_required' => FALSE,
'title' => 'Nature Titre',
'hidden' => 0,
),
'field_materiau_image' => array(
'region' => 'main',
'weight' => '7',
'has_required' => FALSE,
'title' => 'Image',
'hidden' => 0,
),
'field_video_filter' => array(
'region' => 'main',
'weight' => '8',
'has_required' => FALSE,
'title' => 'video',
'hidden' => 0,
),
'title_field' => array(
'region' => 'main',
'weight' => '0',
'has_required' => TRUE,
'title' => 'Nom',
),
'field_tags_libres' => array(
'region' => 'main',
'weight' => '11',
'has_required' => FALSE,
'title' => 'Tags libres',
'hidden' => 0,
),
'field_onthologie' => array(
'region' => 'main',
'weight' => '10',
'has_required' => FALSE,
'title' => 'Onthologie',
'hidden' => 0,
),
'field_company_fab' => array(
'region' => 'main',
'weight' => '12',
'has_required' => FALSE,
'title' => 'Fabricant',
'hidden' => 0,
),
'field_company_distrib' => array(
'region' => 'main',
'weight' => '13',
'has_required' => FALSE,
'title' => 'Distributeur',
'hidden' => 0,
),
'field_showroom_localisation' => array(
'region' => 'main',
'weight' => '15',
'has_required' => FALSE,
'title' => 'showroom_localisation',
'hidden' => 0,
),
);
@@ -50,7 +50,7 @@ function materio_content_types_views_default_views() {
'title' => 'title',
);
$handler->display->display_options['row_options']['hide_empty'] = TRUE;
/* Champ: Contenu : Référence Materio */
/* Field: Content: Référence Materio */
$handler->display->display_options['fields']['field_reference_materio']['id'] = 'field_reference_materio';
$handler->display->display_options['fields']['field_reference_materio']['table'] = 'field_data_field_reference_materio';
$handler->display->display_options['fields']['field_reference_materio']['field'] = 'field_reference_materio';
@@ -58,7 +58,7 @@ function materio_content_types_views_default_views() {
$handler->display->display_options['fields']['field_reference_materio']['alter']['text'] = '[field_reference_materio] ';
$handler->display->display_options['fields']['field_reference_materio']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_reference_materio']['hide_empty'] = TRUE;
/* Champ: Contenu : Titre */
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
@@ -68,19 +68,19 @@ function materio_content_types_views_default_views() {
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['link_to_node'] = FALSE;
/* Critère de tri: Contenu : Date de publication */
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Critère de filtrage: Contenu : Publié */
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Critère de filtrage: Contenu : Type */
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
@@ -130,6 +130,7 @@ function materio_content_types_views_default_views() {
t('[field_reference_materio] '),
t('[field_reference_materio][title]'),
t('Entity Reference'),
t('more'),
);
$export['entity_reference_materiaux_breves'] = $view;
@@ -5,6 +5,7 @@ dependencies[] = ctools
dependencies[] = entity
dependencies[] = features
dependencies[] = image
dependencies[] = materio_content_types
dependencies[] = materio_publications
dependencies[] = menu
dependencies[] = menu_attributes
@@ -69,342 +69,344 @@ function materio_home_v2_default_page_manager_pages() {
$display->cache = array();
$display->title = '';
$display->uuid = 'eca54323-0377-4ab0-b40c-69b96c16707a';
$display->storage_type = 'page_manager';
$display->storage_id = 'page_home_v2__panel_context_2bd92edc-8b2b-42d3-9857-f44f03574847';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13097',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'span',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'intro-video',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = 'd0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$display->content['new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7'] = $pane;
$display->panels['middle'][0] = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane = new stdClass();
$pane->pid = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'materio_user-user_register';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$display->content['new-afe6b27a-ba89-4292-8f16-0a59f0e9d944'] = $pane;
$display->panels['middle'][1] = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane = new stdClass();
$pane->pid = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-home-v2';
$pane->shown = FALSE;
$pane->access = array(
'plugins' => array(),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h3',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->locks = array();
$pane->uuid = '78b5df28-c9fd-4904-8910-aa1b96c60e35';
$display->content['new-78b5df28-c9fd-4904-8910-aa1b96c60e35'] = $pane;
$display->panels['middle'][2] = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane = new stdClass();
$pane->pid = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-menu-home-member';
$pane->shown = TRUE;
$pane->access = array(
'plugins' => array(
0 => array(
'name' => 'role',
'settings' => array(
'rids' => array(
0 => 10,
1 => 11,
2 => 6,
3 => 8,
4 => 3,
5 => 4,
),
$pane = new stdClass();
$pane->pid = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13097',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'span',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'intro-video',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = 'd0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$display->content['new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7'] = $pane;
$display->panels['middle'][0] = 'new-d0ee2cb5-bc02-4ded-a907-91d2dbea37c7';
$pane = new stdClass();
$pane->pid = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'materio_user-user_register';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$display->content['new-afe6b27a-ba89-4292-8f16-0a59f0e9d944'] = $pane;
$display->panels['middle'][1] = 'new-afe6b27a-ba89-4292-8f16-0a59f0e9d944';
$pane = new stdClass();
$pane->pid = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-home-v2';
$pane->shown = FALSE;
$pane->access = array(
'plugins' => array(),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h3',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->locks = array();
$pane->uuid = '78b5df28-c9fd-4904-8910-aa1b96c60e35';
$display->content['new-78b5df28-c9fd-4904-8910-aa1b96c60e35'] = $pane;
$display->panels['middle'][2] = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35';
$pane = new stdClass();
$pane->pid = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'menu-menu-menu-home-member';
$pane->shown = TRUE;
$pane->access = array(
'plugins' => array(
0 => array(
'name' => 'role',
'settings' => array(
'rids' => array(
0 => 10,
1 => 11,
2 => 6,
3 => 8,
4 => 3,
5 => 4,
),
'context' => 'logged-in-user',
'not' => FALSE,
),
'context' => 'logged-in-user',
'not' => FALSE,
),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 3;
$pane->locks = array();
$pane->uuid = 'fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$display->content['new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339'] = $pane;
$display->panels['middle'][3] = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane = new stdClass();
$pane->pid = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13051',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'showroom',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'showroom-pane',
'css_class' => 'showroom',
);
$pane->extras = array();
$pane->position = 4;
$pane->locks = array();
$pane->uuid = 'c0f80278-c595-4c40-bcec-11063eb6fac5';
$display->content['new-c0f80278-c595-4c40-bcec-11063eb6fac5'] = $pane;
$display->panels['middle'][4] = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane = new stdClass();
$pane->pid = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13052',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'database',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'bdd-pane',
'css_class' => 'bdd',
);
$pane->extras = array();
$pane->position = 5;
$pane->locks = array();
$pane->uuid = '71badc43-2232-4c2f-b454-e3be80726a22';
$display->content['new-71badc43-2232-4c2f-b454-e3be80726a22'] = $pane;
$display->panels['middle'][5] = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane = new stdClass();
$pane->pid = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane->panel = 'middle';
$pane->type = 'panels_mini';
$pane->subtype = 'news_home_v2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news-panel',
);
$pane->extras = array();
$pane->position = 6;
$pane->locks = array();
$pane->uuid = '3b6cc0fd-a06a-403a-841e-404ea57fe234';
$display->content['new-3b6cc0fd-a06a-403a-841e-404ea57fe234'] = $pane;
$display->panels['middle'][6] = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane = new stdClass();
$pane->pid = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13053',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'formations',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'formations-pane',
'css_class' => 'formations',
);
$pane->extras = array();
$pane->position = 7;
$pane->locks = array();
$pane->uuid = 'e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$display->content['new-e5d39cf0-472b-4779-9d31-a1548fe86bc7'] = $pane;
$display->panels['middle'][7] = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane = new stdClass();
$pane->pid = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13054',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'services',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'services-pane',
'css_class' => 'services',
);
$pane->extras = array();
$pane->position = 8;
$pane->locks = array();
$pane->uuid = '9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$display->content['new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe'] = $pane;
$display->panels['middle'][8] = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane = new stdClass();
$pane->pid = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'publication_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'publication',
);
$pane->extras = array();
$pane->position = 9;
$pane->locks = array();
$pane->uuid = '639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$display->content['new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650'] = $pane;
$display->panels['middle'][9] = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane = new stdClass();
$pane->pid = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '11175',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'full',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'contact-pane',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 10;
$pane->locks = array();
$pane->uuid = 'ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->content['new-ab2ebbf2-7338-4db9-8df4-8b825058f98d'] = $pane;
$display->panels['middle'][10] = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
),
);
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 3;
$pane->locks = array();
$pane->uuid = 'fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$display->content['new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339'] = $pane;
$display->panels['middle'][3] = 'new-fd3cbeb9-4de0-413f-8cd9-f88eb448f339';
$pane = new stdClass();
$pane->pid = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13051',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'showroom',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<No Title>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'showroom-pane',
'css_class' => 'showroom',
);
$pane->extras = array();
$pane->position = 4;
$pane->locks = array();
$pane->uuid = 'c0f80278-c595-4c40-bcec-11063eb6fac5';
$display->content['new-c0f80278-c595-4c40-bcec-11063eb6fac5'] = $pane;
$display->panels['middle'][4] = 'new-c0f80278-c595-4c40-bcec-11063eb6fac5';
$pane = new stdClass();
$pane->pid = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13052',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'database',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'bdd-pane',
'css_class' => 'bdd',
);
$pane->extras = array();
$pane->position = 5;
$pane->locks = array();
$pane->uuid = '71badc43-2232-4c2f-b454-e3be80726a22';
$display->content['new-71badc43-2232-4c2f-b454-e3be80726a22'] = $pane;
$display->panels['middle'][5] = 'new-71badc43-2232-4c2f-b454-e3be80726a22';
$pane = new stdClass();
$pane->pid = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane->panel = 'middle';
$pane->type = 'panels_mini';
$pane->subtype = 'news_home_v2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news-panel',
);
$pane->extras = array();
$pane->position = 6;
$pane->locks = array();
$pane->uuid = '3b6cc0fd-a06a-403a-841e-404ea57fe234';
$display->content['new-3b6cc0fd-a06a-403a-841e-404ea57fe234'] = $pane;
$display->panels['middle'][6] = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234';
$pane = new stdClass();
$pane->pid = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13053',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'formations',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'formations-pane',
'css_class' => 'formations',
);
$pane->extras = array();
$pane->position = 7;
$pane->locks = array();
$pane->uuid = 'e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$display->content['new-e5d39cf0-472b-4779-9d31-a1548fe86bc7'] = $pane;
$display->panels['middle'][7] = 'new-e5d39cf0-472b-4779-9d31-a1548fe86bc7';
$pane = new stdClass();
$pane->pid = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '13054',
'links' => 1,
'leave_node_title' => 0,
'identifier' => 'services',
'build_mode' => 'homeblock',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'services-pane',
'css_class' => 'services',
);
$pane->extras = array();
$pane->position = 8;
$pane->locks = array();
$pane->uuid = '9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$display->content['new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe'] = $pane;
$display->panels['middle'][8] = 'new-9718c81e-6055-4e4e-a0e5-3796d58c6cbe';
$pane = new stdClass();
$pane->pid = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'publication_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'publication',
);
$pane->extras = array();
$pane->position = 9;
$pane->locks = array();
$pane->uuid = '639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$display->content['new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650'] = $pane;
$display->panels['middle'][9] = 'new-639eb2c7-bf5d-4920-b1bb-c33d8f72a650';
$pane = new stdClass();
$pane->pid = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$pane->panel = 'middle';
$pane->type = 'node';
$pane->subtype = 'node';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nid' => '11175',
'links' => 0,
'leave_node_title' => 0,
'identifier' => '',
'build_mode' => 'full',
'link_node_title' => 0,
'override_title' => 1,
'override_title_text' => '<none>',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'contact-pane',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 10;
$pane->locks = array();
$pane->uuid = 'ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->content['new-ab2ebbf2-7338-4db9-8df4-8b825058f98d'] = $pane;
$display->panels['middle'][10] = 'new-ab2ebbf2-7338-4db9-8df4-8b825058f98d';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = '0';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;
$pages[''] = $page;
$pages['home_v2'] = $page;
return $pages;
@@ -36,127 +36,129 @@ function materio_home_v2_default_panels_mini() {
$display->cache = array();
$display->title = '';
$display->uuid = '4907c432-fcb2-4512-aa6a-5d96ec209978';
$display->storage_type = 'panels_mini';
$display->storage_id = 'news_home_v2';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-6274';
$pane->shown = FALSE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'news-letter',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '9cd76d41-bb30-42d9-9209-cdf495d97281';
$display->content['new-9cd76d41-bb30-42d9-9209-cdf495d97281'] = $pane;
$display->panels['bottom'][0] = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane = new stdClass();
$pane->pid = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-0';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'dd7b8b21-bef6-4816-8f42-0165785fe751';
$display->content['new-dd7b8b21-bef6-4816-8f42-0165785fe751'] = $pane;
$display->panels['bottom'][1] = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane = new stdClass();
$pane->pid = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane->panel = 'left';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'link_to_view' => 1,
'path' => 'actuality',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d42fc5-b2de-441b-aaff-3becac366c74';
$display->content['new-04d42fc5-b2de-441b-aaff-3becac366c74'] = $pane;
$display->panels['left'][0] = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane = new stdClass();
$pane->pid = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'daily',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$display->content['new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'] = $pane;
$display->panels['middle'][0] = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane = new stdClass();
$pane->pid = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane->panel = 'right';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_3';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->content['new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28'] = $pane;
$display->panels['right'][0] = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane = new stdClass();
$pane->pid = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-6274';
$pane->shown = FALSE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'news-letter',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '9cd76d41-bb30-42d9-9209-cdf495d97281';
$display->content['new-9cd76d41-bb30-42d9-9209-cdf495d97281'] = $pane;
$display->panels['bottom'][0] = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$pane = new stdClass();
$pane->pid = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane->panel = 'bottom';
$pane->type = 'block';
$pane->subtype = 'simplenews-0';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = 'dd7b8b21-bef6-4816-8f42-0165785fe751';
$display->content['new-dd7b8b21-bef6-4816-8f42-0165785fe751'] = $pane;
$display->panels['bottom'][1] = 'new-dd7b8b21-bef6-4816-8f42-0165785fe751';
$pane = new stdClass();
$pane->pid = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane->panel = 'left';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_1';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'link_to_view' => 1,
'path' => 'actuality',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => 'news-pane',
'css_class' => 'news',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d42fc5-b2de-441b-aaff-3becac366c74';
$display->content['new-04d42fc5-b2de-441b-aaff-3becac366c74'] = $pane;
$display->panels['left'][0] = 'new-04d42fc5-b2de-441b-aaff-3becac366c74';
$pane = new stdClass();
$pane->pid = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_2';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array();
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'daily',
);
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$display->content['new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'] = $pane;
$display->panels['middle'][0] = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2';
$pane = new stdClass();
$pane->pid = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$pane->panel = 'right';
$pane->type = 'views_panes';
$pane->subtype = 'news_home_v2-panel_pane_3';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->content['new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28'] = $pane;
$display->panels['right'][0] = 'new-5a41e0d1-2e82-4fdb-a34a-6712d9cc6d28';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281';
$mini->display = $display;
@@ -38,33 +38,33 @@ function materio_home_v2_views_default_views() {
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'entity';
$handler->display->display_options['row_options']['view_mode'] = 'cardbig';
/* Champ: Contenu : Titre */
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Critère de tri: Contenu : Date de publication */
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Critère de filtrage: Contenu : Publié */
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Critère de filtrage: Contenu : Type */
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'breve' => 'breve',
);
/* Critère de filtrage: Processus : État actuel */
/* Filter criterion: Workflow: Current state */
$handler->display->display_options['filters']['sid']['id'] = 'sid';
$handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
$handler->display->display_options['filters']['sid']['field'] = 'sid';
@@ -104,28 +104,28 @@ function materio_home_v2_views_default_views() {
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['filter_groups'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Critère de filtrage: Contenu : Publié */
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Critère de filtrage: Contenu : Type */
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'simplenews' => 'simplenews',
);
/* Critère de filtrage: Processus : État actuel */
/* Filter criterion: Workflow: Current state */
$handler->display->display_options['filters']['sid']['id'] = 'sid';
$handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
$handler->display->display_options['filters']['sid']['field'] = 'sid';
$handler->display->display_options['filters']['sid']['value'] = array(
3 => '3',
);
/* Critère de filtrage: Contenu : Newsletter category (field_simplenews_term) */
/* Filter criterion: Content: Newsletter category (field_simplenews_term) */
$handler->display->display_options['filters']['field_simplenews_term_tid']['id'] = 'field_simplenews_term_tid';
$handler->display->display_options['filters']['field_simplenews_term_tid']['table'] = 'field_data_field_simplenews_term';
$handler->display->display_options['filters']['field_simplenews_term_tid']['field'] = 'field_simplenews_term_tid';
@@ -134,7 +134,7 @@ function materio_home_v2_views_default_views() {
);
$handler->display->display_options['filters']['field_simplenews_term_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_simplenews_term_tid']['vocabulary'] = 'newsletter';
/* Critère de filtrage: Parution de lettre d'information : État des envois */
/* Filter criterion: Simplenews issue: Sent status */
$handler->display->display_options['filters']['status_1']['id'] = 'status_1';
$handler->display->display_options['filters']['status_1']['table'] = 'simplenews_newsletter';
$handler->display->display_options['filters']['status_1']['field'] = 'status';
@@ -170,28 +170,28 @@ function materio_home_v2_views_default_views() {
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['filter_groups'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Critère de filtrage: Contenu : Publié */
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Critère de filtrage: Contenu : Type */
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'simplenews' => 'simplenews',
);
/* Critère de filtrage: Processus : État actuel */
/* Filter criterion: Workflow: Current state */
$handler->display->display_options['filters']['sid']['id'] = 'sid';
$handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
$handler->display->display_options['filters']['sid']['field'] = 'sid';
$handler->display->display_options['filters']['sid']['value'] = array(
3 => '3',
);
/* Critère de filtrage: Contenu : Newsletter category (field_simplenews_term) */
/* Filter criterion: Content: Newsletter category (field_simplenews_term) */
$handler->display->display_options['filters']['field_simplenews_term_tid']['id'] = 'field_simplenews_term_tid';
$handler->display->display_options['filters']['field_simplenews_term_tid']['table'] = 'field_data_field_simplenews_term';
$handler->display->display_options['filters']['field_simplenews_term_tid']['field'] = 'field_simplenews_term_tid';
@@ -200,14 +200,14 @@ function materio_home_v2_views_default_views() {
);
$handler->display->display_options['filters']['field_simplenews_term_tid']['type'] = 'select';
$handler->display->display_options['filters']['field_simplenews_term_tid']['vocabulary'] = 'newsletter';
/* Critère de filtrage: Parution de lettre d'information : État des envois */
/* Filter criterion: Simplenews issue: Sent status */
$handler->display->display_options['filters']['status_1']['id'] = 'status_1';
$handler->display->display_options['filters']['status_1']['table'] = 'simplenews_newsletter';
$handler->display->display_options['filters']['status_1']['field'] = 'status';
$handler->display->display_options['filters']['status_1']['value'] = array(
2 => '2',
);
/* Critère de filtrage: Contenu : Visible sur la home (field_visible_sur_la_home) */
/* Filter criterion: Content: Visible sur la home (field_visible_sur_la_home) */
$handler->display->display_options['filters']['field_visible_sur_la_home_value']['id'] = 'field_visible_sur_la_home_value';
$handler->display->display_options['filters']['field_visible_sur_la_home_value']['table'] = 'field_data_field_visible_sur_la_home';
$handler->display->display_options['filters']['field_visible_sur_la_home_value']['field'] = 'field_visible_sur_la_home_value';
@@ -235,6 +235,7 @@ function materio_home_v2_views_default_views() {
t('Asc'),
t('Desc'),
t('News'),
t('more'),
t('home v2'),
t('daily'),
t('Daily materiO\''),
@@ -271,37 +272,37 @@ function materio_home_v2_views_default_views() {
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'entity';
$handler->display->display_options['row_options']['view_mode'] = 'homeblock';
/* Champ: Contenu : Titre */
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Critère de tri: Contenu : weight (field_weight) */
/* Sort criterion: Content: weight (field_weight) */
$handler->display->display_options['sorts']['field_weight_value']['id'] = 'field_weight_value';
$handler->display->display_options['sorts']['field_weight_value']['table'] = 'field_data_field_weight';
$handler->display->display_options['sorts']['field_weight_value']['field'] = 'field_weight_value';
/* Critère de tri: Contenu : Date de publication */
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Critère de filtrage: Contenu : Publié */
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Critère de filtrage: Contenu : Type */
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'publication' => 'publication',
);
/* Critère de filtrage: Processus : État actuel */
/* Filter criterion: Workflow: Current state */
$handler->display->display_options['filters']['sid']['id'] = 'sid';
$handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
$handler->display->display_options['filters']['sid']['field'] = 'sid';
@@ -323,6 +324,7 @@ function materio_home_v2_views_default_views() {
t('Trier par'),
t('Asc'),
t('Desc'),
t('more'),
t('Home v2'),
);
$export['publication_home_v2'] = $view;
@@ -10,7 +10,7 @@
function materio_publications_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'field_couverture'
// Exported field_base: 'field_couverture'.
$field_bases['field_couverture'] = array(
'active' => 1,
'cardinality' => 1,
@@ -39,7 +39,7 @@ function materio_publications_field_default_field_bases() {
'type' => 'image',
);
// Exported field_base: 'field_weight'
// Exported field_base: 'field_weight'.
$field_bases['field_weight'] = array(
'active' => 1,
'cardinality' => 1,
@@ -10,7 +10,7 @@
function materio_publications_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-publication-body'
// Exported field_instance: 'node-publication-body'.
$field_instances['node-publication-body'] = array(
'bundle' => 'publication',
'default_value' => NULL,
@@ -91,7 +91,7 @@ function materio_publications_field_default_field_instances() {
),
);
// Exported field_instance: 'node-publication-field_couverture'
// Exported field_instance: 'node-publication-field_couverture'.
$field_instances['node-publication-field_couverture'] = array(
'bundle' => 'publication',
'deleted' => 0,
@@ -182,7 +182,7 @@ function materio_publications_field_default_field_instances() {
),
);
// Exported field_instance: 'node-publication-field_weight'
// Exported field_instance: 'node-publication-field_weight'.
$field_instances['node-publication-field_weight'] = array(
'bundle' => 'publication',
'default_value' => NULL,
@@ -55,144 +55,3 @@ function materio_publications_node_info() {
drupal_alter('node_info', $items);
return $items;
}
/**
* Implements hook_workflow_default_workflows().
*/
function materio_publications_workflow_default_workflows() {
$workflows = array();
// Exported workflow: Publication
$workflows['Publication'] = array(
'name' => 'Publication',
'tab_roles' => '',
'options' => 'a:4:{s:16:"comment_log_node";i:0;s:15:"comment_log_tab";i:0;s:13:"name_as_title";i:0;s:12:"watchdog_log";i:1;}',
'states' => array(
0 => array(
'state' => '(creation)',
'weight' => -50,
'sysid' => 1,
'status' => 1,
'name' => 'Publication',
),
1 => array(
'state' => 'Importé',
'weight' => 0,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
2 => array(
'state' => 'Édité',
'weight' => 1,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
3 => array(
'state' => 'Masqué',
'weight' => 2,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
4 => array(
'state' => 'Publié',
'weight' => 3,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
),
'transitions' => array(
0 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Masqué',
),
1 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Publié',
),
2 => array(
'roles' => 'root',
'state' => '(creation)',
'target_state' => 'Importé',
),
3 => array(
'roles' => 'administrator,root',
'state' => 'Importé',
'target_state' => 'Édité',
),
4 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Masqué',
),
5 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Publié',
),
6 => array(
'roles' => 'root',
'state' => 'Édité',
'target_state' => 'Importé',
),
7 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Masqué',
),
8 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Publié',
),
9 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Publié',
),
10 => array(
'roles' => 'root',
'state' => 'Masqué',
'target_state' => 'Importé',
),
11 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Édité',
),
12 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Masqué',
),
13 => array(
'roles' => 'root',
'state' => 'Publié',
'target_state' => 'Importé',
),
14 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Édité',
),
),
'node_types' => array(
0 => 'breve',
1 => 'company',
2 => 'didactique',
3 => 'faq',
4 => 'looping_embed_video',
5 => 'materiau',
6 => 'page',
7 => 'publication',
8 => 'simplenews',
),
);
return $workflows;
}
@@ -31,31 +31,19 @@ function materio_publications_user_default_roles() {
// Exported role: Utilisateur Alpha Tester.
$roles['Utilisateur Alpha Tester'] = array(
'name' => 'Utilisateur Alpha Tester',
'weight' => 4,
'weight' => 5,
);
// Exported role: administrator.
$roles['administrator'] = array(
'name' => 'administrator',
'weight' => 8,
'weight' => 11,
);
// Exported role: root.
$roles['root'] = array(
'name' => 'root',
'weight' => 9,
);
// Exported role: utilisateur anonyme.
$roles['utilisateur anonyme'] = array(
'name' => 'utilisateur anonyme',
'weight' => 0,
);
// Exported role: utilisateur authentifié.
$roles['utilisateur authentifié'] = array(
'name' => 'utilisateur authentifié',
'weight' => 1,
'weight' => 12,
);
return $roles;
@@ -1,10 +1,7 @@
name = Materio publications
core = 7.x
package = Materio
dependencies[] = ctools
dependencies[] = features
dependencies[] = image
dependencies[] = list
dependencies[] = materio_content_types
dependencies[] = metatag
dependencies[] = node
@@ -32,8 +29,6 @@ features[user_role][] = Unverified
features[user_role][] = Utilisateur Alpha Tester
features[user_role][] = administrator
features[user_role][] = root
features[user_role][] = utilisateur anonyme
features[user_role][] = utilisateur authentifié
features[variable][] = additional_settings__active_tab_publication
features[variable][] = ant_pattern_publication
features[variable][] = ant_php_publication
@@ -63,10 +58,15 @@ features[variable][] = unique_field_comp_publication
features[variable][] = unique_field_fields_publication
features[variable][] = unique_field_scope_publication
features[variable][] = unique_field_show_matches_publication
features[variable][] = workflow_publication
features[workflow][] = Publication
features[workflow_access][] = Publication
features_exclude[dependencies][materio_subscriptions] = materio_subscriptions
features_exclude[dependencies][options] = options
features_exclude[dependencies][materio_page_title] = materio_page_title
features_exclude[dependencies][field_permissions] = field_permissions
features_exclude[dependencies][image] = image
features_exclude[dependencies][list] = list
features_exclude[user_permission][create field_weight] = create field_weight
features_exclude[user_permission][edit own field_weight] = edit own field_weight
features_exclude[user_permission][edit field_weight] = edit field_weight
features_exclude[user_permission][view own field_weight] = view own field_weight
features_exclude[user_permission][view field_weight] = view field_weight
project path = sites/all/modules/features
@@ -370,14 +370,5 @@ function materio_publications_strongarm() {
$strongarm->value = array();
$export['unique_field_show_matches_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'workflow_publication';
$strongarm->value = array(
0 => 'node',
);
$export['workflow_publication'] = $strongarm;
return $export;
}
@@ -19,7 +19,7 @@ function materio_subscriptions_user_default_roles() {
// Exported role: Premium.
$roles['Premium'] = array(
'name' => 'Premium',
'weight' => 7,
'weight' => 8,
);
// Exported role: Utilisateur.
@@ -1327,7 +1327,7 @@ function materio_user_profiles_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 8,
'weight' => 7,
),
);
@@ -10,25 +10,29 @@
function showroom_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'description_field'.
$field_bases['description_field'] = array(
// Exported field_base: 'field_location'.
$field_bases['field_location'] = array(
'active' => 1,
'cardinality' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'description_field',
'field_name' => 'field_location',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'format' => array(
0 => 'format',
'location' => array(
0 => 'location',
),
),
'locked' => 0,
'module' => 'text',
'module' => 'materio_showroom',
'settings' => array(
'entity_translation_sync' => FALSE,
'profile2_private' => FALSE,
),
'translatable' => 1,
'type' => 'text_with_summary',
'translatable' => 0,
'type' => 'field_materio_showroom_location',
);
// Exported field_base: 'field_showroom'.
@@ -10,6 +10,172 @@
function showroom_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-breve-field_showroom'.
$field_instances['node-breve-field_showroom'] = array(
'bundle' => 'breve',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'bookmark' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardbig' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardfull' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardmedium' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardsmall' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 12,
),
'homeblock' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_showroom',
'label' => 'Showroom',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'field_extrawidgets',
'settings' => array(
'content_taxonomy_opt_groups' => 0,
'display_empty' => 0,
'formatter' => '',
'formatter_settings' => array(),
),
'type' => 'field_extrawidgets_read_only',
'weight' => 4,
),
);
// Exported field_instance: 'node-materiau-field_location'.
$field_instances['node-materiau-field_location'] = array(
'bundle' => 'materiau',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'bookmark' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardbig' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 7,
),
'cardfull' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 17,
),
'cardmedium' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 22,
),
'cardsmall' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 8,
),
'default' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 25,
),
'homeblock' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'print' => array(
'label' => 'above',
'module' => 'materio_showroom',
'settings' => array(),
'type' => 'materio_showroom_location_simple_text',
'weight' => 7,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_location',
'label' => 'Samples',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'materio_showroom',
'settings' => array(
'vocabulary' => 19,
),
'type' => 'materio_showroom_location_text',
'weight' => -2,
),
);
// Exported field_instance: 'node-showroom-body'.
$field_instances['node-showroom-body'] = array(
'bundle' => 'showroom',
@@ -52,7 +218,7 @@ function showroom_field_default_field_instances() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
'weight' => 3,
),
'homeblock' => array(
'label' => 'above',
@@ -91,6 +257,83 @@ function showroom_field_default_field_instances() {
),
);
// Exported field_instance: 'node-showroom-field_memo'.
$field_instances['node-showroom-field_memo'] = array(
'bundle' => 'showroom',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'bookmark' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardbig' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardfull' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardmedium' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardsmall' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 5,
),
'homeblock' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_memo',
'label' => 'Mémo',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'rows' => 5,
),
'type' => 'text_textarea',
'weight' => 10,
),
);
// Exported field_instance: 'node-showroom-field_public_address'.
$field_instances['node-showroom-field_public_address'] = array(
'bundle' => 'showroom',
@@ -129,7 +372,7 @@ function showroom_field_default_field_instances() {
'weight' => 0,
),
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'addressfield',
'settings' => array(
'format_handlers' => array(
@@ -138,7 +381,7 @@ function showroom_field_default_field_instances() {
'use_widget_handlers' => 1,
),
'type' => 'addressfield_default',
'weight' => 2,
'weight' => 0,
),
'homeblock' => array(
'label' => 'above',
@@ -430,7 +673,7 @@ function showroom_field_default_field_instances() {
),
),
'type' => 'addressfield_standard',
'weight' => 8,
'weight' => 7,
),
);
@@ -472,11 +715,11 @@ function showroom_field_default_field_instances() {
'weight' => 0,
),
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'email',
'settings' => array(),
'type' => 'email_default',
'weight' => 3,
'weight' => 1,
),
'homeblock' => array(
'label' => 'above',
@@ -506,7 +749,7 @@ function showroom_field_default_field_instances() {
'size' => 60,
),
'type' => 'email_textfield',
'weight' => 10,
'weight' => 8,
),
);
@@ -547,11 +790,11 @@ function showroom_field_default_field_instances() {
'weight' => 0,
),
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'cck_phone',
'settings' => array(),
'type' => 'global_phone_number',
'weight' => 4,
'weight' => 2,
),
'homeblock' => array(
'label' => 'above',
@@ -823,7 +1066,7 @@ function showroom_field_default_field_instances() {
'size' => 15,
),
'type' => 'phone_number',
'weight' => 12,
'weight' => 9,
),
);
@@ -864,11 +1107,10 @@ function showroom_field_default_field_instances() {
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'taxonomy',
'label' => 'hidden',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 1,
'type' => 'hidden',
'weight' => 4,
),
'homeblock' => array(
'label' => 'above',
@@ -916,7 +1158,7 @@ function showroom_field_default_field_instances() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 1,
@@ -955,7 +1197,7 @@ function showroom_field_default_field_instances() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
@@ -1024,8 +1266,10 @@ function showroom_field_default_field_instances() {
t('Body');
t('Description');
t('Email');
t('Mémo');
t('Nom');
t('Phone');
t('Samples');
t('Showroom');
return $field_instances;
@@ -8,6 +8,9 @@
* Implements hook_ctools_plugin_api().
*/
function showroom_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "field_group" && $api == "field_group") {
return array("version" => "1");
}
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
@@ -23,7 +26,7 @@ function showroom_node_info() {
'base' => 'node_content',
'description' => '',
'has_title' => '1',
'title_label' => t('Name'),
'title_label' => t('Nom'),
'help' => '',
),
);
@@ -0,0 +1,39 @@
<?php
/**
* @file
* showroom.features.menu_links.inc
*/
/**
* Implements hook_menu_default_menu_links().
*/
function showroom_menu_default_menu_links() {
$menu_links = array();
// Exported menu link: navigation_showroom:node/add/showroom.
$menu_links['navigation_showroom:node/add/showroom'] = array(
'menu_name' => 'navigation',
'link_path' => 'node/add/showroom',
'router_path' => 'node/add/showroom',
'link_title' => 'Showroom',
'options' => array(
'identifier' => 'navigation_showroom:node/add/showroom',
),
'module' => 'system',
'hidden' => 0,
'external' => 0,
'has_children' => 0,
'expanded' => 0,
'weight' => -44,
'customized' => 1,
'language' => 'und',
'menu_links_customized' => 1,
'parent_identifier' => 'navigation_add-content:node/add',
);
// Translatables
// Included for use with string extractors like potx.
t('Showroom');
return $menu_links;
}
@@ -10,9 +10,9 @@
function showroom_user_default_permissions() {
$permissions = array();
// Exported permission: 'assign Showroom role'.
$permissions['assign Showroom role'] = array(
'name' => 'assign Showroom role',
// Exported permission: 'assign Admin showroom role'.
$permissions['assign Admin showroom role'] = array(
'name' => 'assign Admin showroom role',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
@@ -20,6 +20,17 @@ function showroom_user_default_permissions() {
'module' => 'role_delegation',
);
// Exported permission: 'create field_location'.
$permissions['create field_location'] = array(
'name' => 'create field_location',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_showroom'.
$permissions['create field_showroom'] = array(
'name' => 'create field_showroom',
@@ -45,6 +56,7 @@ function showroom_user_default_permissions() {
'name' => 'create showroom content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
@@ -54,6 +66,7 @@ function showroom_user_default_permissions() {
'name' => 'delete any showroom content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
@@ -63,6 +76,7 @@ function showroom_user_default_permissions() {
'name' => 'delete own showroom content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
@@ -72,16 +86,16 @@ function showroom_user_default_permissions() {
'name' => 'delete terms in showroom',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'taxonomy',
);
// Exported permission: 'delete users with role 15'.
$permissions['delete users with role 15'] = array(
'name' => 'delete users with role 15',
// Exported permission: 'delete users with role 13'.
$permissions['delete users with role 13'] = array(
'name' => 'delete users with role 13',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'administerusersbyrole',
);
@@ -91,10 +105,22 @@ function showroom_user_default_permissions() {
'name' => 'edit any showroom content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
// Exported permission: 'edit field_location'.
$permissions['edit field_location'] = array(
'name' => 'edit field_location',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_showroom'.
$permissions['edit field_showroom'] = array(
'name' => 'edit field_showroom',
@@ -115,6 +141,17 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_location'.
$permissions['edit own field_location'] = array(
'name' => 'edit own field_location',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_showroom'.
$permissions['edit own field_showroom'] = array(
'name' => 'edit own field_showroom',
@@ -140,6 +177,7 @@ function showroom_user_default_permissions() {
'name' => 'edit own showroom content',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'node',
);
@@ -149,16 +187,16 @@ function showroom_user_default_permissions() {
'name' => 'edit terms in showroom',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'taxonomy',
);
// Exported permission: 'edit users with role 15'.
$permissions['edit users with role 15'] = array(
'name' => 'edit users with role 15',
// Exported permission: 'edit users with role 13'.
$permissions['edit users with role 13'] = array(
'name' => 'edit users with role 13',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'administerusersbyrole',
);
@@ -166,71 +204,124 @@ function showroom_user_default_permissions() {
// Exported permission: 'enter showroom revision log entry'.
$permissions['enter showroom revision log entry'] = array(
'name' => 'enter showroom revision log entry',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'materio showroom edit all samples fields'.
$permissions['materio showroom edit all samples fields'] = array(
'name' => 'materio showroom edit all samples fields',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'materio_showroom',
);
// Exported permission: 'materio showroom migrate fields'.
$permissions['materio showroom migrate fields'] = array(
'name' => 'materio showroom migrate fields',
'roles' => array(
'root' => 'root',
),
'module' => 'materio_showroom',
);
// Exported permission: 'merge showroom terms'.
$permissions['merge showroom terms'] = array(
'name' => 'merge showroom terms',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'term_merge',
);
// Exported permission: 'override showroom authored by option'.
$permissions['override showroom authored by option'] = array(
'name' => 'override showroom authored by option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'override showroom authored on option'.
$permissions['override showroom authored on option'] = array(
'name' => 'override showroom authored on option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'override showroom promote to front page option'.
$permissions['override showroom promote to front page option'] = array(
'name' => 'override showroom promote to front page option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'override showroom published option'.
$permissions['override showroom published option'] = array(
'name' => 'override showroom published option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'override showroom revision option'.
$permissions['override showroom revision option'] = array(
'name' => 'override showroom revision option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'override showroom sticky option'.
$permissions['override showroom sticky option'] = array(
'name' => 'override showroom sticky option',
'roles' => array(),
'roles' => array(
'root' => 'root',
),
'module' => 'override_node_options',
);
// Exported permission: 'show showroom title'.
$permissions['show showroom title'] = array(
'name' => 'show showroom title',
'roles' => array(),
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'materio_page_title',
);
// Exported permission: 'view field_location'.
$permissions['view field_location'] = array(
'name' => 'view field_location',
'roles' => array(
'Adhérent' => 'Adhérent',
'Admin showroom' => 'Admin showroom',
'Premium' => 'Premium',
'Student' => 'Student',
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_showroom'.
$permissions['view field_showroom'] = array(
'name' => 'view field_showroom',
'roles' => array(
'Showroom' => 'Showroom',
'administrator' => 'administrator',
'root' => 'root',
),
@@ -247,6 +338,17 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_location'.
$permissions['view own field_location'] = array(
'name' => 'view own field_location',
'roles' => array(
'Admin showroom' => 'Admin showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_showroom'.
$permissions['view own field_showroom'] = array(
'name' => 'view own field_showroom',
@@ -10,10 +10,10 @@
function showroom_user_default_roles() {
$roles = array();
// Exported role: Showroom.
$roles['Showroom'] = array(
'name' => 'Showroom',
'weight' => 13,
// Exported role: Admin showroom.
$roles['Admin showroom'] = array(
'name' => 'Admin showroom',
'weight' => 10,
);
return $roles;
@@ -0,0 +1,47 @@
<?php
/**
* @file
* showroom.field_group.inc
*/
/**
* Implements hook_field_group_info().
*/
function showroom_field_group_info() {
$field_groups = array();
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_showroom|node|materiau|form';
$field_group->group_name = 'group_showroom';
$field_group->entity_type = 'node';
$field_group->bundle = 'materiau';
$field_group->mode = 'form';
$field_group->parent_name = 'group_htabs';
$field_group->data = array(
'label' => 'Showroom Samples',
'weight' => '17',
'children' => array(
0 => 'field_localisation',
1 => 'field_location',
),
'format_type' => 'htab',
'format_settings' => array(
'label' => 'Showroom Samples',
'instance_settings' => array(
'required_fields' => 1,
'classes' => 'group-showroom field-group-htab',
'description' => '',
),
'formatter' => 'closed',
),
);
$field_groups['group_showroom|node|materiau|form'] = $field_group;
// Translatables
// Included for use with string extractors like potx.
t('Showroom Samples');
return $field_groups;
}
@@ -6,11 +6,18 @@ dependencies[] = administerusersbyrole
dependencies[] = cck_phone
dependencies[] = ctools
dependencies[] = email
dependencies[] = entity
dependencies[] = features
dependencies[] = features_translations
dependencies[] = field_extrawidgets
dependencies[] = field_group
dependencies[] = field_permissions
dependencies[] = materio_content_types
dependencies[] = materio_page_title
dependencies[] = materio_showroom
dependencies[] = materio_subscriptions
dependencies[] = materio_user_profiles
dependencies[] = menu
dependencies[] = metatag
dependencies[] = node
dependencies[] = options
@@ -19,16 +26,20 @@ dependencies[] = role_delegation
dependencies[] = rules
dependencies[] = strongarm
dependencies[] = taxonomy
dependencies[] = taxonomy_access
dependencies[] = term_merge
dependencies[] = text
dependencies[] = tode
features[ctools][] = field_group:field_group:1
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = description_field
features[field_base][] = field_location
features[field_base][] = field_showroom
features[field_base][] = field_tode_showroom
features[field_group][] = group_showroom|node|materiau|form
features[field_instance][] = node-breve-field_showroom
features[field_instance][] = node-materiau-field_location
features[field_instance][] = node-showroom-body
features[field_instance][] = node-showroom-field_memo
features[field_instance][] = node-showroom-field_public_address
features[field_instance][] = node-showroom-field_public_email
features[field_instance][] = node-showroom-field_public_phone
@@ -36,26 +47,32 @@ features[field_instance][] = node-showroom-field_tode_showroom
features[field_instance][] = taxonomy_term-showroom-description_field
features[field_instance][] = taxonomy_term-showroom-name_field
features[field_instance][] = user-user-field_showroom
features[menu_links][] = navigation_showroom:node/add/showroom
features[node][] = showroom
features[rules_config][] = rules_auto_tag_news_with_showroom
features[taxonomy][] = showroom
features[user_permission][] = assign Showroom role
features[user_permission][] = assign Admin showroom role
features[user_permission][] = create field_location
features[user_permission][] = create field_showroom
features[user_permission][] = create field_tode_showroom
features[user_permission][] = create showroom content
features[user_permission][] = delete any showroom content
features[user_permission][] = delete own showroom content
features[user_permission][] = delete terms in showroom
features[user_permission][] = delete users with role 15
features[user_permission][] = delete users with role 13
features[user_permission][] = edit any showroom content
features[user_permission][] = edit field_location
features[user_permission][] = edit field_showroom
features[user_permission][] = edit field_tode_showroom
features[user_permission][] = edit own field_location
features[user_permission][] = edit own field_showroom
features[user_permission][] = edit own field_tode_showroom
features[user_permission][] = edit own showroom content
features[user_permission][] = edit terms in showroom
features[user_permission][] = edit users with role 15
features[user_permission][] = edit users with role 13
features[user_permission][] = enter showroom revision log entry
features[user_permission][] = materio showroom edit all samples fields
features[user_permission][] = materio showroom migrate fields
features[user_permission][] = merge showroom terms
features[user_permission][] = override showroom authored by option
features[user_permission][] = override showroom authored on option
@@ -64,11 +81,13 @@ features[user_permission][] = override showroom published option
features[user_permission][] = override showroom revision option
features[user_permission][] = override showroom sticky option
features[user_permission][] = show showroom title
features[user_permission][] = view field_location
features[user_permission][] = view field_showroom
features[user_permission][] = view field_tode_showroom
features[user_permission][] = view own field_location
features[user_permission][] = view own field_showroom
features[user_permission][] = view own field_tode_showroom
features[user_role][] = Showroom
features[user_role][] = Admin showroom
features[variable][] = additional_settings__active_tab_showroom
features[variable][] = ant_pattern_showroom
features[variable][] = ant_php_showroom
@@ -81,10 +100,16 @@ features[variable][] = diff_show_preview_changes_node_showroom
features[variable][] = diff_view_mode_preview_node_showroom
features[variable][] = entity_translation_hide_translation_links_showroom
features[variable][] = entity_translation_node_metadata_showroom
features[variable][] = entity_translation_settings_node__showroom
features[variable][] = field_bundle_settings_node__showroom
features[variable][] = i18n_node_extended_showroom
features[variable][] = i18n_node_options_showroom
features[variable][] = language_content_type_showroom
features[variable][] = materio_showroom_migrate_default_term
features[variable][] = materio_showroom_migrate_node_type
features[variable][] = materio_showroom_migrate_source_field
features[variable][] = materio_showroom_migrate_target_field
features[variable][] = materio_showroom_migrate_vocabulary
features[variable][] = menu_options_showroom
features[variable][] = menu_parent_showroom
features[variable][] = metatag_enable_node__showroom
@@ -102,4 +127,32 @@ features[variable][] = unique_field_comp_showroom
features[variable][] = unique_field_fields_showroom
features[variable][] = unique_field_scope_showroom
features[variable][] = unique_field_show_matches_showroom
features[variable][] = workflow_showroom
features_exclude[field_base][field_memo] = field_memo
features_exclude[field_base][field_public_phone] = field_public_phone
features_exclude[field_base][field_public_address] = field_public_address
features_exclude[field_base][field_public_email] = field_public_email
features_exclude[field_base][name_field] = name_field
features_exclude[field_base][description_field] = description_field
features_exclude[field_group][group_htabs|node|materiau|form] = group_htabs|node|materiau|form
features_exclude[user_permission][create field_memo] = create field_memo
features_exclude[user_permission][edit own field_memo] = edit own field_memo
features_exclude[user_permission][edit field_memo] = edit field_memo
features_exclude[user_permission][view own field_memo] = view own field_memo
features_exclude[user_permission][view field_memo] = view field_memo
features_exclude[user_permission][create field_public_phone] = create field_public_phone
features_exclude[user_permission][edit own field_public_phone] = edit own field_public_phone
features_exclude[user_permission][edit field_public_phone] = edit field_public_phone
features_exclude[user_permission][view own field_public_phone] = view own field_public_phone
features_exclude[user_permission][view field_public_phone] = view field_public_phone
features_exclude[user_permission][create field_public_address] = create field_public_address
features_exclude[user_permission][edit own field_public_address] = edit own field_public_address
features_exclude[user_permission][edit field_public_address] = edit field_public_address
features_exclude[user_permission][view own field_public_address] = view own field_public_address
features_exclude[user_permission][view field_public_address] = view field_public_address
features_exclude[user_permission][create field_public_email] = create field_public_email
features_exclude[user_permission][edit own field_public_email] = edit own field_public_email
features_exclude[user_permission][edit field_public_email] = edit field_public_email
features_exclude[user_permission][view own field_public_email] = view own field_public_email
features_exclude[user_permission][view field_public_email] = view field_public_email
project path = sites/all/modules/features
@@ -22,10 +22,10 @@ function showroom_strongarm() {
$strongarm->api_version = 1;
$strongarm->name = 'ant_pattern_showroom';
$strongarm->value = '<?php
//[node:field-tode-showroom:name]
$items = field_get_items(\'node\', $node, \'field_tode_showroom\');
return t($items[0][\'name\']);
?>
';
?>';
$export['ant_pattern_showroom'] = $strongarm;
$strongarm = new stdClass();
@@ -98,12 +98,71 @@ return t($items[0][\'name\']);
$strongarm->value = '0';
$export['entity_translation_node_metadata_showroom'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'entity_translation_settings_node__showroom';
$strongarm->value = array(
'default_language' => 'und',
'hide_language_selector' => 0,
'exclude_language_none' => 0,
'lock_language' => 0,
'shared_fields_original_only' => 0,
);
$export['entity_translation_settings_node__showroom'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'field_bundle_settings_node__showroom';
$strongarm->value = array(
'view_modes' => array(),
'view_modes' => array(
'teaser' => array(
'custom_settings' => TRUE,
),
'homeblock' => array(
'custom_settings' => TRUE,
),
'bookmark' => array(
'custom_settings' => TRUE,
),
'cardsmall' => array(
'custom_settings' => TRUE,
),
'cardmedium' => array(
'custom_settings' => TRUE,
),
'cardbig' => array(
'custom_settings' => TRUE,
),
'cardfull' => array(
'custom_settings' => TRUE,
),
'full' => array(
'custom_settings' => FALSE,
),
'rss' => array(
'custom_settings' => FALSE,
),
'diff_standard' => array(
'custom_settings' => FALSE,
),
'print' => array(
'custom_settings' => FALSE,
),
'email_plain' => array(
'custom_settings' => FALSE,
),
'email_html' => array(
'custom_settings' => FALSE,
),
'email_textalt' => array(
'custom_settings' => FALSE,
),
'token' => array(
'custom_settings' => FALSE,
),
),
'extra_fields' => array(
'form' => array(
'metatags' => array(
@@ -148,6 +207,41 @@ return t($items[0][\'name\']);
$strongarm->value = '4';
$export['language_content_type_showroom'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'materio_showroom_migrate_default_term';
$strongarm->value = '7557';
$export['materio_showroom_migrate_default_term'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'materio_showroom_migrate_node_type';
$strongarm->value = 'materiau';
$export['materio_showroom_migrate_node_type'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'materio_showroom_migrate_source_field';
$strongarm->value = 'field_localisation';
$export['materio_showroom_migrate_source_field'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'materio_showroom_migrate_target_field';
$strongarm->value = 'field_location';
$export['materio_showroom_migrate_target_field'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'materio_showroom_migrate_vocabulary';
$strongarm->value = '19';
$export['materio_showroom_migrate_vocabulary'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -182,7 +276,7 @@ return t($items[0][\'name\']);
$strongarm->name = 'nodeformscols_field_placements_showroom_default';
$strongarm->value = array(
'additional_settings' => array(
'region' => 'main',
'region' => 'footer',
'weight' => '5',
'has_required' => FALSE,
'title' => 'Onglets verticaux',
@@ -190,7 +284,7 @@ return t($items[0][\'name\']);
),
'actions' => array(
'region' => 'right',
'weight' => '2',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Enregistrer',
'hidden' => 0,
@@ -211,7 +305,7 @@ return t($items[0][\'name\']);
),
'body' => array(
'region' => 'main',
'weight' => '1',
'weight' => '4',
'has_required' => FALSE,
'title' => 'Body',
'hidden' => 0,
@@ -225,24 +319,31 @@ return t($items[0][\'name\']);
),
'field_public_address' => array(
'region' => 'main',
'weight' => '4',
'weight' => '3',
'has_required' => TRUE,
'title' => 'Adresse',
),
'field_public_email' => array(
'region' => 'main',
'weight' => '2',
'weight' => '1',
'has_required' => FALSE,
'title' => 'Email',
'hidden' => 0,
),
'field_public_phone' => array(
'region' => 'main',
'weight' => '3',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Phone',
'hidden' => 0,
),
'field_memo' => array(
'region' => 'right',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Mémo',
'hidden' => 0,
),
);
$export['nodeformscols_field_placements_showroom_default'] = $strongarm;
@@ -315,7 +416,9 @@ return t($items[0][\'name\']);
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'unique_field_fields_showroom';
$strongarm->value = array();
$strongarm->value = array(
0 => 'field_tode_showroom',
);
$export['unique_field_fields_showroom'] = $strongarm;
$strongarm = new stdClass();
@@ -332,5 +435,14 @@ return t($items[0][\'name\']);
$strongarm->value = array();
$export['unique_field_show_matches_showroom'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'workflow_showroom';
$strongarm->value = array(
0 => 'node',
);
$export['workflow_showroom'] = $strongarm;
return $export;
}
@@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function translations_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
@@ -0,0 +1,40 @@
<?php
/**
* @file
* translations.features.language.inc
*/
/**
* Implements hook_locale_default_languages().
*/
function translations_locale_default_languages() {
$languages = array();
// Exported language: en.
$languages['en'] = array(
'language' => 'en',
'name' => 'English',
'native' => 'English',
'direction' => 0,
'enabled' => 1,
'plurals' => 0,
'formula' => '',
'domain' => '',
'prefix' => 'en',
'weight' => -10,
);
// Exported language: fr.
$languages['fr'] = array(
'language' => 'fr',
'name' => 'French',
'native' => 'Français',
'direction' => 0,
'enabled' => 1,
'plurals' => 2,
'formula' => '($n>1)',
'domain' => '',
'prefix' => 'fr',
'weight' => -9,
);
return $languages;
}
@@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.translations_cs.inc
*/
/**
* Implements hook_translations_cs_defaults().
*/
function translations_translations_cs_defaults() {
$translations = array();
$translatables = array();
return $translations;
}
@@ -0,0 +1,59 @@
<?php
/**
* @file
* translations.features.translations_fr.inc
*/
/**
* Implements hook_translations_fr_defaults().
*/
function translations_translations_fr_defaults() {
$translations = array();
$translatables = array();
$translations['fr:default']['4194d8cbfbfed42d6fd00145134d1c78'] = array(
'source' => 'Lost my password',
'context' => '',
'location' => '/fr',
'translation' => 'J\'ai perdu mon mot de passe',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Lost my password', array(), array('context' => ''));
$translations['fr:default']['43e6ee9cfc1d52719df78e10c6c0cd64'] = array(
'source' => 'Member access',
'context' => '',
'location' => '/fr',
'translation' => 'Accès membre',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Member access', array(), array('context' => ''));
$translations['fr:default']['4a401353fd71b0c461fe419a6431f1e9'] = array(
'source' => '<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ',
'context' => '',
'location' => '/fr/materio_search_api_ajax/actuality/1?keys=',
'translation' => '<strong>Oups!</strong></br> Pour accéder aux informations collectées par matériO sur les milliers de producteurs de matières émergentes, il vous est nécessaire d\'adhérer a matériO.',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ', array(), array('context' => ''));
$translations['fr:default']['daef5b384f5a22ebfbbb89feefc76c81'] = array(
'source' => 'Pursue',
'context' => '',
'location' => '/fr/form/adh-sion',
'translation' => 'Poursuivre',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('Pursue', array(), array('context' => ''));
$translations['fr:default']['dd1ba1872df91985ed1ca4cde2dfe669'] = array(
'source' => 'News',
'context' => '',
'location' => '/fr/admin/structure/features/cleanup/clear',
'translation' => 'Brèves',
'plid' => 0,
'plural' => 0,
);
$translatables[] = t('News', array(), array('context' => ''));
return $translations;
}
@@ -0,0 +1,14 @@
<?php
/**
* @file
* translations.features.translations_zh_hans.inc
*/
/**
* Implements hook_translations_zh_hans_defaults().
*/
function translations_translations_zh_hans_defaults() {
$translations = array();
$translatables = array();
return $translations;
}
@@ -0,0 +1,33 @@
<?php
/**
* @file
* translations.features.user_permission.inc
*/
/**
* Implements hook_user_default_permissions().
*/
function translations_user_default_permissions() {
$permissions = array();
// Exported permission: 'administer languages'.
$permissions['administer languages'] = array(
'name' => 'administer languages',
'roles' => array(
'root' => 'root',
),
'module' => 'locale',
);
// Exported permission: 'translate interface'.
$permissions['translate interface'] = array(
'name' => 'translate interface',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'locale',
);
return $permissions;
}
@@ -0,0 +1,20 @@
<?php
/**
* @file
* translations.features.user_role.inc
*/
/**
* Implements hook_user_default_roles().
*/
function translations_user_default_roles() {
$roles = array();
// Exported role: Translator.
$roles['Translator'] = array(
'name' => 'Translator',
'weight' => 9,
);
return $roles;
}
@@ -0,0 +1,21 @@
name = Translations
core = 7.x
package = Materio
version = 7.x-1.0-beta
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[language][] = en
features[language][] = fr
features[user_permission][] = administer languages
features[user_permission][] = translate interface
features[user_role][] = Translator
features[variable][] = i18n_node_translation_switch
features[variable][] = locale_field_language_fallback
features[variable][] = locale_language_negotiation_url_part
features[variable][] = locale_language_providers_weight_language
features[variable][] = taxonomy_csv_locale_custom
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][features] = features
features_exclude[dependencies][locale] = locale
features_exclude[dependencies][strongarm] = strongarm
project path = sites/all/modules/features
@@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the Translations feature.
*/
include_once 'translations.features.inc';
@@ -0,0 +1,55 @@
<?php
/**
* @file
* translations.strongarm.inc
*/
/**
* Implements hook_strongarm().
*/
function translations_strongarm() {
$export = array();
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'i18n_node_translation_switch';
$strongarm->value = 1;
$export['i18n_node_translation_switch'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_field_language_fallback';
$strongarm->value = 1;
$export['locale_field_language_fallback'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_language_negotiation_url_part';
$strongarm->value = '0';
$export['locale_language_negotiation_url_part'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'locale_language_providers_weight_language';
$strongarm->value = array(
'locale-user' => '-9',
'locale-url' => '-10',
'locale-session' => '-8',
'locale-browser' => '-7',
'language-default' => '-6',
);
$export['locale_language_providers_weight_language'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'taxonomy_csv_locale_custom';
$strongarm->value = '';
$export['taxonomy_csv_locale_custom'] = $strongarm;
return $export;
}
@@ -22,7 +22,7 @@ function contentsadminrelink_menu() {
*/
# useless, just play with perms and menu_alter
// function contentsadminrelink_url_outbound_alter(&$path, &$options, $original_path) {
// if ($path == 'admin/content' || $path == 'admin/content/node') {
// if ($path == 'admin/content' || $path == 'admin/content/node') {
// $path = 'admin/content/nodes';
// }
//}
@@ -57,7 +57,7 @@ function contentsadminrelink_menu_alter(&$items) {
if(isset($items['admin/content/media']))
$items['admin/content/media']['access arguments'] = array('access classic media overview');
// dsm($items, '$items');
}
@@ -65,70 +65,71 @@ function contentsadminrelink_menu_alter(&$items) {
* Implements hook_menu_local_tasks_alter().
*/
function contentsadminrelink_menu_local_tasks_alter(&$data, $router_item, $root_path) {
switch($root_path){
switch($root_path){
case 'admin/content/nodes' : // for example 'page/view/news'
$item = menu_get_item('node/add');
if ($item['access']) {
$item = menu_get_item('node/add');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
break;
break;
case 'admin/content/materiaux' :
$item = menu_get_item('node/add/materiau');
if ($item['access']) {
$item = menu_get_item('node/add/materiau');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
$item = menu_get_item('node/add/breve');
if ($item['access']) {
$item = menu_get_item('node/add/breve');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
break;
break;
case 'admin/content/companies' :
$item = menu_get_item('node/add/company');
if ($item['access']) {
$item = menu_get_item('node/add/company');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
$item = menu_get_item('admin/people/create');
if ($item['access']) {
$item = menu_get_item('admin/people/create');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
break;
break;
case 'admin/users' :
$item = menu_get_item('admin/people/create');
if ($item['access']) {
$item = menu_get_item('admin/people/create');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
break;
break;
// case 'admin/content/medias' : // for example 'page/view/news'
// $item = menu_get_item('admin/content/media/import');
// if ($item['access']) {
// $item = menu_get_item('admin/content/media/import');
// if ($item['access']) {
// $data['actions']['output'][] = array(
// '#theme' => 'menu_local_action',
// '#link' => $item,
// );
// }
// break;
}
// break;
}
}
@@ -0,0 +1,16 @@
/**
* @file
* Javascript for materio showroom field location.
*/
/**
* Disable draggable behaviour for the field.
*/
(function ($) {
Drupal.behaviors.field_materio_showroom_location = {
attach: function(context) {
// console.log('hello materio_showroom');
$(".field-multiple-drag", ".field-type-field-materio-showroom-location").hide();
}
}
})(jQuery);
@@ -1,29 +0,0 @@
// Dust project settings, you can edit it and set custom settings.
{
// The mappings of source directory and output directory
"mappings": [
// {
// "src": "path/to/source",
// "dest": "path/to/output"
// }
],
// Add the ignore rules that Koala will not search them.
// e.g. ["*.json", "*.txt", "test", "path/libs"]
"ignores": [],
// Options of Compilers.
"options": {
// "key": "val",
// "key2": "val2"
// ...
},
// Other compile options.
// e.g, ["--strict-imports", ... ,"--rootpath=URL"].
// Run the command 'lessc -h' to see more options.
"custom_options": [],
// An array of filesystem paths or importers which should be searched for LESS templates imported with the @import directive.
"include_paths": ["/home/bachir/Developer/codekitframeworks/gui_ck_fw", "/home/bachir/Developer/codekitframeworks/bootstrap/less"]
}
@@ -18,6 +18,10 @@ function materio_admin_permission() {
'title' => t('access duplicate mails list'),
'description' => t('access duplicate mails list.'),
),
'materio admin fix term reference field' => array(
'title' => t('Materio admin fix term reference field'),
'description' => t('Materio admin fix term reference field.'),
),
);
}
@@ -34,23 +38,10 @@ function materio_admin_menu() {
'type' => MENU_LOCAL_TASK
);
if(module_exists('simplenews')){
$cats = simplenews_category_list();
// dsm($cats, 'cats');
foreach ($cats as $tid => $name) {
// $items['node/%node/simplenews'] = array(
// 'title' => 'Newsletter',
// 'type' => MENU_LOCAL_TASK,
// 'access callback' => 'simplenews_node_tab_access',
// 'access arguments' => array(1),
// 'page callback' => 'simplenews_node_tab_page',
// 'page arguments' => array(1),
// 'context' => MENU_LOCAL_TASK,
// 'file' => 'includes/simplenews.admin.inc',
// 'weight' => 2,
// );
$items['node/add/simplenews/'.$tid] = array(
'title' => $name,
'title callback' => 'check_plain',
@@ -63,6 +54,23 @@ function materio_admin_menu() {
);
}
}
// fix term ref field lost with taxonomy
$items['admin/config/content/materio'] = array(
'title' => 'Materio',
'page callback' => 'drupal_get_form',
'page arguments' => array('materio_admin_fix_termref_fields_form'),
'access arguments' => array('materio admin fix term reference field'),
'type' => MENU_NORMAL_ITEM,
);
$items['admin/config/content/materio/fix_termref_fields'] = array(
'title' => 'Fix term reference field from taxonomy',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
return $items;
}
@@ -106,6 +114,242 @@ function materio_duplicatemails(){
return $output;
}
function materio_admin_fix_termref_fields_form(){
drupal_set_title('Fix term reference fields', PASS_THROUGH);
$types = node_type_get_types();
// dsm($types, 'types');
$nt_options = array();
foreach ($types as $mn => $type) {
$nt_options[$mn] = $type->name;
}
$node_type = variable_get('materio_admin_fix_termref_node_type', null);
// source field (must be a text field)
$form['node_type'] = array(
'#type'=>'select',
'#options'=>$nt_options,
'#default_value' => $node_type,
'#title' => t('Content type'),
'#multiple' => false,
);
if($node_type){
$fieldsmap = field_info_field_map();
$target_options = array();
foreach ($fieldsmap as $field_name => $field) {
// dsm($field, $field_name);
if ($field['type'] == 'taxonomy_term_reference'
&& isset($field['bundles']['node'])
&& in_array($node_type, $field['bundles']['node'])) {
$target_options[$field_name] = $field_name;
}
}
$target_field = variable_get('materio_admin_fix_termref_target_field', null);
// target field (must be a entity_reference field)
$form['target_field'] = array(
'#type'=>'select',
'#options'=>$target_options,
'#default_value' => $target_field,
'#title' => t('target field (must be a term_reference field)'),
'#multiple' => false,
);
if($target_field){
// retrive various field infos
$field_info = field_info_field($target_field);
// dsm($field_info, 'field_info');
// $field_instance = field_info_instance('node', $target_field, $node_type);
// dsm($field_instance, 'field_instance');
$voc_name = $field_info['settings']['allowed_values'][0]['vocabulary'];
$vid = taxonomy_vocabulary_machine_name_load($voc_name)->vid;
$voc = taxonomy_vocabulary_load($vid);
$tree = taxonomy_get_tree($vid);
// dsm($tree, 'tree');
foreach ($tree as $key => $term) {
$terms[$term->tid] = $term->name;
}
$src_term = variable_get('materio_admin_fix_termref_src_term', null);
// src term
$form['src_term'] = array(
'#type'=>'select',
'#options'=>$terms,
'#default_value' => $src_term,
'#title' => t('source term'),
'#multiple' => false,
);
if($src_term){
$form['txt_nids'] = array(
'#type'=>'textarea',
'#title' => t('nids to fix'),
'#description' => t('comma separated nids list'),
);
$form['fixterms'] = array(
'#type' => 'submit',
'#value' => 'Fixterms',
);
// $nodes = taxonomy_select_nodes($src_term, false);
// dsm($nodes, 'nodes');
// $src_items = field_get_items('node', node_load(11858), $target_field);
// dsm($src_items);
}
}
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
// '#submit' => array('materio_showroom_migrate_location_fields_migrate'),
);
return $form;
}
function materio_admin_fix_termref_fields_form_submit($form, &$form_state){
// dsm($form_state, 'form_state');
$node_type = $form_state['values']['node_type']; $context['results']['field_migrated']++;
$target_field = $form_state['values']['target_field'];
$src_term = $form_state['values']['src_term'];
variable_set('materio_admin_fix_termref_node_type', $node_type);
variable_set('materio_admin_fix_termref_target_field', $target_field);
variable_set('materio_admin_fix_termref_src_term', $src_term);
$nids = explode(',', $form_state['values']['txt_nids']);
if ($form_state['values']['op'] == 'Fixterms' && !empty($nids)){
_materio_admin_batch_fixterm_ref($node_type, $target_field, $src_term, $nids);
}
}
function _materio_admin_batch_fixterm_ref($node_type, $target_field, $src_tid, $nids){
// Reset counter for debug information.
$_SESSION['http_request_count'] = 0;
$batch = array(
'title' => t('Fixing ref terms ...'),
'operations' => array(),
'init_message' => t('Commencing'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('An error occurred during processing'),
'finished' => '_materio_admin_batch_fixterm_ref_finished',
);
foreach ($nids as $nid) {
$nid = trim($nid);
$batch['operations'][] = array(
'_materio_admin_batch_fixterm_ref_op',
array(
$nid,
$src_tid, $target_field,
$node_type,
)
);
}
batch_set($batch);
}
function _materio_admin_batch_fixterm_ref_op($nid, $src_tid, $target_field, $node_type){
$context['results']['field_migrated']++;
$node = node_load($nid);
if($node->type == $node_type){
$items = field_get_items('node', $node, $target_field);
foreach ($items as $key => $item) {
$flat_items[] = $item['tid'];
}
if(!in_array($src_tid, $flat_items)){
// $items[] = array('tid'=>$src_tid);
$node->{$target_field}[LANGUAGE_NONE][] = array('tid'=>$src_tid);
}
node_save($node);
}
//Simply show the import row count.
$context['message'] = t('Migrating node !c : %title (%nid)', array(
'!c' => $context['results']['field_migrated'],
'%title'=>$node->title,
'%nid'=>$nid ));
// In order to slow importing and debug better,
// we can uncomment this line to make each import slightly slower.
// usleep(2500);
if ( false ) {
$context['results']['failed_nodes'][] = $nid ;
}
_materio_admin_update_http_requests();
}
function _materio_admin_batch_fixterm_ref_finished($success, $results, $operations){
// dsm($success, 'success');
// dsm($results, 'results');
// dsm($operations, 'operations');
if ($success) {
// Here we could do something meaningful with the results.
// We just display the number of nodes we processed...
drupal_set_message(t('@count results processed in @requests HTTP requests.', array('@count' => count($results), '@requests' => _materio_admin_get_http_requests())));
drupal_set_message(t('The final result was "%final"', array('%final' => end($results))));
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
drupal_set_message(
t('operations : @args',
array(
'@args' => print_r(current($operations), TRUE),
)
),
'error'
);
$error_operation = reset($operations);
drupal_set_message(
t('An error occurred while processing @operation with arguments : @args',
array(
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
)
),
'error'
);
}
}
/**
* Utility function to increment HTTP requests in a session variable.
*/
function _materio_admin_update_http_requests() {
$_SESSION['http_request_count']++;
}
/**
* Utility function to count the HTTP requests in a session variable.
*
* @return int
* Number of requests.
*/
function _materio_admin_get_http_requests() {
return !empty($_SESSION['http_request_count']) ? $_SESSION['http_request_count'] : 0;
}
/**
* Implements hook_menu_alter().
*/
@@ -0,0 +1,23 @@
name = Materio Showroom
description = "Materio showroom dedicated module"
; Core version (required)
core = 7.x
; Package name (see http://drupal.org/node/542202 for a list of names)
package = Materio
; PHP version requirement (optional)
; php = 5.2
; Loadable code files
; files[] = materio_ctools_automodal.module
; Module dependencies
dependencies[] = user
; Configuration page
; configure = admin/config/materiobasemod
; For further information about configuration options, see
; - http://drupal.org/node/542202
@@ -0,0 +1,36 @@
<?php
/**
* @file
* Install, update, and uninstall functions for the field_example module.
*/
/**
* Implements hook_field_schema().
*
* Defines the database schema of the field, using the format used by the
* Schema API.
*
* The data we will store here is just one 7-character element, even
* though the widget presents the three portions separately.
*
* All implementations of hook_field_schema() must be in the module's
* .install file.
*
* @see http://drupal.org/node/146939
* @see schemaapi
* @see hook_field_schema()
* @ingroup field_example
*/
function materio_showroom_field_schema($field) {
$columns = array(
'showroom_tid' => array('type' => 'int', 'not null' => FALSE),
'location' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
);
$indexes = array(
'location' => array('location'),
);
return array(
'columns' => $columns,
'indexes' => $indexes,
);
}
@@ -0,0 +1,743 @@
<?php
// TODO: alter entity translation field permission with field_permission
// __ __ _ _______ __ __
// / / ____ _________ _/ /_(_)___ ____ / ____(_)__ / /___/ /
// / / / __ \/ ___/ __ `/ __/ / __ \/ __ \ / /_ / / _ \/ / __ /
// / /___/ /_/ / /__/ /_/ / /_/ / /_/ / / / / / __/ / / __/ / /_/ /
// /_____/\____/\___/\__,_/\__/_/\____/_/ /_/ /_/ /_/\___/_/\__,_/
/**
* Implements hook_field_info().
*
* Provides the description of the field.
*/
function materio_showroom_field_info() {
return array(
// We name our field as the associative name of the array.
'field_materio_showroom_location' => array(
'label' => t('Showroom Location'),
'description' => t('Define material location by showroom'),
'default_widget' => 'materio_showroom_location_text',
'default_formatter' => 'materio_showroom_location_simple_text',
),
);
// TODO: define in settings wich vocabulary is for showrooms
}
/**
* Implements hook_field_validate().
*
* This hook gives us a chance to validate content that's in our
* field. We're really only interested in the $items parameter, since
* it holds arrays representing content in the field we've defined.
* We want to verify that the items only contain RGB hex values like
* this: #RRGGBB. If the item validates, we do nothing. If it doesn't
* validate, we add our own error notification to the $errors parameter.
*
* @see field_example_field_widget_error()
*/
// function materio_showroom_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
// foreach ($items as $delta => $item) {
// // if (!empty($item['rgb'])) {
// // if (!preg_match('@^#[0-9a-f]{6}$@', $item['rgb'])) {
// // $errors[$field['field_name']][$langcode][$delta][] = array(
// // 'error' => 'field_example_invalid',
// // 'message' => t('Color must be in the HTML format #abcdef.'),
// // );
// // }
// // }
// }
// }
/**
* Implements hook_field_is_empty().
*
* hook_field_is_empty() is where Drupal asks us if this field is empty.
* Return TRUE if it does not contain data, FALSE if it does. This lets
* the form API flag an error when required fields are empty.
*/
function materio_showroom_field_is_empty($item, $field) {
// dsm($item,'item');
// dsm($field,'field');
return empty($item['location']); // && empty($item['showroom_tid'])
}
// ______ __
// / ____/___ _________ ___ ____ _/ /____ __________
// / /_ / __ \/ ___/ __ `__ \/ __ `/ __/ _ \/ ___/ ___/
// / __/ / /_/ / / / / / / / / /_/ / /_/ __/ / (__ )
// /_/ \____/_/ /_/ /_/ /_/\__,_/\__/\___/_/ /____/
/**
* Implements hook_field_formatter_info().
*
* We need to tell Drupal that we have two different types of formatters
* for this field. One will change the text color, and the other will
* change the background color.
*
* @see field_example_field_formatter_view()
*/
function materio_showroom_field_formatter_info() {
return array(
// This formatter just displays the hex value in the color indicated.
'materio_showroom_location_simple_text' => array(
'label' => t('Simple text-based formatter'),
'field types' => array('field_materio_showroom_location'),
),
// This formatter changes the background color of the content region.
// 'field_example_color_background' => array(
// 'label' => t('Change the background of the output text'),
// 'field types' => array('field_example_rgb'),
// ),
);
}
/**
* Implements hook_field_formatter_view().
*
* Two formatters are implemented.
* - field_example_simple_text just outputs markup indicating the color that
* was entered and uses an inline style to set the text color to that value.
* - field_example_color_background does the same but also changes the
* background color of div.region-content.
*
* @see field_example_field_formatter_info()
*/
function materio_showroom_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$element = array();
switch ($display['type']) {
// This formatter simply outputs the field as text.
case 'materio_showroom_location_simple_text':
foreach ($items as $delta => $item) {
if(!empty($item['location'])){
$term = taxonomy_term_load($item['showroom_tid']);
$element[$delta] = array(
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => t('%showroom : @loc', array('%showroom' => $term->name, '@loc' => $item['location'])),
);
}
}
break;
}
return $element;
}
// _ ___ __ __
// | | / (_)___/ /___ ____ / /______
// | | /| / / / __ / __ `/ _ \/ __/ ___/
// | |/ |/ / / /_/ / /_/ / __/ /_(__ )
// |__/|__/_/\__,_/\__, /\___/\__/____/
// /____/
/**
* Implements hook_field_widget_info().
*
* Three widgets are provided.
* - A simple text-only widget where the user enters the '#ffffff'.
* - A 3-textfield widget that gathers the red, green, and blue values
* separately.
* - A farbtastic colorpicker widget that chooses the value graphically.
*
* These widget types will eventually show up in hook_field_widget_form,
* where we will have to flesh them out.
*
* @see field_example_field_widget_form()
*/
function materio_showroom_field_widget_info() {
return array(
'materio_showroom_location_text' => array(
'label' => t('Location as text'),
'field types' => array('field_materio_showroom_location'),
),
);
}
/**
* Implements hook_field_widget_form().
*
* hook_widget_form() is where Drupal tells us to create form elements for
* our field's widget.
*
* We provide one of three different forms, depending on the widget type of
* the Form API item provided.
*
* The 'field_example_colorpicker' and 'field_example_text' are essentially
* the same, but field_example_colorpicker adds a javascript colorpicker
* helper.
*
* field_example_3text displays three text fields, one each for red, green,
* and blue. However, the field type defines a single text column,
* rgb, which needs an HTML color spec. Define an element validate
* handler that converts our r, g, and b fields into a simulated single
* 'rgb' form element.
*/
function materio_showroom_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
$widget = $element;
$widget['#delta'] = $delta;
switch ($instance['widget']['type']) {
case 'materio_showroom_location_text':
$locval = isset($items[$delta]['location']) ? $items[$delta]['location'] : '';
$showroom_tid = isset($items[$delta]['showroom_tid']) ? $items[$delta]['showroom_tid'] : 0;
$widget['showroom_tid'] = array(
'#type' => 'hidden',
'#default_value' => $showroom_tid,
// Allow a slightly larger size that the field length to allow for some
// configurations where all characters won't fit in input field.
'#maxlength' => 255,
);
$widget['location'] = array(
'#type' => 'textfield',
'#title' => "Showroom", //$showroom_term->name,
'#default_value' => $locval,
// Allow a slightly larger size that the field length to allow for some
// configurations where all characters won't fit in input field.
'#size' => 20,
'#maxlength' => 255,
);
$widget['#attached'] = array(
// Add javascript to remove the draggable behaviour.
'js' => array(drupal_get_path('module', 'materio_showroom') . '/js/materio_showroom.js'),
);
break;
}
return $widget;
}
/**
* Implements hook_field_widget_settings_form().
*/
function materio_showroom_field_widget_settings_form($field, $instance) {
$widget = $instance['widget'];
$settings = $widget['settings'];
$vocs = taxonomy_get_vocabularies();
$options = array();
foreach ($vocs as $vid => $voc) {
$options[$vid] = $voc->name;
}
$form['vocabulary'] = array(
'#type' => 'select',
'#title' => t('Vocabulary'),
'#default_value' => $settings['vocabulary'],
// '#element_validate' => array('_tode_widget_settings_maxlength_validate'),
'#required' => TRUE,
'#description' => t('Choose which vocabulary will be associated as showroom.'),
'#options' => $options,
);
return $form;
}
/**
* Implements hook_form_alter().
*/
function materio_showroom_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
if($form['#field']['type'] == "field_materio_showroom_location"){
// dsm($form, 'form');
$form['field']['cardinality']['#disabled'] = 'true';
$form['field']['cardinality']['#default_value'] = -1;
}
//
}
/**
* Implements hook_form_alter().
*/
function materio_showroom_form_alter(&$form, &$form_state, $form_id) {
// dsm($form_id);
// act only on node edit form
if(isset($form['#node_edit_form'])){
// dsm($form_id, 'form_id');
// dsm($form, 'form');
// dsm($form_state, 'form_state');
_materio_showroom_alter_location_field_form($form, $form_state, $form_id);
}
}
function _materio_showroom_alter_location_field_form(&$form, &$form_state, $form_id){
// define some constants
$field_type = 'field_materio_showroom_location';
$node = $form['#node'];
$nodetype = $form['type']['#value'];
// dsm($form_state, 'form_state');
global $user;
$user = user_load($user->uid); // Make sure the user object is fully loaded
// dsm($user, 'user');
$fieldsmap = field_info_field_map();
$showroomfieldinstances = array();
$user_termref_field_instances = array();
foreach ($fieldsmap as $field_name => $field) {
// dsm($field,$field_name);
// get all (probably one :p) showroom field instances from the current node
if ($field['type'] == $field_type
&& isset($field['bundles']['node'])
&& in_array($nodetype, $field['bundles']['node'])) {
$showroomfieldinstances[] = $field_name;
}
// get all term reference fields instance from users
if (isset($field['bundles']['user'])
&& $field['type'] == 'taxonomy_term_reference') {
$field_info = field_info_field($field_name);
// dsm($field_info, "field_info");
$user_termref_field_instances[$field_info['settings']['allowed_values'][0]['vocabulary']] = $field_name;
}
}
// dsm($showroomfieldinstances, 'showroomfieldinstances');
// dsm($user_termref_field_instances, 'user_termref_field_instances');
// if there is no showroom field instances do nothing
if(!empty($showroomfieldinstances)){
// act on each field instance
foreach ($showroomfieldinstances as $field_name) {
// retrive various field infos
$field_info = field_info_field($field_name);
// dsm($field_info, 'field_info');
$field_instance = field_info_instance('node', $field_name, $nodetype);
// get all terms from chosen vocabulary in field instance widget settings
$vid = $field_instance['widget']['settings']['vocabulary'];
$voc = taxonomy_vocabulary_load($vid);
$tree = taxonomy_get_tree($vid);
// dsm($tree, 'tree');
foreach ($tree as $key => $term) {
$terms[$term->tid] = $term->name;
}
// dsm($terms, 'terms');
// get user own term for current vocabulary (if any)
if(isset($user_termref_field_instances[$voc->machine_name])){
$user_field_name = $user_termref_field_instances[$voc->machine_name];
foreach (field_get_items('user', $user, $user_field_name) as $key => $value) {
$user_showrooms[] = $value['tid'];
}
// dsm($user_showrooms, "user_showrooms");
}
// get already recorded values
$old_items = field_get_items('node', $node, $field_name);
// dsm($old_items, 'old_items');
foreach ($old_items as $i => $value) {
$values[$value['showroom_tid']] = $value['location'];
}
// dsm($values, 'values');
// build new item list
// for ($k=0; $k < 3; $k++) {
foreach ($terms as $tid => $name) {
$items[] = array(
'showroom_tid' => "$tid",
'location' => isset($values[$tid]) ? $values[$tid] : ''
);
}
// }
// dsm($items, 'items');
// change form_state items count
// without this, form wont populated with all wanted items
$form_state['field'][$field_name][LANGUAGE_NONE]['items_count'] = count($items);
// retrieve new field form with our custom items
$new_field_form = field_default_form('node', null, $field_info, $field_instance, LANGUAGE_NONE, $items, $form, $form_state)[$field_name];
// dsm($new_field_form, 'new_field_form');
// $elements = field_multiple_value_form($field_info, $field_instance, LANGUAGE_NONE, $items, $form, $form_state);
// dsm($elements, 'elements');
// change items location field title
// and check access comparing term id with user taged with
$i = 0;
foreach ($terms as $tid => $name) {
$item = $new_field_form[LANGUAGE_NONE][$i];
$new_field_form[LANGUAGE_NONE][$i]['location']['#title'] = $terms[$item['showroom_tid']['#default_value']];
$disabled = !user_access('materio showroom edit all samples fields', $user) && !in_array($tid, $user_showrooms);
$new_field_form[LANGUAGE_NONE][$i]['location']['#disabled'] = $disabled;
$i++;
}
// remove the last one more item added by default
unset($new_field_form[LANGUAGE_NONE][$i]);
// remove "add more" button
unset($new_field_form[LANGUAGE_NONE]['add_more']);
// dsm($new_field_form, 'new_field_form');
// delete normal field form and replace it with our new custom field form
unset($form[$field_name]);
$form[$field_name] = $new_field_form;
}
}
}
/**
* Implements hook_permission().
*/
function materio_showroom_permission() {
return array(
'materio showroom edit all samples fields' => array(
'title' => t('Edit all materiO showroom samples fields'),
'description' => t('Edit all materiO showroom samples fields'),
),
'materio showroom migrate fields' => array(
'title' => t('Migrate materio showroom location fields'),
'description' => t('Migrate materio showroom location fields'),
),
);
}
/**
* Implements hook_menu_local_tasks_alter().
*/
function materio_showroom_menu_local_tasks_alter(&$data, $router_item, $root_path) {
switch($root_path){
case 'admin/content/showrooms' :
$item = menu_get_item('node/add/showroom');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
// TODO: prepopulate user role and showroom taxo (https://www.drupal.org/project/prepopulate)
// $item = menu_get_item('admin/people/create');
// if ($item['access']) {
// $data['actions']['output'][] = array(
// '#theme' => 'menu_local_action',
// '#link' => $item,
// );
// }
break;
}
}
// __ ____ __ _
// / |/ (_)___ __________ _/ /_(_)___ ____
// / /|_/ / / __ `/ ___/ __ `/ __/ / __ \/ __ \
// / / / / / /_/ / / / /_/ / /_/ / /_/ / / / /
// /_/ /_/_/\__, /_/ \__,_/\__/_/\____/_/ /_/
// /____/
/**
* Implements hook_menu().
*/
function materio_showroom_menu() {
$items['admin/config/content/materio/migrate_showroom'] = array(
'title' => 'Showrooms location fields migration settings',
'page callback' => 'drupal_get_form',
'page arguments' => array('materio_showroom_migrate_location_fields_settings_form'),
'access arguments' => array('materio showroom migrate fields'),
'type' => MENU_LOCAL_TASK,
// 'file' => ,
);
return $items;
}
function materio_showroom_migrate_location_fields_settings_form(){
drupal_set_title('Showroom Migration settings', PASS_THROUGH);
$field_type = 'field_materio_showroom_location';
$types = node_type_get_types();
// dsm($types, 'types');
$nt_options = array();
foreach ($types as $mn => $type) {
$nt_options[$mn] = $type->name;
}
$node_type = variable_get('materio_showroom_migrate_node_type', null);
// source field (must be a text field)
$form['node_type'] = array(
'#type'=>'select',
'#options'=>$nt_options,
'#default_value' => $node_type,
'#title' => t('Content type'),
'#multiple' => false,
);
if($node_type){
$fieldsmap = field_info_field_map();
$src_options = array();
$target_options = array();
foreach ($fieldsmap as $field_name => $field) {
// dsm($field, $field_name);
if ($field['type'] == 'text'
&& isset($field['bundles']['node'])
&& in_array($node_type, $field['bundles']['node'])) {
$src_options[$field_name] = $field_name;
}
if ($field['type'] == $field_type
&& isset($field['bundles']['node'])
&& in_array($node_type, $field['bundles']['node'])) {
$target_options[$field_name] = $field_name;
}
}
// source field (must be a text field)
$form['source_field'] = array(
'#type'=>'select',
'#options'=>$src_options,
'#default_value' => variable_get('materio_showroom_migrate_source_field', null),
'#title' => t('source field (must be a text field)'),
'#multiple' => false,
);
// target field (must be a showroom location field)
$form['target_field'] = array(
'#type'=>'select',
'#options'=>$target_options,
'#default_value' => variable_get('materio_showroom_migrate_target_field', null),
'#title' => t('target field (must be a showroom location field)'),
'#multiple' => false,
);
$vocs = taxonomy_get_vocabularies();
$voc_options = array();
foreach ($vocs as $vid => $voc) {
$voc_options[$vid] = $voc->name;
}
// vocabulary for showrooms
$vid = variable_get('materio_showroom_migrate_vocabulary', null);
$form['vocabulary'] = array(
'#type'=>'select',
'#options'=>$voc_options,
'#default_value' => $vid,
'#title' => t('vocabulary for showrooms'),
'#multiple' => false,
);
// default taxonomy term
if($vid){
$tree = taxonomy_get_tree($vid);
foreach ($tree as $key => $term) {
$terms_options[$term->tid] = $term->name;
}
$term = variable_get('materio_showroom_migrate_default_term', null);
$form['default_term'] = array(
'#type'=>'select',
'#options'=>$terms_options,
'#default_value' => $term,
'#title' => t('default taxonomy term'),
'#multiple' => false,
);
if($term){
$form['migrate'] = array(
'#type' => 'submit',
'#value' => 'Migrate',
// '#submit' => array('materio_showroom_migrate_location_fields_migrate'),
);
}
}
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
// '#submit' => array('materio_showroom_migrate_location_fields_migrate'),
);
return $form;
}
function materio_showroom_migrate_location_fields_settings_form_submit($form, &$form_state){
// dsm($form_state, 'form_state');
$node_type = $form_state['values']['node_type'];
$src_field = $form_state['values']['source_field'];
$target_field = $form_state['values']['target_field'];
$vid = $form_state['values']['vocabulary'];
$default_term = $form_state['values']['default_term'];
variable_set('materio_showroom_migrate_node_type', $node_type);
variable_set('materio_showroom_migrate_source_field', $src_field);
variable_set('materio_showroom_migrate_target_field', $target_field);
variable_set('materio_showroom_migrate_vocabulary', $vid);
variable_set('materio_showroom_migrate_default_term', $default_term);
// dsm($node_type, 'node_type');
// dsm($src_field,"src_field");
// dsm($target_field,"target_field");
// dsm($vid,"vid");
// dsm($default_term,"default_term");
if ($form_state['values']['op'] == 'Migrate'){
_materio_showroom_batch_migration($node_type, $src_field, $target_field, $vid, $default_term);
}
// $query = "INSERT INTO field_data_field_screenshot SELECT a.* FROM field_data_field_image a LEFT JOIN field_data_field_screenshot b ON a.entity_id = b.entity_id AND a.entity_type = b.entity_type WHERE b.entity_id IS NULL";
//
// $query2 = "INSERT INTO field_revision_field_screenshot SELECT a.* FROM field_revision_field_image a LEFT JOIN field_revision_field_screenshot b ON a.entity_id = b.entity_id AND a.entity_type = b.entity_type WHERE b.entity_id IS NULL";
}
function _materio_showroom_batch_migration($node_type, $src_field, $target_field, $vid, $tid){
// Reset counter for debug information.
$_SESSION['http_request_count'] = 0;
$batch = array(
'title' => t('Migrating Showroom fields ...'),
'operations' => array(),
'init_message' => t('Commencing'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('An error occurred during processing'),
'finished' => '_materio_showroom_batch_migration_finished',
);
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', $node_type)
->fieldCondition($src_field, 'value', '', '!=');
$result = $query->execute();
// dsm($result, 'result');
if (isset($result['node'])) {
$voc = taxonomy_vocabulary_load($vid);
$tree = taxonomy_get_tree($vid);
foreach ($tree as $key => $term) {
$terms[$term->tid] = $term->name;
}
if(!empty($terms)){
foreach ($result['node'] as $nid => $value) {
$batch['operations'][] = array(
'_materio_showroom_batch_migration_op',
array(
$nid,
$src_field, $target_field,
$terms, $tid,
)
);
}
}
}
batch_set($batch);
}
function _materio_showroom_batch_migration_op($nid, $src_field, $target_field, $terms, $default_tid, &$context){
$context['results']['field_migrated']++;
$node = node_load($nid);
$src_items = field_get_items('node', $node, $src_field);
$src_value = $src_items ? $src_items[0]['value'] : '';
// $src_value = str_replace('/', '-', $src_value);
//
// build new item list
$items = array(LANGUAGE_NONE => array());
foreach ($terms as $tid => $name) {
$items[LANGUAGE_NONE][] = array(
'showroom_tid' => $tid,
'location' => $default_tid == $tid ? $src_value : '',
);
}
$node->$target_field = $items;
node_save($node);
//Simply show the import row count.
$context['message'] = t('Migrating node !c : %title (%nid)', array(
'!c' => $context['results']['field_migrated'],
'%title'=>$node->title,
'%nid'=>$nid ));
// In order to slow importing and debug better,
// we can uncomment this line to make each import slightly slower.
// usleep(2500);
if ( false ) {
$context['results']['failed_nodes'][] = $nid ;
}
_materio_showroom_update_http_requests();
}
function _materio_showroom_batch_migration_finished($success, $results, $operations){
// dsm($success, 'success');
// dsm($results, 'results');
// dsm($operations, 'operations');
if ($success) {
// Here we could do something meaningful with the results.
// We just display the number of nodes we processed...
drupal_set_message(t('@count results processed in @requests HTTP requests.', array('@count' => count($results), '@requests' => _materio_showroom_get_http_requests())));
drupal_set_message(t('The final result was "%final"', array('%final' => end($results))));
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
drupal_set_message(
t('operations : @args',
array(
'@args' => print_r(current($operations), TRUE),
)
),
'error'
);
$error_operation = reset($operations);
drupal_set_message(
t('An error occurred while processing @operation with arguments : @args',
array(
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
)
),
'error'
);
}
}
/**
* Utility function to increment HTTP requests in a session variable.
*/
function _materio_showroom_update_http_requests() {
$_SESSION['http_request_count']++;
}
/**
* Utility function to count the HTTP requests in a session variable.
*
* @return int
* Number of requests.
*/
function _materio_showroom_get_http_requests() {
return !empty($_SESSION['http_request_count']) ? $_SESSION['http_request_count'] : 0;
}
@@ -0,0 +1,23 @@
name = Materio Tranlator
description = "Materio translator dedicated module"
; Core version (required)
core = 7.x
; Package name (see http://drupal.org/node/542202 for a list of names)
package = Materio
; PHP version requirement (optional)
; php = 5.2
; Loadable code files
; files[] = materio_ctools_automodal.module
; Module dependencies
dependencies[] = user
; Configuration page
; configure = admin/config/materiobasemod
; For further information about configuration options, see
; - http://drupal.org/node/542202
@@ -0,0 +1,61 @@
<?php
/**
* Implements hook_init().
*/
// function materio_translator_init() {
// drupal_add_js(drupal_get_path('module', 'materio_translator').'/js/materio_translator.js');
// }
/**
* Implements hook_permission().
*/
// function materio_translator_permission() {
// $perms = array(
// 'add showroom localisation' => array(
// 'title' => t('add showroom localisation'),
// 'description' => t('add showroom localisation'),
// ),
// );
//
// return $perms;
// }
/**
* Implements hook_form_alter().
*/
function DISABLED_materio_translator_form_alter(&$form, &$form_state, $form_id) {
// act only on node edit form
if(isset($form['#node_edit_form'])){
// dsm($form_id, 'form_id');
// dsm($form, 'form');
// dsm($form_state, 'form_state');
}
}
/**
* Implements hook_field_access().
*/
function DISABLED_materio_translator_field_access($op, $field, $entity_type, $entity, $account) {
// dsm($op,'op');
// dsm($entity_type,'entity_type');
// if($op == "edit" && $entity_type == 'node'){
// if($field['translatable'] == 0){
// if($field['field_permissions']['type'] == FIELD_PERMISSIONS_CUSTOM){
// dsm($field,$field['field_name']);
// // dsm($entity,'entity');
// // dsm($account,'account');
//
// // check if field permissions are handled by field_permissions module
//
// // return FALSE;
// }
// }
// }
//
// return TRUE;
}
@@ -1,9 +0,0 @@
/** COMMONS */
.inline-block {
display: inline-block;
display: moz-inline-stack;
*display: inline;
*zoom: 1;
vertical-align: top;
}
/** HTML5 */
File diff suppressed because it is too large Load Diff
+39
View File
@@ -0,0 +1,39 @@
'use strict';
var gulp = require('gulp');
var less = require('gulp-less');
var LessAutoprefix = require('less-plugin-autoprefix');
var jsmin = require('gulp-jsmin');
var rename = require('gulp-rename');
var watch = require('gulp-watch');
var autoprefix = new LessAutoprefix({ browsers: ['last 2 versions'] });
function handleError(err) {
console.log(err.toString());
// this.emit('end');
}
gulp.task('scripts', function () {
gulp.src('./js/guibik.js')
.pipe(jsmin())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./js/'));
});
gulp.task('styles', function () {
gulp.src('./less/guibik.less')
.pipe(less({
plugins: [autoprefix]
}))
.pipe(gulp.dest('./css/'));
});
gulp.task('default', function () {
});
// default gulp task
gulp.task('default', ['scripts', 'styles'], function() {
gulp.watch('./less/*.less', ['styles']);
gulp.watch('./js/*.js', ['scripts']);
});
+4
View File
@@ -0,0 +1,4 @@
(function($){Drupal.behaviors.guibik={};Drupal.behaviors.guibik.attach=function(context){$('form.form-edit','.views-edit-view').each(function(index){var $this=$(this),_alt=false,_submit=function(event){event.preventDefault();$('input[type=submit]#edit-actions-save',$this).focus();$this.submit();return false;};$(document).bind({keydown:function(event){switch(event.keyCode){case 18:_alt=true;break;case 83:if(_alt)
return _submit(event);}},keyup:function(event){switch(event.keyCode){case 18:_alt=false;break;}}});});};Drupal.behaviors.init_theme={};Drupal.behaviors.init_theme.attach=function(context){$('#messages-and-help > div.messages:not(.processed)').addClass('processed').each(function(){if($('a',this).size()||$(this).is('.error')||$(this).is('.warning')||$(this).text().length>100){$(this).prepend("<span class='close'>X</span>");$('span.close',this).click(function(){$(this).parent().slideUp('fast');});}
else{$(this).animate({opacity:1},5000,'linear',function(){$(this).slideUp('fast');});}});};})(jQuery);
+592
View File
@@ -0,0 +1,592 @@
/*
* www.g-u-i.net
*/
// =
// =
// =
// =
// =
// ===== TYPOGRAHIE ======================================================================================================
.8(){font-size:8px;}
.9(){font-size:9px;}
.10(){font-size:10px;}
.11(){font-size:10px;}
.12(){font-size:12px;}
.14(){font-size:14px;}
.16(){font-size:16px;}
.18(){font-size:18px;}
.20(){font-size:20px;}
.24(){font-size:24px;}
.28(){font-size:24px;}
.30(){font-size:30px;}
.36(){font-size:36px;}
.48(){font-size:48px;}
.60(){font-size:60px;}
.72(){font-size:72px;}
.regular(){font-weight:normal;}
.bold(){font-weight:bold;}
.100(){font-weight:100;}
.200(){font-weight:200;}
.300(){font-weight:300;}
.400(){font-weight:400;}
.500(){font-weight:500;}
.600(){font-weight:600;}
.700(){font-weight:700;}
.800(){font-weight:800;}
.900(){font-weight:900;}
.upper(){text-transform: uppercase;}
.italic(){font-style:italic;}
.normal(){font-style: normal;}
.hyphens(@value: auto)
{
-webkit-hyphens:@value;
-moz-hyphens:@value;
-ms-hyphens:@value;
-o-hyphens:@value;
hyphens:@value;
}
.font-size(@value: 1em,@lineheight:1.3em)
{
font-size:@value;
line-height:@lineheight;
}
@green:#17942A;
@red:#E60000;
// =
// =
// =
// =
// =
// ===== SHORTCUTS =======================================================================================================
// padding
.p(@p){ padding:@arguments; }
.p(@v, @h){ padding:@arguments; }
.p(@t, @l, @b, @l){ padding:@arguments; }
.pt(@p){ padding-top:@p; }
.pr(@p){ padding-right:@p; }
.pb(@p){ padding-bottom:@p; }
.pl(@p){ padding-left:@p; }
// margin
.m(@p){ margin:@arguments; }
.m(@v, @h){ margin:@arguments; }
.m(@t, @l, @b, @l){ margin:@arguments; }
.mt(@m){ margin-top:@m; }
.mr(@m){ margin-right:@m; }
.mb(@m){ margin-bottom:@m; }
.ml(@m){ margin-left:@m; }
.0(){ margin:0; padding:0; }
// border
.b(@b){ border: @b; }
.b(@size, @color){ border: @size solid @color; }
.bt(@b){ border-top: @b;}
.bt(@size, @color){border-top: @size solid @color;}
.br(@b){ border-right: @b;}
.br(@size, @color){border-right: @size solid @color;}
.bb(@b){ border-bottom: @b;}
.bb(@size, @color){border-bottom: @size solid @color;}
.bl(@b){ border-left: @b;}
.bl(@size, @color){border-left: @size solid @color;}
.bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE)
{
border-top : solid 1px @top-color;
border-right : solid 1px @right-color;
border-bottom: solid 1px @bottom-color;
border-left : solid 1px @left-color;
}
// Background
.bg(@color, @url, @repeat, @scrollfixed, @pos){background: @arguments;}
.bgc(@color){background-color: @arguments;}
.bkgd(@params){background: @arguments;}
.bkgdc(@color){.bgc(@arguments);}
.bgca(@r, @g, @b, @a){
background-color: rgb(@r, @g, @b); // ie8
background-color: rgba(@r, @g, @b, @a);
*background-color: rgb(@r, @g, @b); // ie7
};
// Selection
.selection(@bgcolor,@color)
{
&::selection {
background:@bgcolor;
color:@color;
}
&::-moz-selection {
background:@bgcolor;
color:@color;
}
&::-webkit-selection {
background:@bgcolor;
color:@color;
}
}
// Colors
.color(@value)
{
&,
& *{color:@value;}
}
// Opacity
.opacity(@opacity: 0.5)
{
-webkit-opacity: @opacity;
-khtml-opacity: @opacity;
-moz-opacity: @opacity;
opacity: @opacity;
}
// size
.size(@height, @width) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size, @size);
}
// center
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// =
// =
// =
// =
// =
// ===== DISPLAY UTILS ===================================================================================================
// Inline blocks
.inlineblock(@align:top)
{
display:moz-inline-stack;
display:inline-block;
vertical-align:@align;
zoom:1;
*display:inline;
// .ie7 &, .ie8 &{display:block;float:left;}
}
.db(){display:block;}
.dbn(){display:none;}
.dib(){.inlineblock;}
.dib(@align){.inlineblock(@align);}
.float(@align:left){
.db; float:@align;
}
.abs(@value) { position:absolute; top:@value; left:@value; bottom:@value; right:@value; }
.abs(@top, @left) { position:absolute; top:@top; left:@left; }
.abs(@top, @right, @bottom, @left) { position:absolute; top:@top; left:@left; bottom:@bottom; right:@right; };
.fix(@value) { position:fixed; top:@value; left:@value; bottom:@value; right:@value; }
.fix(@top, @left) { position:fixed; top:@top; left:@left; }
.fix(@top, @right, @bottom, @left) { position:fixed; top:@top; left:@left; bottom:@bottom; right:@right; };
// Columns system
@g:0;
.g() { width:@g; }
.col(@col,@coltotal:@n,@gutter:@g) {
width: @col * ( 100% - ((@coltotal - 1) * @gutter) ) / @coltotal + ((@col - 1) * @gutter);
}
.inside-left(@col,@coltotal:@n,@gutter:@g) {
padding-left: @col * ( 100% - ((@coltotal - 1) * @gutter) ) / @coltotal + (@col * @gutter);
}
.inside-right(@col,@coltotal:@n,@gutter:@g) {
padding-right: @col * ( 100% - ((@coltotal - 1) * @gutter) ) / @coltotal + (@col * @gutter);
}
// Vertical alignement
//
// ___ .align-child()
// |
// | Permet lalignement vertical dun objet par rapport à son premier parent (dans son conteneur direct).
// |
// | 1 param : @vertical-align
//
.align-child(@align:middle){
&:before { content: ""; .dib(middle); overflow: hidden; visibility: hidden; width: 0; height: 100%; }
& > * { .dib(@align); }
}
.clear-after(){
&:after{clear:both;content:'';display:block;height:0px;overflow:hidden;visibility:hidden;width:0px;}
}
// For clearing floats like a boss h5bp.com/q
.clearix() {
*zoom: 1;
&:before,
&:after {
display: table;
content: "";
// Fixes Opera/contenteditable bug:
// http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
line-height: 0;
}
&:after {
clear: both;
}
}
// =
// =
// =
// =
// =
// ===== CSS3 ============================================================================================================
// Gradients
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF)
{
background: @color;
background: -webkit-gradient(linear,
left bottom,
left top,
color-stop(0, @start),
color-stop(1, @stop));
background: -ms-linear-gradient(bottom,
@start,
@stop);
background: -moz-linear-gradient(center bottom,
@start 0%,
@stop 100%);
}
.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255)
{
background: @color;
background: -webkit-gradient(linear,
left bottom,
left top,
color-stop(0, rgb(@start,@start,@start)),
color-stop(1, rgb(@stop,@stop,@stop)));
background: -ms-linear-gradient(bottom,
rgb(@start,@start,@start) 0%,
rgb(@start,@start,@start) 100%);
background: -moz-linear-gradient(center bottom,
rgb(@start,@start,@start) 0%,
rgb(@stop,@stop,@stop) 100%);
}
// Shadows
//
// ___ .box-shadow()
// |
// | Ombré extérieur.
// |
// | 1 param : @blur
// | 2+ params : @horizontal / @vertical / @blur / @color: #000 / @spread: 0px
//
// ___ .inset-shadow()
// |
// | Ombré intérieur.
// |
// | 1 param : @blur
// | 2+ params : @horizontal / @vertical / @blur / @color: #000 / @spread: 0px
//
.box-shadow(@blur: 9px)
{
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#000');
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#000')";
-webkit-box-shadow: 0 0 @blur #000;
-moz-box-shadow: 0 0 @blur #000;
-ms-box-shadow: 0 0 @blur #000;
box-shadow: 0 0 @blur #000;
}
.box-shadow(@x, @y, @blur: 9px, @color: #000, @spread: 0px)
{
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=@x, OffY=@y, Color=~'@{color}');
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=@{x}, OffY=@{y}, Color='@{color}')";
-webkit-box-shadow: @x @y @blur @spread @color;
-moz-box-shadow: @x @y @blur @spread @color;
-ms-box-shadow: @x @y @blur @spread @color;
box-shadow: @x @y @blur @spread @color;
}
.inset-shadow(@blur: 9px)
{
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#000');
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#000')";
-webkit-box-shadow: 0 0 @blur #000 inset;
-moz-box-shadow: 0 0 @blur #000 inset;
-ms-box-shadow: 0 0 @blur #000 inset;
box-shadow: 0 0 @blur #000 inset;
}
.inset-shadow(@x, @y, @blur: 9px, @color: #000, @spread: 0px)
{
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=@x, OffY=@y, Color=~'@{color}');
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='@{color}')";
-webkit-box-shadow: @x @y @blur @spread @color inset;
-moz-box-shadow: @x @y @blur @spread @color inset;
-ms-box-shadow: @x @y @blur @spread @color inset;
box-shadow: @x @y @blur @spread @color inset;
}
.drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1)
{
-webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
-moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
}
// Border radius
.rounded(@radius: 2px)
{
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.border-radius(@topleft: 0, @topright: 0, @bottomright: 0, @bottomleft: 0)
{
-webkit-border-radius:@arguments;
-moz-border-radius:@arguments;
border-radius:@arguments;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
// transitions
.transition-simply-prefix(@string) {
-webkit-transition: @string;
-moz-transition: @string;
-o-transition: @string;
transition: @string;
}
//
// ___ .transition()
// |
// | 1 param : @property
// | 2 params : @property / @duration
// | 3+ params : @property / @duration / @transitiondelay:0s , @timingfunction:ease-out
//
// ___ .transitions()
// |
// | Permet de fixer des paramètres spécifique par propriétés, exemple:
// |
// | .transitions(
// | 'height , padding , margin , box-shadow',
// | '.5s , .2s , .2s , .2s',
// | '0s , 0s , 0s , .3s',
// | 'linear , ease-out , linear , ease-out'
// | );
//
.transition(@property: all)
{
-webkit-transition: @property;
-moz-transition: @property;
-o-transition: @property;
transition: @property;
}
.transition(@property, @duration)
{
-webkit-transition: @arguments;
-moz-transition: @arguments;
-o-transition: @arguments;
transition: @arguments;
}
.transition(@property, @duration, @transitiondelay, @timingfunction:ease-out)
{
-webkit-transition: @arguments;
-moz-transition: @arguments;
-o-transition: @arguments;
transition: @arguments;
}
.transitions(@property: all, @duration:0s, @transitiondelay:0s, @timingfunction:ease-out)
{
-webkit-transition-property :~'@{property}';
-webkit-transition-duration :~'@{duration}';
-webkit-transition-delay :~'@{transitiondelay}';
-webkit-transition-timing-function:~'@{timingfunction}';
-moz-transition-property :~'@{property}';
-moz-transition-duration :~'@{duration}';
-moz-transition-delay :~'@{transitiondelay}';
-moz-transition-timing-function:~'@{timingfunction}';
-o-transition-property :~'@{property}';
-o-transition-duration :~'@{duration}';
-o-transition-delay :~'@{transitiondelay}';
-o-transition-timing-function:~'@{timingfunction}';
transition-property :~'@{property}';
transition-duration :~'@{duration}';
transition-delay :~'@{transitiondelay}';
transition-timing-function:~'@{timingfunction}';
}
.transitions-duration(@duration: 0s)
{
-webkit-transition-duration: ~'@{duration}';
-moz-transition-duration: ~'@{duration}';
-o-transition-duration: ~'@{duration}';
transition-duration: ~'@{duration}';
}
.transition-duration(@duration: 0.2s)
{
-webkit-transition-duration: @duration;
-moz-transition-duration: @duration;
-o-transition-duration: @duration;
transition-duration: @duration;
}
.transitions-delay(@delay: 0s)
{
-webkit-transition-delay: ~'@{delay}';
-moz-transition-delay: ~'@{delay}';
-o-transition-delay: ~'@{delay}';
transition-delay: ~'@{delay}';
}
// Rotate
//
// ___ .rotation()
// |
// | 1 param : @degree
//
// ___ .rotate()
// |
// | Tentative de compatibilté étendue (fonctionne uniquement pour 0, 90, 180 ou 270 degrés).
// |
// | 1 param : @degree
// | 3 params : @degree / @originX / @originY
//
.rotation(@deg:5deg)
{
-webkit-transform: rotate(@deg);
-moz-transform: rotate(@deg);
transform: rotate(@deg);
}
.rotate(@value, @originX:0%, @originY:0%, @unit:'deg')
{
// filter: progid:DXImageTransform.Microsoft.BasicImage(rotation = (360 / @value) + 1); //0, 1, 2, or 3 rotate 0, 90, 180 or 270
-webkit-transform: rotate(~"@{value}@{unit}"); // ~"@{value}@{unit}" rather than @value@unit remove the spaces between value and unit.
-moz-transform: rotate(~"@{value}@{unit}");
-ms-transform: rotate(~"@{value}@{unit}");
-o-transform: rotate(~"@{value}@{unit}");
transform: rotate(~"@{value}@{unit}");
-webkit-transform-origin:@originX @originY;
-moz-transform-origin:@originX @originY;
-ms-transform-origin:@originX @originY;
-o-transform-origin:@originX @originY;
transform-origin:@originX @originY;
}
// Scale
.scale(@ratio:1.5)
{
-webkit-transform:scale(@ratio);
-moz-transform:scale(@ratio);
transform:scale(@ratio);
}
// Translate
.translate(@x:0, @y:0)
{
-webkit-transform: translate(@x, @y);
-moz-transform: translate(@x, @y);
-ms-transform: translate(@x, @y);
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
// Columns
.columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px)
{
-webkit-column-width : @colwidth;
-webkit-column-count : @colcount;
-webkit-column-gap : @colgap;
-webkit-column-rule-color: @columnRuleColor;
-webkit-column-rule-style: @columnRuleStyle;
-webkit-column-rule-width: @columnRuleWidth;
-moz-column-width : @colwidth;
-moz-column-count : @colcount;
-moz-column-gap : @colgap;
-moz-column-rule-color: @columnRuleColor;
-moz-column-rule-style: @columnRuleStyle;
-moz-column-rule-width: @columnRuleWidth;
column-width : @colwidth;
column-count : @colcount;
column-gap : @colgap;
column-rule-color: @columnRuleColor;
column-rule-style: @columnRuleStyle;
column-rule-width: @columnRuleWidth;
}
.edit-link(@bc:#CCFF2F,@c:#333)
{
.dib;
background-color:@bc;
border:1px solid;
border-color:darken(desaturate(@bc, 35%),15%) darken(desaturate(@bc, 35%),15%) darken(desaturate(@bc, 35%),20%);
.rounded;
color: @c;
cursor: pointer;
.font-size(.8em,1em);
font-weight: normal;
padding: 0.25em 0.75em;
margin-top:.5em;
&:hover{background-color:darken(@bc, 20%);}
&:active{
text-shadow: 0 1px 0 lighten(@bc,5%);
background-color:darken(@bc, 20%);
//.inset-shadow(0,0,2px,darken(@bc,60));
}
}
.loader(@fc:#000,@bc:#ccc,@h:8px,@radius:0px)
{
// Safari/chrome
&::-webkit-progress-bar{background-color:@bc;.rounded(@radius);}
&::-webkit-progress-value{background-color:@fc;.rounded(@radius);}
// Firefox
&{background-color:@bc;.rounded(@radius);height:@h;}
&::-moz-progress-bar{background-color:@fc;.rounded(@radius);}
}
// =
// =
// =
// =
// =
// ===== RETINA ==========================================================================================================
// retina.less
// A helper mixin for applying high-resolution background images (http://www.retinajs.com)
.at2x(@path, @w: auto, @h: auto) {
background-image: url(@path);
@at2x_path: ~`"@{path}".split('.').slice(0, "@{path}".split('.').length - 1).join(".") + "@2x" + "." + "@{path}".split('.')["@{path}".split('.').length - 1]`;
@media all and (-webkit-min-device-pixel-ratio : 1.5) {
background-image: url(@at2x_path);
background-size: @w @h;
}
}
+86 -48
View File
@@ -56,6 +56,38 @@ select.form-select {
max-width:100%;
}
input.form-autocomplete:disabled,
input.form-text:disabled,
textarea.form-textarea:disabled,
select.form-select:disabled{
padding:3px;
border-width:0px;
border-style:solid;
border-color:none;
background:#fff;
color:#1A1A1A;
max-width:100%;
}
input.form-autocomplete:hover:disabled,
input.form-text:hover:disabled,
input.form-file:hover:disabled,
textarea.form-textarea:hover:disabled,
select.form-select:hover:disabled,
input.form-autocomplete:focus:disabled,
input.form-text:focus:disabled,
input.form-file:focus:disabled,
input.form-checkbox:focus:disabled,
input.form-radio:focus:disabled,
textarea.form-textarea:focus:disabled,
select.form-select:focus:disabled{
color: inherit;;
border-color: #fff;
-webkit-box-shadow: #fff 0 0 0px;
-moz-box-shadow: #fff 0 0 0px;
box-shadow: #fff 0 0 0px;
}
span.autocomplete-deluxe-button{top:0.25em;}
@@ -116,8 +148,8 @@ span.autocomplete-deluxe-button{top:0.25em;}
.fieldset-title,
.collapsible .fieldset-legend a{
display:inline-block; width:auto;
.rounded();
font-size:12px;
.rounded();
font-size:12px;
font-weight:normal;
text-transform: uppercase;
margin:0px;
@@ -152,18 +184,18 @@ li{list-style: none inside url();}
.fieldset-title,
.vertical-tab-button strong, .horizontal-tab-button strong{text-transform: uppercase; font-size:0.8em; font-weight:bold;}
div.form-type-checkboxes{
&>label, &>div.form-checkboxes{.inlineblock();}
&>label, &>div.form-checkboxes{.inlineblock();}
}
.form-item-language, .form-type-select{
&>label, &>select{.inlineblock();}
&>label{width:35%;}
&>select{max-width:60%;}
}
.form-type-textfield{
&>label, &>input.form-text{.inlineblock(); margin:0; vertical-align:middle;}
&>label{width:35%;}
@@ -180,25 +212,25 @@ li{list-style: none inside url();}
.form-item{.inlineblock();}
input.form-text{width:100%;}
}
.autocomplete-deluxe-button{
margin-top:-3px;
}
.addressfield-container-inline{
&>div.form-item{.inlineblock(); margin:0; width:30%;}
}
fieldset.filter-wrapper{display:none;}
input.fid.form-text{display:none;}
input.fid.form-text{display:none;}
.form-region-right{
position:relative;
fieldset.form-wrapper{max-width:100%; padding:0; margin:0;}
.fieldset-wrapper{padding:0;}
input.form-text{width:100%;}
}
tr.draggable{
fieldset{
legend{display:none;}
@@ -208,8 +240,8 @@ li{list-style: none inside url();}
}
}
}
.field-widget-term-reference-tree .form-item.form-type-checkbox-tree{
display: block;
.term-reference-tree{
@@ -218,7 +250,7 @@ li{list-style: none inside url();}
}
}
}
/** VERTICAL TABS */
@@ -260,8 +292,8 @@ li{list-style: none inside url();}
}
.vertical-tabs-list .summary { font-size:11px; }
.page-admin table,
.update tr.warning .version-recommended,
.page-admin table,
.update tr.warning .version-recommended,
.update tr.error .version-recommended{
background-color: transparent;
border:0px solid transparent;
@@ -272,8 +304,8 @@ li{list-style: none inside url();}
}
.page-admin table tr{
&.even, &.odd{
td, h3 {background-color: transparent;}
&.even, &.odd{
td, h3 {background-color: transparent;}
&:hover{ background: #D4EFEE;}
&.ok{
background-color: #d1f2a3;
@@ -296,7 +328,7 @@ li{list-style: none inside url();}
color: #468847;//#036;
background-color: #dff0d8;//#bdf;
// td{
// border-bottom:3px solid #d6e9c6;//#ace;
// border-bottom:3px solid #d6e9c6;//#ace;
// }
}
&.warning, &.warning:hover{
@@ -313,7 +345,7 @@ li{list-style: none inside url();}
// border-bottom: 3px solid #eed3d7;
// }
}
// td{ border:0 solid #fff;}
}
@@ -343,7 +375,7 @@ input.form-submit,
color:#333;
text-align:center;
font-size:12px;
font-weight:normal;
border-width:1px;
@@ -351,13 +383,13 @@ input.form-submit,
border-color:#ddd #ddd #ccc;
background:#bdf url();
.rounded();
&.field-add-more-submit{
padding:0.1em 0.4em 0;
font-size:10px;
}
}
.node-edit, .button, .node-delete{font-size:10px;padding:0.1em 0.6em;}
@@ -367,7 +399,7 @@ input.form-submit:hover,
.node-edit:hover, .button:hover, .node-delete:hover{
border-color:#ddd #ddd #ccc;
-webkit-box-shadow:#ace 0px 0px 0px;
color:#bdf;
background-color: #848484;
}
@@ -384,7 +416,7 @@ input.button-no, .node-delete{
&:hover{
color:#EA4B4A;
}
}
/** admin module */
@@ -416,16 +448,16 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
background-color: #D8D8D8;
}
.defaulted, .views-ui-display-tab-bucket .views-display-setting.even, .views-ui-display-tab-bucket .views-display-setting.odd{ //:not(.overriden)
.defaulted, .views-ui-display-tab-bucket .views-display-setting.even, .views-ui-display-tab-bucket .views-display-setting.odd{ //:not(.overriden)
color: #666;
background-color: #E0E0E0;
font-style: italic;
/* font-weight:bold;*/
a{color: #3F80B3}
}
}
.views-ui-display-tab-bucket.overridden .views-display-setting, .views-ui-display-tab-bucket.overridden .views-display-setting,
.views-display-setting.overridden{ //:not(.overriden)
.views-display-setting.overridden{ //:not(.overriden)
&, &.even, &.odd{
color: #7F7F7F;
background-color: #F9F9F9;
@@ -433,7 +465,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
/* font-weight:bold;*/
a{color: #3188D1;}
}
}
}
}
.view{
.view-header{
@@ -447,18 +479,18 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
.inlineblock(); padding:0;
li{
height:20px;
a, span{padding:1px 10px 2px;}
a, span{padding:1px 10px 2px;}
}
}
}
// EXPOSED
.view-filters{
padding:1em 0; margin:0 0 1em 0;
border: 1px solid #CCC; .border-radius(5px,5px,5px,5px);
&>span.title, &>form{.inlineblock();width:auto;position:relative;vertical-align: top;}
&>span.title, &>form{.inlineblock();width:auto;position:relative;vertical-align: top;}
&>span.title{padding:0.7em 1em;}
fieldset{
.inlineblock(); padding:0 1em;
@@ -477,14 +509,14 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
fieldset#edit-select{
padding:1em 0; margin:0 0 1em 0;
border: 1px solid #CCC; .border-radius(5px,5px,5px,5px);
legend, .fieldset-content{.inlineblock();}
legend{
width:auto;
*{background-color: transparent;}
}
.fieldset-content{
padding:0;
select, input{font-size:0.8em;}
@@ -495,7 +527,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
.form-item{.inlineblock();vertical-align:top;}
em{padding:0 1em;}
}
}
/** media browser */
@@ -509,15 +541,15 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
float:left;
&>div{margin:0 10px 10px 0;}
}
}
}
}
*:focus{
border: 1px solid #BDF!important;
}
/* Contain floats: h5bp.com/q */
/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
@@ -531,7 +563,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
table{
caption{ text-align: left; padding:2em 0 0 0; font-weight:bold;}
th{line-height:1; background-color: @greylite!important;}
td{padding-top:1em;padding-bottom:1em;}
@@ -545,7 +577,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
background: @grey!important;
}
}
td.views-field-title{ width:350px; }
a.node-title-link{font-size:1.1em; padding:0 0 0.3em; display:inline-block;}
td.views-field-field-people{width:100px;}
@@ -555,7 +587,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
#modalContent{
}
#modalContent div.ctools-modal-content{
@@ -563,9 +595,9 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
border: 1 solid #999;
}
#modalContent div.ctools-modal-content .modal-header,
#modalContent div.ctools-modal-content .modal-header a,
@@ -598,7 +630,7 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
border-color: #eed3d7;//#d52;
}
&.status {
color: #468847;//#036;
background-color: #dff0d8;//#bdf;
@@ -618,7 +650,7 @@ div.messages {
.messages-label{display:none;}
div.messages{
.messages(); margin:0 0 10px 0;
}
.footer{
border:none; padding:0; margin:0;
@@ -630,3 +662,9 @@ div.messages {
}
}
}
body.page-admin #page img{
max-width: 99999px;
height: auto;
}
+19
View File
@@ -0,0 +1,19 @@
{
"name": "guibik",
"version": "1.0.0",
"description": "An Admin theme for drupal 7 based on rubik.",
"main": "gulpfile.js",
"author": "Bachir Soussi Chiadmi",
"license": "GPLv3",
"homepage": "https://materio.com",
"devDependencies": {
"gulp": "latest",
"gulp-autoprefixer": "latest",
"gulp-jsmin": "latest",
"gulp-less": "latest",
"gulp-rename": "latest",
"gulp-strip-debug": "latest",
"gulp-watch": "latest",
"less-plugin-autoprefix": "^1.5.1"
}
}
@@ -2888,7 +2888,12 @@ body.node-type-publication #footer {
display: none; } }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
#header .logo span.slogan {
display: none; } }
display: block;
margin-left: 0.1em; } }
@media only screen and (min-width: 64.063em) and (max-width: 90em) {
#header .logo span.slogan {
display: block;
margin-left: 0.1em; } }
.ie8 #header .logo span.slogan {
position: absolute;
margin-top: 22px; }
@@ -2936,6 +2941,38 @@ body.node-type-publication #footer {
@media only screen and (min-width: 90.063em) and (max-width: 120em) {
#header #header-blocks .block:not(:last-child) {
padding-right: 0.3em; } }
@media only screen and (max-width: 40em) {
#header #header-blocks #headerblock-left {
display: none; } }
#header #header-blocks #block-social-media-links-social-media-links ul.social-media-links {
margin: 0;
line-height: 0; }
#header #header-blocks #block-social-media-links-social-media-links li {
line-height: 1; }
#header #header-blocks #block-social-media-links-social-media-links li.facebook a {
background-image: url("../img/socialicons/svg/Facebook-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.twitter a {
background-image: url("../img/socialicons/svg/Twitter-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.linkedin a {
background-image: url("../img/socialicons/svg/LinkedIn-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.pinterest a {
background-image: url("../img/socialicons/svg/Pinterest-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.vimeo a {
background-image: url("../img/socialicons/svg/Vimeo-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.rss a {
background-image: url("../img/socialicons/svg/RSS-color.svg"); }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
#header #header-blocks #block-social-media-links-social-media-links li.linkedin, #header #header-blocks #block-social-media-links-social-media-links li.pinterest, #header #header-blocks #block-social-media-links-social-media-links li.vimeo {
display: none; } }
#header #header-blocks #block-social-media-links-social-media-links a {
display: block;
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain; }
#header #header-blocks #block-social-media-links-social-media-links img {
display: none; }
#header #header-blocks #block-materio-user-front-link a {
font-size: 12px; }
#header #header-blocks #block-materio-user-front-link span.text {
@@ -3103,34 +3140,10 @@ body.node-type-publication #footer {
vertical-align: top;
zoom: 1;
*display: inline;
vertical-align: middle;
padding: 0; }
padding: 0;
vertical-align: middle; }
#header #header-blocks #headerblock-right .block:first-child {
padding: 0; }
#header #header-blocks #block-locale-language ul, #header #header-blocks #block-locale-language li {
margin: 0;
padding: 0;
list-style-type: none;
font-size: 12px;
line-height: 1; }
#header #header-blocks #block-locale-language ul.active, #header #header-blocks #block-locale-language li.active {
display: none; }
.ie8 #header #header-blocks #block-locale-language {
padding-top: 5px; }
#header #header-blocks #block-locale-language ul {
padding-top: 0.155em; }
#header #header-blocks #block-locale-language li {
font-size: 0.9em;
padding: 0.33em 0.35em 0.3em;
border-radius: 3px;
background-clip: padding-box;
background-color: #808080;
transition: background-color 0.3s ease-out; }
#header #header-blocks #block-locale-language li, #header #header-blocks #block-locale-language li > * {
color: #fff;
text-transform: uppercase; }
#header #header-blocks #block-locale-language li:hover {
background-color: #1A1A1A; }
.ie8 #header #header-blocks #block-menu-menu-top-menu h2 {
display: none; }
#header #header-blocks #block-menu-menu-top-menu h2 i {
@@ -3188,34 +3201,55 @@ body.node-type-publication #footer {
display: block; }
html.no-touch #header #header-blocks #block-menu-menu-top-menu:hover .menu-wrapper ul.menu li, #header #header-blocks #block-menu-menu-top-menu.hovered .menu-wrapper ul.menu li {
height: 25px; } }
#header #header-blocks #block-locale-language {
position: relative; }
#header #header-blocks #block-locale-language h2 {
font-size: 9px;
line-height: 1.6;
display: inline-block;
padding: 0.20em 0.45em 0.10em;
margin: 0;
border-radius: 3px;
background-clip: padding-box;
color: #fff;
text-transform: uppercase;
background-color: #4d4b4b; }
#header #header-blocks #block-locale-language ul, #header #header-blocks #block-locale-language li {
margin: 0;
padding: 0;
list-style-type: none;
font-size: 12px;
line-height: 0.9; }
#header #header-blocks #block-locale-language ul.active, #header #header-blocks #block-locale-language li.active {
display: none; }
.ie8 #header #header-blocks #block-locale-language {
padding-top: 5px; }
#header #header-blocks #block-locale-language ul {
padding-top: 2.1em;
position: absolute;
top: 0;
left: 0;
text-align: left; }
#header #header-blocks #block-locale-language li {
height: 0;
overflow: hidden;
transition: height 0.3s ease-in-out; }
#header #header-blocks #block-locale-language li a {
display: inline-block;
font-size: 0.9em;
padding: 0.33em 0.34em 0.3em;
border-radius: 3px;
background-clip: padding-box;
color: #fff;
text-transform: uppercase;
background-color: #808080;
transition: background-color 0.3s ease-out; }
#header #header-blocks #block-locale-language li a:hover {
background-color: #1A1A1A; }
#header #header-blocks #block-locale-language:hover li {
height: 1.5em; }
#header #header-blocks #block-materio-user-old-database-link a {
font-size: 12px; }
#header #header-blocks #block-social-media-links-social-media-links ul.social-media-links {
margin: 0;
line-height: 0; }
#header #header-blocks #block-social-media-links-social-media-links li {
line-height: 1; }
#header #header-blocks #block-social-media-links-social-media-links li.facebook a {
background-image: url("../img/socialicons/svg/Facebook-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.twitter a {
background-image: url("../img/socialicons/svg/Twitter-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.linkedin a {
background-image: url("../img/socialicons/svg/LinkedIn-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.pinterest a {
background-image: url("../img/socialicons/svg/Pinterest-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.vimeo a {
background-image: url("../img/socialicons/svg/Vimeo-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links li.rss a {
background-image: url("../img/socialicons/svg/RSS-color.svg"); }
#header #header-blocks #block-social-media-links-social-media-links a {
display: block;
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
background-size: contain; }
#header #header-blocks #block-social-media-links-social-media-links img {
display: none; }
/*
__ _ ___ __ _
@@ -3628,8 +3662,8 @@ body.home-v2 #main {
#content-top #block-materio-flag-materio-flag-mybookmarks h2, #content-top #block-materio-flag-materio-flag-mylists h2 {
font-size: 12px;
font-weight: 700;
margin: 0 0 0.5em 0;
line-height: 1.2;
margin: 0;
color: #000; }
#content-top #block-materio-flag-materio-flag-mybookmarks h2 a.open-list, #content-top #block-materio-flag-materio-flag-mybookmarks h2 i.fi-x, #content-top #block-materio-flag-materio-flag-mylists h2 a.open-list, #content-top #block-materio-flag-materio-flag-mylists h2 i.fi-x {
display: moz-inline-stack;
@@ -3673,9 +3707,6 @@ body.home-v2 #main {
zoom: 1;
*display: inline;
vertical-align: middle; }
@media only screen and (max-width: 40em) {
#tool-bar .inner-content {
padding: 0; } }
.oldie #tool-bar {
background-color: #B1ADAD;
padding: 0 10px; }
@@ -3718,7 +3749,7 @@ body.home-v2 #main {
.csstransitions #tool-bar #block-materio-page-title-materio-page-title:hover a.edit-list {
opacity: 1;
transition: opacity 0.3s ease-out; }
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
@media only screen and (max-width: 40em) {
#tool-bar #block-materio-page-title-materio-page-title {
display: block; } }
#tool-bar #block-materio-search-api-materio-search-api-viewmode .viewmode-link {
@@ -4006,12 +4037,11 @@ article.search-performance.view-mode-cardfull {
padding: 1em 212px; }
/*
_____ _____ _____ ____ _____ _____ _____ _____ _____ _____ _____ _____ _____
| | _ | __ | \ | __ | | | | | | _ | __ | | | __|
| --| | -| | | | __ -| | | | | -| | | | | -| -|__ |
|_____|__|__|__|__|____/ |_____|_____|_____|__|__|_|_|_|__|__|__|__|__|__|_____|
______ __ ____ __ __
/ ____/___ __________/ / / __ )____ ____ / /______ ___ ____ ______/ /_______
/ / / __ `/ ___/ __ / / __ / __ \/ __ \/ //_/ __ `__ \/ __ `/ ___/ //_/ ___/
/ /___/ /_/ / / / /_/ / / /_/ / /_/ / /_/ / ,< / / / / / / /_/ / / / ,< (__ )
\____/\__,_/_/ \__,_/ /_____/\____/\____/_/|_/_/ /_/ /_/\__,_/_/ /_/|_/____/
*/
article.node-materiau.vm-bookmark, article.node-breve.vm-bookmark {
width: 50px;
@@ -4146,16 +4176,16 @@ article.node-materiau.vm-bookmark, article.node-breve.vm-bookmark {
height: 17px; }
article.node-materiau.vm-bookmark div.workflow, article.node-breve.vm-bookmark div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
article.node-materiau.vm-bookmark div.workflow span, article.node-breve.vm-bookmark div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -4210,12 +4240,11 @@ article.node-materiau.vm-bookmark, article.node-breve.vm-bookmark {
display: none; }
/*
_____ _____ _____ ____ _____ _____ _____ __ __
| | _ | __ | \ | __| | _ | | | |
| --| | -| | | |__ | | | | | |__| |__
|_____|__|__|__|__|____/ |_____|_|_|_|__|__|_____|_____|
______ __ _____ ____
/ ____/___ __________/ / / ___/____ ___ ____ _/ / /
/ / / __ `/ ___/ __ / \__ \/ __ `__ \/ __ `/ / /
/ /___/ /_/ / / / /_/ / ___/ / / / / / / /_/ / / /
\____/\__,_/_/ \__,_/ /____/_/ /_/ /_/\__,_/_/_/
*/
article.node-materiau.vm-cardsmall, article.node-breve.vm-cardsmall {
width: 100px;
@@ -4349,16 +4378,16 @@ article.node-materiau.vm-cardsmall, article.node-breve.vm-cardsmall {
height: 17px; }
article.node-materiau.vm-cardsmall div.workflow, article.node-breve.vm-cardsmall div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
article.node-materiau.vm-cardsmall div.workflow span, article.node-breve.vm-cardsmall div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -4453,11 +4482,12 @@ article.node-materiau.vm-cardsmall, article.node-breve.vm-cardsmall {
transition: margin-top 0s 0.3s; }
/*
_____ _____ _____ __ _____ _____ _____ _____ _____ _____ __ __ _____ _____ _____ ____
|_ _| | | ||_ _| | _ | | __| | _ | | | | | | _ | __ | | | | | | | | |__| | |- -| __| |__ | | | | | |__| |__ | --| | -| | |
|_| |_____|_____|_____|_| |_____|__| |_____|_|_|_|__|__|_____|_____| |_____|__|__|__|__|____/
______ ____ _ ____ __
/_ __/___ ____ / / /_(_)___ _________ ___ ____ _/ / / _________ __________/ /
/ / / __ \/ __ \/ / __/ / __ \ / ___/ __ `__ \/ __ `/ / / / ___/ __ `/ ___/ __ /
/ / / /_/ / /_/ / / /_/ / /_/ / (__ ) / / / / / /_/ / / / / /__/ /_/ / / / /_/ /
/_/ \____/\____/_/\__/_/ .___/ /____/_/ /_/ /_/\__,_/_/_/ \___/\__,_/_/ \__,_/
/_/
*/
#tooltip .group-header.smallcard {
font-size: 14px;
@@ -4475,12 +4505,10 @@ article.node-materiau.vm-cardsmall, article.node-breve.vm-cardsmall {
float: right; }
/*
_____ _____ _____ ____ _____ _____ ____ _____ _____ _____
| | _ | __ | \ | | __| \| | | | |
| --| | -| | | | | | | __| | |- -| | | | | |
|_____|__|__|__|__|____/ |_|_|_|_____|____/|_____|_____|_|_|_|
______ __ __ ___ ___
/ ____/___ __________/ / / |/ /__ ____/ (_)_ ______ ___
/ / / __ `/ ___/ __ / / /|_/ / _ \/ __ / / / / / __ `__ / /___/ /_/ / / / /_/ / / / / / __/ /_/ / / /_/ / / / / / /
\____/\__,_/_/ \__,_/ /_/ /_/\___/\__,_/_/\__,_/_/ /_/ /_/
*/
article.node-materiau.vm-cardmedium, article.node-breve.vm-cardmedium {
width: 210px;
@@ -4614,16 +4642,16 @@ article.node-materiau.vm-cardmedium, article.node-breve.vm-cardmedium {
height: 17px; }
article.node-materiau.vm-cardmedium div.workflow, article.node-breve.vm-cardmedium div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
article.node-materiau.vm-cardmedium div.workflow span, article.node-breve.vm-cardmedium div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -4759,6 +4787,14 @@ article.node-materiau.vm-cardmedium, article.node-breve.vm-cardmedium {
cursor: e-resize; }
article.node-materiau.vm-cardmedium .field-name-field-description .column > *, article.node-materiau.vm-cardmedium .field-name-body .column > *, article.node-breve.vm-cardmedium .field-name-field-description .column > *, article.node-breve.vm-cardmedium .field-name-body .column > * {
padding-right: 25px; }
article.node-materiau.vm-cardmedium .field-name-field-location, article.node-breve.vm-cardmedium .field-name-field-location {
font-size: 12px;
padding: 5px;
font-weight: 300; }
article.node-materiau.vm-cardmedium .field-name-field-location .field-label, article.node-breve.vm-cardmedium .field-name-field-location .field-label {
font-size: 10px;
text-transform: lowercase;
margin: 0; }
article.node-materiau.vm-cardmedium .column-wrapper, article.node-breve.vm-cardmedium .column-wrapper {
padding: 5px; }
article.node-materiau.vm-cardmedium .column-wrapper.columnized, article.node-breve.vm-cardmedium .column-wrapper.columnized {
@@ -4823,11 +4859,12 @@ article.node-materiau.vm-cardmedium, article.node-breve.vm-cardmedium {
background: #FFF; }
/*
_____ _____ _____ ____ _____ _____ _____
| | _ | __ | \ | __ | | __|
| --| | -| | | | __ -|- -| | |
|_____|__|__|__|__|____/ |_____|_____|_____|
______ __ ____ _
/ ____/___ __________/ / / __ )(_)___ _
/ / / __ `/ ___/ __ / / __ / / __ `/
/ /___/ /_/ / / / /_/ / / /_/ / / /_/ /
\____/\__,_/_/ \__,_/ /_____/_/\__, /
/____/
*/
article.node-materiau.vm-cardbig, article.node-breve.vm-cardbig {
width: 425px;
@@ -4961,16 +4998,16 @@ article.node-materiau.vm-cardbig, article.node-breve.vm-cardbig {
height: 17px; }
article.node-materiau.vm-cardbig div.workflow, article.node-breve.vm-cardbig div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
article.node-materiau.vm-cardbig div.workflow span, article.node-breve.vm-cardbig div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -5108,6 +5145,14 @@ article.node-materiau.vm-cardbig, article.node-breve.vm-cardbig {
cursor: w-resize; }
article.node-materiau.vm-cardbig .field-name-field-description.columnized .column-switcher.next-column, article.node-materiau.vm-cardbig .field-name-body.columnized .column-switcher.next-column, article.node-breve.vm-cardbig .field-name-field-description.columnized .column-switcher.next-column, article.node-breve.vm-cardbig .field-name-body.columnized .column-switcher.next-column {
cursor: e-resize; }
article.node-materiau.vm-cardbig .field-name-field-location, article.node-breve.vm-cardbig .field-name-field-location {
font-size: 12px;
padding: 10px;
font-weight: 300; }
article.node-materiau.vm-cardbig .field-name-field-location .field-label, article.node-breve.vm-cardbig .field-name-field-location .field-label {
font-size: 10px;
text-transform: lowercase;
float: none; }
article.node-materiau.vm-cardbig .column-wrapper, article.node-breve.vm-cardbig .column-wrapper {
padding: 10px; }
article.node-materiau.vm-cardbig .column-wrapper.columnized, article.node-breve.vm-cardbig .column-wrapper.columnized {
@@ -5165,10 +5210,11 @@ article.node-materiau.vm-cardbig, article.node-breve.vm-cardbig {
background-color: #69CDCF; }
/*
_____ _____ _____ ____ _____ _____ __ __
| | _ | __ | \ | __| | | | | |
| --| | -| | | | __| | | |__| |__
|_____|__|__|__|__|____/ |__| |_____|_____|_____|
______ __ ______ ____
/ ____/___ __________/ / / ____/_ __/ / /
/ / / __ `/ ___/ __ / / /_ / / / / / /
/ /___/ /_/ / / / /_/ / / __/ / /_/ / / /
\____/\__,_/_/ \__,_/ /_/ \__,_/_/_/
*/
article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
@@ -5304,16 +5350,16 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
height: 17px; }
article.node-materiau.vm-cardfull div.workflow, article.node-breve.vm-cardfull div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
article.node-materiau.vm-cardfull div.workflow span, article.node-breve.vm-cardfull div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -5407,6 +5453,14 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
article.node-materiau.vm-cardfull .field-name-field-attachments, article.node-breve.vm-cardfull .field-name-field-attachments {
padding: 10px;
font-size: 12px; }
article.node-materiau.vm-cardfull .field-name-field-location, article.node-breve.vm-cardfull .field-name-field-location {
font-size: 12px;
padding: 10px;
font-weight: 300; }
article.node-materiau.vm-cardfull .field-name-field-location .field-label, article.node-breve.vm-cardfull .field-name-field-location .field-label {
font-size: 10px;
text-transform: lowercase;
float: none; }
article.node-materiau.vm-cardfull .field-name-field-company-fab, article.node-materiau.vm-cardfull .field-name-field-company-distrib, article.node-breve.vm-cardfull .field-name-field-company-fab, article.node-breve.vm-cardfull .field-name-field-company-distrib {
font-size: 12px;
padding: 10px;
@@ -5451,11 +5505,11 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
background-color: #69CDCF; }
/*
_ _ _
___ ___ ___ _| | ___ ___|_|___| |_
| _| .'| _| . | | . | _| | | _|
|___|__,|_| |___| | _|_| |_|_|_|_|
|_|
__ ____ _ __
_________ __________/ / / __ \_____(_)___ / /_
/ ___/ __ `/ ___/ __ / / /_/ / ___/ / __ \/ __/
/ /__/ /_/ / / / /_/ / / ____/ / / / / / / /_
\___/\__,_/_/ \__,_/ /_/ /_/ /_/_/ /_/\__/
*/
.print-node-materiau {
margin: 0 auto; }
@@ -5594,16 +5648,16 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
height: 17px; }
.print-node-materiau div.workflow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 11;
padding: 5px;
border-radius: 5px 0 3px 0;
border-radius: 3px 0 5px 0;
background-clip: padding-box;
font-size: 10px;
vertical-align: top;
background-color: rgba(255, 255, 255, 0.9);
color: #000; }
background-color: rgba(20, 20, 20, 0.9);
color: #fff; }
.print-node-materiau div.workflow span {
padding: 3px 0 0 4px;
display: moz-inline-stack;
@@ -5667,6 +5721,8 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
position: absolute; }
.print-content .node-materiau.vm-print .side.group-side-left .field-name-field-description {
font-size: 0.8em; }
.print-content .node-materiau.vm-print .side.group-side-left .field-name-field-location {
font-size: 0.7em; }
.print-content .node-materiau.vm-print .side.group-side-left > .field-type-taxonomy-term-reference {
display: inline-block;
vertical-align: top;
@@ -6478,13 +6534,14 @@ body.node-type-simplenews #content article.node.node-simplenews {
body.node-type-simplenews #content article.node.node-simplenews {
max-width: 100%;
overflow-x: hidden; }
body.node-type-simplenews #content article.node.node-simplenews table, body.node-type-simplenews #content article.node.node-simplenews tbody, body.node-type-simplenews #content article.node.node-simplenews tr, body.node-type-simplenews #content article.node.node-simplenews td {
display: block;
max-width: 100%; }
body.node-type-simplenews #content article.node.node-simplenews table {
width: 100% !important; }
body.node-type-simplenews #content article.node.node-simplenews td {
vertical-align: top; }
body.node-type-simplenews #content article.node.node-simplenews img {
max-width: 100%; }
body.node-type-simplenews #content article.node.node-simplenews p {
padding-right: 1em; } }
padding: 0 0.5em; } }
/*
_____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
@@ -7775,7 +7832,6 @@ body.home-v2 #center {
margin-top: 0.5em; }
#home-v2 > .panel-panel > div > .panel-pane.showroom:after {
content: url("../img/bulle.png");
-webkit-transform: scale(0.8);
transform: scale(0.8);
position: absolute;
bottom: -120px;
@@ -7839,7 +7895,6 @@ body.home-v2 #center {
background-color: rgba(230, 230, 230, 0.8); }
#home-v2 > .panel-panel > div > .panel-pane.bdd:after {
content: url("../img/boule.png");
-webkit-transform: scale(0.8);
transform: scale(0.8);
position: absolute;
bottom: -50px;
@@ -1,6 +1,3 @@
// @koala-prepend "gui_ck_fw/gui.js"
// @codekit-prepend "gui.js"
(function($) {
@@ -48,13 +45,13 @@
// touch scroll
position = {x:null,y:null},
translate3d_content = 0,
_isLoggedIn = !$('body').is('.not-logged-in'),
_isFrontNotLogged = $('body').is('.front.not-logged-in'),
_isLoggedIn = !_$body.is('.not-logged-in'),
_isFrontNotLogged = _$body.is('.front.not-logged-in'),
_isFrontHomeV2 = _$body.is('.home-v2'),
_skrollr,
_isMembershipForm = $('body').is('.page-node-11186'), //$('body').is('.page-node-11187') || ,
// _isBreveMateriauNodePage = $('body').is('.node-type-breve') || $('body').is('.node-type-materiau');
_isBreveMateriauNodePage = _themeSettings.page_callback == 'node_page_view' && (_themeSettings.node_type == 'materiau' || _themeSettings.node_type == 'breve'),
_isMembershipForm = _$body.is('.page-node-11186'), //$('body').is('.page-node-11187') || ,
_isBreveMateriauNodePage = _$body.is('.node-type-breve') || _$body.is('.node-type-materiau'),
// _isBreveMateriauNodePage = _themeSettings.page_callback == 'node_page_view' && (_themeSettings.node_type == 'materiau' || _themeSettings.node_type == 'breve'),
_resizeTimer,
_max_480 = function(){ return (viewport().width < 479); },
_480_768 = function(){ return ( !_max_480() && _max_768() ); },
@@ -420,12 +417,13 @@
* layout
*/
function initLayout(){
if(!_max_768()){
trace("initLayout");
// if(!_max_768()){
var height = $('#header').h() + $('#tasks').h();
if(!_max_480() && !_touch ){
height += $('#utilities').h()+15;
}
// if(!_max_480() && !_touch ){
height += $('#utilities').h();//+15;
// }
//$('#main').css('margin-top', height+15);
// $('#container').css('padding-top', height+15);
@@ -433,7 +431,7 @@
if(!$('html').is(".ie8")){
$('#container').animate({'padding-top':height}, 300);
}
}
// }
};
/**
@@ -530,7 +528,7 @@
};
function onResultsChanged(event){
// trace('MaterioBaseTheme :: onResultsChanged',event);
trace('MaterioBaseTheme :: onResultsChanged',event);
$(document).scrollTop(0);
focusCard($('#content .search-results, #content .actuality-items').children('.node:first-child'));
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More