Browse Source

added footer menu, insert module, image field to page

Bachir Soussi Chiadmi 7 years ago
parent
commit
fc8070a669
27 changed files with 1750 additions and 65 deletions
  1. 339 0
      sites/all/modules/contrib/files/insert/LICENSE.txt
  2. 57 0
      sites/all/modules/contrib/files/insert/README.txt
  3. 21 0
      sites/all/modules/contrib/files/insert/includes/file.inc
  4. 70 0
      sites/all/modules/contrib/files/insert/includes/image.inc
  5. 84 0
      sites/all/modules/contrib/files/insert/includes/insert.inc
  6. 10 0
      sites/all/modules/contrib/files/insert/insert.info
  7. 14 0
      sites/all/modules/contrib/files/insert/insert.install
  8. 261 0
      sites/all/modules/contrib/files/insert/insert.js
  9. 424 0
      sites/all/modules/contrib/files/insert/insert.module
  10. 28 0
      sites/all/modules/contrib/files/insert/templates/image-insert-image.tpl.php
  11. 24 0
      sites/all/modules/contrib/files/insert/templates/insert-icon-link.tpl.php
  12. 27 0
      sites/all/modules/contrib/files/insert/templates/insert-image.tpl.php
  13. 24 0
      sites/all/modules/contrib/files/insert/templates/insert-link.tpl.php
  14. 30 0
      sites/all/modules/contrib/files/insert/templates/insert-widget.tpl.php
  15. 5 5
      sites/all/modules/features/admin/admin.features.inc
  16. 17 12
      sites/all/modules/features/admin/admin.features.menu_links.inc
  17. 32 33
      sites/all/modules/features/admin/admin.views_default.inc
  18. 5 5
      sites/all/modules/features/clameurs/clameurs.features.fe_block_settings.inc
  19. 26 0
      sites/all/modules/features/clameurs/clameurs.features.menu_custom.inc
  20. 87 0
      sites/all/modules/features/clameurs/clameurs.features.menu_links.inc
  21. 6 1
      sites/all/modules/features/clameurs/clameurs.info
  22. 28 0
      sites/all/modules/features/page/page.features.field_base.inc
  23. 78 1
      sites/all/modules/features/page/page.features.field_instance.inc
  24. 5 0
      sites/all/modules/features/page/page.info
  25. 26 0
      sites/all/modules/features/page/page.strongarm.inc
  26. 16 0
      sites/all/themes/figureslibres/clameurs/css/dist/styles.css
  27. 6 8
      sites/all/themes/figureslibres/clameurs/css/styles.scss

+ 339 - 0
sites/all/modules/contrib/files/insert/LICENSE.txt

@@ -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.

+ 57 - 0
sites/all/modules/contrib/files/insert/README.txt

@@ -0,0 +1,57 @@
+
+Insert is a utility that makes inserting images and links to files into text
+areas or WYSIWYGs much easier. It adds a simple JavaScript-based button to
+File and Image fields. Images may be inserted into text areas with a specific
+Image style.
+
+Insert was written by Nate Haug.
+
+This Module Made by Robots: http://www.lullabot.com
+
+Dependencies
+------------
+
+Insert module does not have any dependencies, but it won't do anything unless
+you have at least one File or Image field configured on your site. Both of
+these fields are provided by Drupal core.
+
+Recommended
+-----------
+
+* WYSIWYG module
+
+Install
+-------
+
+1) Copy the insert folder to the modules folder in your installation. Usually
+   this is sites/all/modules.
+
+2) In your Drupal site, enable the module under Administer -> Modules
+   (/admin/modules).
+
+3) Add or configure a File or Image field under Administer -> Structure ->
+   Content types -> [type] -> Manage Fields
+   (admin/structure/types/manage/[type]/fields). Once configuring a field,
+   there is a new section in the Field options for "Insert". You can then
+   configure the field to include an Insert button and what templates you would
+   like to have.
+
+4) Create a piece of content with the configured field. After uploading a file,
+   an "Insert" button will appear. Click this button to send the file or image
+   into the Body field.
+
+Insert should work on multiple fields (the last field that was active will
+receive the file), and with most popular WYSIWYG editors.
+
+Theming
+-------
+
+Insert can be configured to work with non-HTML filters like BBCode or Markdown.
+To do this, copy the template file you would like to change from the "templates"
+directory to your active theme's directory. Then empty your Drupal caches at
+admin/config/development/performance.
+
+The Image templates may also be used per Image style. You can copy the
+image-insert-image.tpl.php file to your theme directory and then rename it to
+image-insert-image--[style-name].tpl.php, where [style-name] is the name of the
+Image style. Change underscores to hyphens in the style name.

+ 21 - 0
sites/all/modules/contrib/files/insert/includes/file.inc

@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @file
+ * Insert support for File module.
+ */
+
+/**
+ * Implementation of hook_insert_widgets().
+ */
+function file_insert_widgets() {
+  return array(
+    'file_generic' => array(
+      'element_type' => 'managed_file',
+      'wrapper' => '.file-widget',
+      'fields' => array(
+        'description' => 'input[name$="[description]"]',
+      ),
+    ),
+  );
+}

+ 70 - 0
sites/all/modules/contrib/files/insert/includes/image.inc

@@ -0,0 +1,70 @@
+<?php
+
+/**
+ * @file
+ * Insert support for ImageField module.
+ */
+
+/**
+ * Implementation of hook_insert_widgets().
+ */
+function image_insert_widgets() {
+  return array(
+    'image_image' => array(
+      'element_type' => 'managed_file',
+      'wrapper' => '.image-widget',
+      'fields' => array(
+        'alt' => 'input[name$="[alt]"], textarea[name$="[alt]"]',
+        'title' => 'input[name$="[title]"], textarea[name$="[title]"]',
+        'description' => 'input[name$="[description]"], textarea[name$="[description]"]',
+      ),
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_insert_styles().
+ */
+function image_insert_styles() {
+  $image_styles = image_styles();
+  $insert_styles = array();
+  foreach ($image_styles as $style) {
+    $insert_styles['image_' . $style['name']] = array(
+      'label' => t($style['name']),
+    );
+  }
+  return $insert_styles;
+}
+
+/**
+ * Implementation of hook_insert_content().
+ */
+function image_insert_content($item, $style, $widget) {
+  $style_name = preg_replace('/^image_/', '', $style['name']);
+  return theme(array('image_insert_image__' . str_replace('-', '_', $style_name), 'image_insert_image'), array('item' => $item, 'widget' => $widget, 'style_name' => $style_name));
+}
+
+/**
+ * Theme the content that will be inserted for Image styles.
+ */
+function template_preprocess_image_insert_image(&$vars) {
+  $vars['file'] = file_load($vars['item']['fid']);
+
+  // Determine dimensions of the image after the image style transformations.
+  $image_info = @image_get_info($vars['file']->uri);
+  $vars['width'] = isset($image_info['width']) ? $image_info['width'] : NULL;
+  $vars['height'] = isset($image_info['height']) ? $image_info['height'] : NULL;
+  image_style_transform_dimensions($vars['style_name'], $vars);
+
+  $vars['uri'] = image_style_path($vars['style_name'], $vars['file']->uri);
+  $absolute = isset($vars['widget']['settings']['insert_absolute']) ? $vars['widget']['settings']['insert_absolute'] : NULL;
+  $vars['url'] = insert_create_url($vars['uri'], $absolute, variable_get('clean_url'));
+
+  // http://drupal.org/node/1923336
+  if (function_exists('image_style_path_token')) {
+    $token_query = array(IMAGE_DERIVATIVE_TOKEN => image_style_path_token($vars['style_name'], $vars['file']->uri));
+    $vars['url'] .= (strpos($vars['url'], '?') !== FALSE ? '&' : '?') . drupal_http_build_query($token_query);
+  }
+
+  $vars['class'] = !empty($vars['widget']['settings']['insert_class']) ? $vars['widget']['settings']['insert_class'] : '';
+}

+ 84 - 0
sites/all/modules/contrib/files/insert/includes/insert.inc

@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * @file
+ * Insert support for generic files.
+ */
+
+/**
+ * Implementation of hook_insert_styles().
+ */
+function insert_insert_styles() {
+  $insert_styles = array();
+  $insert_styles['auto'] = array('label' => t('Automatic'), 'weight' => -20);
+  $insert_styles['link'] = array('label' => t('Link to file'), 'weight' => -12);
+  $insert_styles['icon_link'] = array('label' => t('Link to file (with icon)'), 'weight' => -11);
+  $insert_styles['image'] = array('label' => t('Original image'), 'weight' => -10);
+  return $insert_styles;
+}
+
+/**
+ * Implementation of hook_insert_content().
+ */
+function insert_insert_content($item, $style, $widget) {
+  $style_name = $style['name'];
+
+  if (empty($item['fid'])) {
+    return '';
+  }
+
+  if ($style_name == 'auto') {
+    $file = file_load($item['fid']);
+    $info = @pathinfo($file->uri);
+    if (in_array(strtolower($info['extension']), array('png', 'jpg', 'jpeg', 'gif'))) {
+      $style_name = 'image';
+    }
+  }
+
+  if ($style_name == 'image') {
+    return theme('insert_image', array('item' => $item, 'widget' => $widget));
+  }
+  if ($style_name == 'icon_link') {
+    return theme('insert_icon_link', array('item' => $item, 'widget' => $widget));
+  }
+  else {
+    return theme('insert_link', array('item' => $item, 'widget' => $widget));
+  }
+}
+
+/**
+ * Preprocess variables for the insert-image.tpl.php file.
+ */
+function template_preprocess_insert_image(&$vars) {
+  $vars['file'] = file_load($vars['item']['fid']);
+  $absolute = isset($vars['widget']['settings']['insert_absolute']) ? $vars['widget']['settings']['insert_absolute'] : NULL;
+  $vars['url'] = insert_create_url($vars['file']->uri, $absolute);
+  $vars['class'] = !empty($vars['widget']['settings']['insert_class']) ? $vars['widget']['settings']['insert_class'] : '';
+  $image_info = @image_get_info($vars['file']->uri);
+  $vars['width'] = isset($image_info['width']) ? $image_info['width'] : '';
+  $vars['height'] = isset($image_info['height']) ? $image_info['height'] : '';
+}
+
+/**
+ * Preprocess variables for the insert-link.tpl.php file.
+ */
+function template_preprocess_insert_link(&$vars) {
+  $vars['file'] = file_load($vars['item']['fid']);
+  $absolute = isset($vars['widget']['settings']['insert_absolute']) ? $vars['widget']['settings']['insert_absolute'] : NULL;
+  $vars['url'] = insert_create_url($vars['file']->uri, $absolute);
+  $vars['class'] = !empty($vars['widget']['settings']['insert_class']) ? $vars['widget']['settings']['insert_class'] : '';
+  $vars['name'] = $vars['file']->filename;
+}
+
+/**
+ * Preprocess variables for the insert-icon-link.tpl.php file.
+ */
+function template_preprocess_insert_icon_link(&$vars) {
+  $vars['file'] = file_load($vars['item']['fid']);
+  $absolute = isset($vars['widget']['settings']['insert_absolute']) ? $vars['widget']['settings']['insert_absolute'] : NULL;
+  $vars['url'] = insert_create_url($vars['file']->uri, $absolute);
+  $vars['class'] = !empty($vars['widget']['settings']['insert_class']) ? $vars['widget']['settings']['insert_class'] : '';
+  $vars['name'] = $vars['file']->filename;
+  $vars['type'] = $vars['file']->filemime .'; length='. $vars['file']->filesize;
+  $vars['icon'] = theme('file_icon', array('file' => $vars['file']));
+}

+ 10 - 0
sites/all/modules/contrib/files/insert/insert.info

@@ -0,0 +1,10 @@
+name = Insert
+description = Assists in inserting files, images, or other media into the body field or other text areas.
+core = 7.x
+
+; Information added by drupal.org packaging script on 2013-02-23
+version = "7.x-1.3"
+core = "7.x"
+project = "insert"
+datestamp = "1361661838"
+

+ 14 - 0
sites/all/modules/contrib/files/insert/insert.install

@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @file
+ * Update and install functions for Insert.
+ */
+
+/**
+ * Implementation of hook_install().
+ */
+function insert_install() {
+  // Insert needs to load after both ImageField and FileField.
+  db_query("UPDATE {system} SET weight = 15 WHERE type = 'module' AND name = 'insert'");
+}

+ 261 - 0
sites/all/modules/contrib/files/insert/insert.js

@@ -0,0 +1,261 @@
+/**
+ * @file
+ * JavaScript to activate "Insert" buttons on file and image fields.
+ */
+
+(function ($) {
+
+/**
+ * Behavior to add "Insert" buttons.
+ */
+Drupal.behaviors.insert = {};
+Drupal.behaviors.insert.attach = function(context) {
+  if (typeof(insertTextarea) == 'undefined') {
+    insertTextarea = $('#edit-body textarea.text-full').get(0) || false;
+  }
+
+  // Keep track of the last active textarea (if not using WYSIWYG).
+  $('textarea:not([name$="[data][title]"]):not(.insert-processed)', context).addClass('insert-processed').focus(insertSetActive).blur(insertRemoveActive);
+
+  // Add the click handler to the insert button.
+  $('.insert-button:not(.insert-processed)', context).addClass('insert-processed').click(insert);
+
+  function insertSetActive() {
+    insertTextarea = this;
+    this.insertHasFocus = true;
+  }
+
+  function insertRemoveActive() {
+    if (insertTextarea == this) {
+      var thisTextarea = this;
+      setTimeout(function() {
+        thisTextarea.insertHasFocus = false;
+      }, 1000);
+    }
+  }
+
+  function insert() {
+    var widgetType = $(this).attr('rel');
+    var settings = Drupal.settings.insert.widgets[widgetType];
+    var wrapper = $(this).parents(settings.wrapper).filter(':first').get(0);
+    var style = $('.insert-style', wrapper).val();
+    var content = $('input.insert-template[name$="[' + style + ']"]', wrapper).val();
+    var filename = $('input.insert-filename', wrapper).val();
+    var options = {
+      widgetType: widgetType,
+      filename: filename,
+      style: style,
+      fields: {}
+    };
+
+    // Update replacements.
+    for (var fieldName in settings.fields) {
+      var fieldValue = $(settings.fields[fieldName], wrapper).val();
+      if (fieldValue) {
+        fieldValue = fieldValue
+          .replace(/&/g, '&amp;')
+          .replace(/"/g, '&quot;')
+          .replace(/'/g, '&#39;')
+          .replace(/</g, '&lt;')
+          .replace(/>/g, '&gt;');
+      }
+      options['fields'][fieldName] = fieldValue;
+      if (fieldValue) {
+        var fieldRegExp = new RegExp('__' + fieldName + '(_or_filename)?__', 'g');
+        content = content.replace(fieldRegExp, fieldValue);
+      }
+      else {
+        var fieldRegExp = new RegExp('__' + fieldName + '_or_filename__', 'g');
+        content = content.replace(fieldRegExp, filename);
+      }
+    }
+
+    // File name replacement.
+    var fieldRegExp = new RegExp('__filename__', 'g');
+    content = content.replace(fieldRegExp, filename);
+
+    // Check for a maximum dimension and scale down the width if necessary.
+    // This is intended for use with Image Resize Filter.
+    var widthMatches = content.match(/width[ ]*=[ ]*"(\d*)"/i);
+    var heightMatches = content.match(/height[ ]*=[ ]*"(\d*)"/i);
+    if (settings.maxWidth && widthMatches && parseInt(widthMatches[1]) > settings.maxWidth) {
+      var insertRatio = settings.maxWidth / widthMatches[1];
+      var width = settings.maxWidth;
+      content = content.replace(/width[ ]*=[ ]*"?(\d*)"?/i, 'width="' + width + '"');
+
+      if (heightMatches) {
+        var height = Math.round(heightMatches[1] * insertRatio);
+        content = content.replace(/height[ ]*=[ ]*"?(\d*)"?/i, 'height="' + height + '"');
+      }
+    }
+
+    // Allow other modules to perform replacements.
+    options['content'] = content;
+    $.event.trigger('insertIntoActiveEditor', [options]);
+    content = options['content'];
+
+    // Cleanup unused replacements.
+    content = content.replace(/"__([a-z0-9_]+)__"/g, '""');
+
+    // Cleanup empty attributes (other than alt).
+    content = content.replace(/([a-z]+)[ ]*=[ ]*""/g, function(match, tagName) {
+      return (tagName === 'alt') ? match : '';
+    });
+
+    // Insert the text.
+    Drupal.insert.insertIntoActiveEditor(content);
+  }
+};
+
+// General Insert API functions.
+Drupal.insert = {
+  /**
+   * Insert content into the current (or last active) editor on the page. This
+   * should work with most WYSIWYGs as well as plain textareas.
+   *
+   * @param content
+   */
+  insertIntoActiveEditor: function(content) {
+    var editorElement;
+
+    // Always work in normal text areas that currently have focus.
+    if (insertTextarea && insertTextarea.insertHasFocus) {
+      editorElement = insertTextarea;
+      Drupal.insert.insertAtCursor(insertTextarea, content);
+    }
+    // Direct tinyMCE support.
+    else if (typeof(tinyMCE) != 'undefined' && tinyMCE.activeEditor) {
+      editorElement = document.getElementById(tinyMCE.activeEditor.editorId);
+      Drupal.insert.activateTabPane(editorElement);
+      tinyMCE.activeEditor.execCommand('mceInsertContent', false, content);
+    }
+    // WYSIWYG support, should work in all editors if available.
+    else if (Drupal.wysiwyg && Drupal.wysiwyg.activeId) {
+      editorElement = document.getElementById(Drupal.wysiwyg.activeId);
+      Drupal.insert.activateTabPane(editorElement);
+      Drupal.wysiwyg.instances[Drupal.wysiwyg.activeId].insert(content)
+    }
+    // FCKeditor module support.
+    else if (typeof(FCKeditorAPI) != 'undefined' && typeof(fckActiveId) != 'undefined') {
+      editorElement = document.getElementById(fckActiveId);
+      Drupal.insert.activateTabPane(editorElement);
+      FCKeditorAPI.Instances[fckActiveId].InsertHtml(content);
+    }
+    // Direct FCKeditor support (only body field supported).
+    else if (typeof(FCKeditorAPI) != 'undefined') {
+      // Try inserting into the body.
+      if (FCKeditorAPI.Instances[insertTextarea.id]) {
+        editorElement = insertTextarea;
+        Drupal.insert.activateTabPane(editorElement);
+        FCKeditorAPI.Instances[insertTextarea.id].InsertHtml(content);
+      }
+      // Try inserting into the first instance we find (may occur with very
+      // old versions of FCKeditor).
+      else {
+        for (var n in FCKeditorAPI.Instances) {
+          editorElement = document.getElementById(n);
+          Drupal.insert.activateTabPane(editorElement);
+          FCKeditorAPI.Instances[n].InsertHtml(content);
+          break;
+        }
+      }
+    }
+    // CKeditor module support.
+    else if (typeof(CKEDITOR) != 'undefined' && typeof(Drupal.ckeditorActiveId) != 'undefined') {
+      editorElement = document.getElementById(Drupal.ckeditorActiveId);
+      Drupal.insert.activateTabPane(editorElement);
+      CKEDITOR.instances[Drupal.ckeditorActiveId].insertHtml(content);
+    }
+    // Direct CKeditor support (only body field supported).
+    else if (typeof(CKEDITOR) != 'undefined' && CKEDITOR.instances[insertTextarea.id]) {
+      editorElement = insertTextarea;
+      Drupal.insert.activateTabPane(editorElement);
+      CKEDITOR.instances[insertTextarea.id].insertHtml(content);
+    }
+    else if (insertTextarea) {
+      editorElement = insertTextarea;
+      Drupal.insert.activateTabPane(editorElement);
+      Drupal.insert.insertAtCursor(insertTextarea, content);
+    }
+
+    if (editorElement) {
+      Drupal.insert.contentWarning(editorElement, content);
+    }
+
+    return false;
+  },
+
+  /**
+   * Check for vertical tabs and activate the pane containing the editor.
+   *
+   * @param editor
+   *   The DOM object of the editor that will be checked.
+   */
+  activateTabPane: function(editor) {
+    var $pane = $(editor).parents('.vertical-tabs-pane:first');
+    var $panes = $pane.parent('.vertical-tabs-panes');
+    var $tabs = $panes.parents('.vertical-tabs:first').find('ul.vertical-tabs-list:first li a');
+    if ($pane.size() && $pane.is(':hidden') && $panes.size() && $tabs.size()) {
+      var index = $panes.children().index($pane);
+      $tabs.eq(index).click();
+    }
+  },
+
+  /**
+   * Warn users when attempting to insert an image into an unsupported field.
+   *
+   * This function is only a 90% use-case, as it doesn't support when the filter
+   * tip are hidden, themed, or when only one format is available. However it
+   * should fail silently in these situations.
+   */
+  contentWarning: function(editorElement, content) {
+    if (!content.match(/<img /)) return;
+
+    var $wrapper = $(editorElement).parents('div.text-format-wrapper:first');
+    if (!$wrapper.length) return;
+
+    $wrapper.find('.filter-guidelines-item:visible li').each(function(index, element) {
+      var expression = new RegExp(Drupal.t('Allowed HTML tags'));
+      if (expression.exec(element.textContent) && !element.textContent.match(/<img>/)) {
+        alert(Drupal.t("The selected text format will not allow it to display images. The text format will need to be changed for this image to display properly when saved."));
+      }
+    });
+  },
+
+  /**
+   * Insert content into a textarea at the current cursor position.
+   *
+   * @param editor
+   *   The DOM object of the textarea that will receive the text.
+   * @param content
+   *   The string to be inserted.
+   */
+  insertAtCursor: function(editor, content) {
+    // Record the current scroll position.
+    var scroll = editor.scrollTop;
+
+    // IE support.
+    if (document.selection) {
+      editor.focus();
+      sel = document.selection.createRange();
+      sel.text = content;
+    }
+
+    // Mozilla/Firefox/Netscape 7+ support.
+    else if (editor.selectionStart || editor.selectionStart == '0') {
+      var startPos = editor.selectionStart;
+      var endPos = editor.selectionEnd;
+      editor.value = editor.value.substring(0, startPos) + content + editor.value.substring(endPos, editor.value.length);
+    }
+
+    // Fallback, just add to the end of the content.
+    else {
+      editor.value += content;
+    }
+
+    // Ensure the textarea does not unexpectedly scroll.
+    editor.scrollTop = scroll;
+  }
+};
+
+})(jQuery);

+ 424 - 0
sites/all/modules/contrib/files/insert/insert.module

@@ -0,0 +1,424 @@
+<?php
+
+/**
+ * @file
+ * Allows insertion of files, images, and other media directly into the body
+ * field by using an "Insert" button next to the uploaded file.
+ */
+
+// Load default implementations of insert hooks for core modules.
+require dirname(__FILE__) . '/includes/file.inc';
+require dirname(__FILE__) . '/includes/image.inc';
+require dirname(__FILE__) . '/includes/insert.inc';
+
+/**
+ * Implements hook_element_info().
+ */
+function insert_element_info() {
+  $extra = array('#after_build' => array('insert_element_process'));
+
+  $elements = array();
+  foreach (insert_widgets() as $widget_type => $widget) {
+    $element_type = isset($widget['element_type']) ? $widget['element_type'] : $widget_type;
+    $elements[$element_type] = $extra;
+  }
+
+  return $elements;
+}
+
+/**
+ * Implements hook_theme().
+ */
+function insert_theme() {
+  return array(
+    'insert_widget' => array(
+      'render element' => 'element',
+      'template' => 'templates/insert-widget',
+    ),
+    'insert_field_widget_settings_styles' => array(
+      'render element' => 'element',
+    ),
+
+    // Theme functions in includes/insert.inc.
+    'insert_image' => array(
+      'variables' => array('item' => NULL, 'widget' => NULL),
+      'template' => 'templates/insert-image',
+      'file' => 'includes/insert.inc',
+    ),
+    'insert_link' => array(
+      'variables' => array('item' => NULL, 'widget' => NULL),
+      'template' => 'templates/insert-link',
+      'file' => 'includes/insert.inc',
+    ),
+    'insert_icon_link' => array(
+      'variables' => array('item' => NULL, 'widget' => NULL),
+      'template' => 'templates/insert-icon-link',
+      'file' => 'includes/insert.inc',
+    ),
+
+    // Theme functions in includes/image.inc.
+    'image_insert_image' => array(
+      'variables' => array('item' => NULL, 'widget' => NULL, 'style_name' => NULL),
+      'template' => 'templates/image-insert-image',
+      'pattern' => 'image_insert_image__[a-z0-9_]+',
+      'file' => 'includes/image.inc',
+    ),
+  );
+}
+
+/**
+ * Get a list of all supported image styles.
+ */
+function insert_styles($reset = FALSE) {
+  static $styles;
+
+  if (!isset($styles) || $reset) {
+    $styles = array();
+    foreach (module_implements('insert_styles') as $module) {
+      $module_styles = module_invoke($module, 'insert_styles');
+      foreach ($module_styles as $name => $style) {
+        $module_styles[$name]['name'] = $name;
+        $module_styles[$name]['module'] = $module;
+      }
+      $styles = array_merge($styles, $module_styles);
+    }
+    drupal_alter('insert_styles', $styles);
+    uasort($styles, '_insert_style_sort');
+  }
+
+  return $styles;
+}
+
+/**
+ * Sort the styles.
+ */
+function _insert_style_sort($a, $b) {
+  $a = (array)$a + array('weight' => 0, 'label' => '');
+  $b = (array)$b + array('weight' => 0, 'label' => '');
+  return $a['weight'] < $b['weight'] ? -1 : ($a['weight'] > $b['weight'] ? 1 : strnatcasecmp($a['label'], $b['label']));
+}
+
+/**
+ * Load an individual insert style.
+ */
+function insert_style_load($style_name) {
+  $styles = insert_styles();
+  return isset($styles[$style_name]) ? $styles[$style_name] : FALSE;
+}
+
+/**
+ * Get a list of styles suitable for an #options array.
+ */
+function insert_styles_list() {
+  $list = array();
+  foreach (insert_styles() as $name => $style) {
+    $list[$name] = $style['label'];
+  }
+  return $list;
+}
+
+/**
+ * Get a list of all supported field widgets.
+ */
+function insert_widgets($reset = FALSE) {
+  static $widgets;
+
+  if (!isset($widgets) || $reset) {
+    $widgets = array();
+    foreach (module_implements('insert_widgets') as $module) {
+      $module_widgets = module_invoke($module, 'insert_widgets');
+      foreach ($module_widgets as $type => $widget) {
+        $module_widgets[$type]['type'] = $type;
+        $module_widgets[$type]['module'] = $module;
+      }
+      $widgets = array_merge($widgets, $module_widgets);
+    }
+    drupal_alter('insert_widgets', $widgets);
+  }
+
+  return $widgets;
+}
+
+/**
+ * Load a single insert field widget info.
+ */
+function insert_widget_load($widget_type) {
+  $widgets = insert_widgets();
+  return isset($widgets[$widget_type]) ? $widgets[$widget_type] : FALSE;
+}
+
+/**
+ * Given an item and an insert style, return the output.
+ */
+function insert_content($item, $style, $widget) {
+  return module_invoke($style['module'], 'insert_content', $item, $style, $widget);
+}
+
+/**
+ * Process function for insert-enabled fields.
+ */
+function insert_element_process($element) {
+  static $js_added;
+
+  // Bail out early if the needed properties aren't available. This happens
+  // most frequently when editing a field configuration.
+  if (!isset($element['#entity_type'])) {
+    return $element;
+  }
+
+  $item = $element['#value'];
+  $field = field_info_field($element['#field_name']);
+  $instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
+
+  $widget_settings = $instance['widget']['settings'];
+  $widget_type = $instance['widget']['type'];
+
+  // Bail out of Insert is not enabled on this field.
+  if (empty($widget_settings['insert'])) {
+    return $element;
+  }
+
+  // Add base settings only once.
+  if (!isset($js_added)) {
+    $js_added = array();
+    $settings = array('fileDirectoryPath' => file_default_scheme());
+    drupal_add_js(array('insert' => $settings), 'setting');
+    drupal_add_js(drupal_get_path('module', 'insert') . '/insert.js');
+  }
+
+  // Add settings for this widget only once.
+  if (!isset($js_added[$widget_type])) {
+    $js_added[$widget_type] = TRUE;
+    $insert_widget = insert_widget_load($widget_type);
+    $insert_settings = array(
+      'maxWidth' => $widget_settings['insert_width'],
+      'wrapper' => $insert_widget['wrapper'],
+      'fields' => $insert_widget['fields'],
+    );
+    drupal_add_js(array('insert' => array('widgets' => array($widget_type => $insert_settings))), 'setting');
+  }
+
+  // Load the file if it's not entirely loaded.
+  if ($element['fid']['#value'] && !isset($item['filename'])) {
+    if ($loaded_file = file_load($element['fid']['#value'])) {
+      $item = array_merge((array) $loaded_file, $item);
+    }
+  }
+
+  if (isset($item['filename'])) {
+    $insert_styles = !empty($widget_settings['insert_styles']['<all>']) ? drupal_map_assoc(array_keys(insert_styles())) : array_filter((array) $widget_settings['insert_styles']);
+    $default = !empty($instance['widget']['settings']['insert_default']) ? $widget_settings['insert_default'] : 'auto';
+    if (!isset($insert_styles[$default])) {
+      $insert_styles[$default] = $default;
+    }
+    foreach ($insert_styles as $style_name => $enabled) {
+      if ($enabled && ($style = insert_style_load($style_name))) {
+        $element['insert_templates'][$style_name] = array(
+          '#type' => 'hidden',
+          '#value' => insert_content($item, $style, $instance['widget']),
+          '#id' => $element['#id'] . '-insert-template-' . str_replace('_', '-', $style_name),
+          '#name' => $element['#name'] . '[insert_template][' . $style_name . ']',
+          '#attributes' => array('class' => array('insert-template')),
+        );
+        $style_options[$style_name] = $style['label'];
+      }
+
+      // Always provide a file name property.
+      $element['insert_filename'] = array(
+        '#type' => 'hidden',
+        '#value' => $item['filename'],
+        '#id' => $element['#id'] . '-insert-filename',
+        '#name' => $element['#name'] . '[insert_filename]',
+        '#attributes' => array('class' => array('insert-filename')),
+      );
+    }
+
+    $element['insert'] = array(
+      '#theme' => 'insert_widget',
+      '#type' => 'markup',
+      '#options' => $style_options,
+      '#widget' => $instance['widget'],
+      '#weight' => -3,
+      '#default_value' => $default,
+    );
+  }
+
+  return $element;
+}
+
+/**
+ * Implements hook_form_alter().
+ */
+function insert_form_field_ui_field_edit_form_alter(&$form, $form_state) {
+  $instance = $form['#instance'];
+  if (array_key_exists($instance['widget']['type'], insert_widgets())) {
+    $field = $form['#field'];
+    if (empty($form['instance']['settings'])) {
+      $form['instance']['settings'] = array();
+    }
+    $form['instance']['settings'] += insert_field_widget_settings_form($field, $instance);
+  }
+}
+
+/**
+ * Implements hook_field_widget_info_alter().
+ *
+ * A list of settings needed by Insert module on widgets.
+ */
+function insert_field_widget_info_alter(&$info) {
+  $settings = array(
+    'insert' => 0,
+    'insert_absolute' => variable_get('insert_absolute_paths', FALSE),
+    'insert_styles' => array('auto'),
+    'insert_default' => array('auto'),
+    'insert_class' => '',
+    'insert_width' => '',
+  );
+
+  foreach (insert_widgets() as $widget_type => $widget) {
+    if (isset($info[$widget_type]['settings'])) {
+      $info[$widget_type]['settings'] += $settings;
+    }
+  }
+}
+
+/**
+ * Configuration form for editing insert settings for a field instance.
+ */
+function insert_field_widget_settings_form($field, $instance) {
+  $widget = $instance['widget'];
+  $settings = $widget['settings'];
+
+  $form['insert'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Insert'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('These options allow the user to easily insert an HTML tags into text areas or WYSIWYG editors after uploading a file or image. The "Automatic" style will insert a &lt;img&gt; tag for images and a &lt;a&gt; tag for other files. Other styles may insert tags that may not match the file type.'),
+    '#weight' => 20,
+    '#parents' => array('instance', 'widget', 'settings'),
+  );
+
+  $form['insert']['insert'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable insert button'),
+    '#default_value' => $settings['insert'],
+    '#description' => t('Enable the insert button and options for this widget.'),
+    '#weight' => -10,
+  );
+
+  $form['insert']['insert_absolute'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use absolute paths'),
+    '#default_value' => isset($settings['insert_absolute']) ? $settings['insert_absolute'] : variable_get('insert_absolute_paths', FALSE),
+    '#description' => t('Includes the full URL prefix "@base_url" in all links and image tags.', array('@base_url' => $GLOBALS['base_url'])),
+    '#weight' => -9,
+  );
+
+  $form['insert']['insert_styles'] = array(
+    '#title' => t('Enabled insert styles'),
+    '#type' => 'checkboxes',
+    '#options' => insert_styles_list(),
+    '#default_value' => !empty($settings['insert_styles']['<all>']) ? array_keys(insert_styles_list()) : $settings['insert_styles'],
+    '#description' => t('Select which styles should be available when sending items to text areas. If no styles are selected, the option to use a style is not displayed. If all styles are selected, new styles will be enabled by default.'),
+    '#element_validate' => array('insert_field_widget_settings_styles_validate'),
+    '#theme' => 'insert_field_widget_settings_styles',
+    '#weight' => 0,
+  );
+
+  $form['insert']['insert_default'] = array(
+    '#title' => t('Default insert style'),
+    '#type' => 'select',
+    '#options' => insert_styles_list(),
+    '#default_value' => $settings['insert_default'],
+    '#description' => t('Select the default style which will be selected by default or used if no specific styles above are enabled.'),
+    '#weight' => 1,
+  );
+
+  $form['insert']['insert_class'] = array(
+    '#title' => t('Additional CSS classes'),
+    '#type' => 'textfield',
+    '#default_value' => $settings['insert_class'],
+    '#description' => t('Add any classes that should be added to the item on output.'),
+    '#weight' => 5,
+  );
+
+  $form['insert']['insert_width'] = array(
+    '#title' => t('Maximum image insert width'),
+    '#type' => 'textfield',
+    '#size' => 10,
+    '#field_suffix' => ' '. t('pixels'),
+    '#default_value' => $settings['insert_width'],
+    '#description' => t('When inserting images, the height and width of images may be scaled down to fit within the specified width. Note that this does not resize the image, it only affects the HTML output. To resize images it is recommended to install the <a href="http://drupal.org/project/image_resize_filter">Image Resize Filter</a> module.'),
+    '#weight' => 10,
+  );
+
+  return $form;
+}
+
+/**
+ * An #element_validate function for the styles list on the settings form.
+ */
+function insert_field_widget_settings_styles_validate($element, &$form_state) {
+  if (array_values($element['#value']) == array_keys($element['#options'])) {
+    form_set_value($element, array('<all>' => '<all>'), $form_state);
+  }
+}
+
+/**
+ * Theme the output of the styles list on the settings form.
+ */
+function theme_insert_field_widget_settings_styles($variables) {
+  $element = $variables['element'];
+  drupal_add_js('misc/tableselect.js');
+
+  $header = array(
+    array('class' => array('select-all'), 'data' => ' ' . t('Select all')),
+  );
+
+  $rows = array();
+  foreach ($element['#options'] as $key => $label) {
+    $row = array();
+    $row[] = drupal_render($element[$key]);
+    $rows[] = $row;
+  }
+  return theme('table', array('header' => $header, 'rows' => $rows));
+}
+
+/**
+ * Utility function to create a URL for Insert.
+ *
+ * This is modeled after file_create_url(), but with the modification that it
+ * will consistently use absolute or relative URLs, depending on the Insert
+ * setting.
+ */
+function insert_create_url($uri, $absolute = NULL, $clean_urls = TRUE) {
+  $absolute = isset($absolute) ? $absolute : variable_get('insert_absolute_paths', FALSE);
+
+  // If not using clean URLs, the image derivative callback is only available
+  // with the query string. Always use the non-clean URL in the event that the
+  // image cache is flushed and needs to be regenerated. See image_style_url().
+  if (!$clean_urls && file_uri_scheme($uri) == 'public') {
+    $directory_path = file_stream_wrapper_get_instance_by_uri($uri)->getDirectoryPath();
+    $url = url($directory_path . '/' . file_uri_target($uri), array('absolute' => TRUE));
+  }
+  else {
+    $url = file_create_url($uri);
+  }
+
+  if (!$absolute && strpos($url, $GLOBALS['base_url']) === 0) {
+    $url = base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
+  }
+  return $url;
+}
+
+/**
+ * Preprocess variables for the insert-widget.tpl.php file.
+ */
+function template_preprocess_insert_widget(&$vars) {
+  $element = $vars['element'];
+
+  $vars['insert_styles'] = $element['#options'];
+  $vars['default_style'] = $element['#default_value'];
+  $vars['widget_type'] = $element['#widget']['type'];
+}

+ 28 - 0
sites/all/modules/contrib/files/insert/templates/image-insert-image.tpl.php

@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Template file for Image module content inserted via the Insert module.
+ *
+ * Available variables:
+ * - $item: The complete item being inserted.
+ * - $url: The URL to the image.
+ * - $class: A set of classes assigned to this image (if any).
+ * - $width: The width of the image (if known).
+ * - $height: The height of the image (if known).
+ * - $style_name: The Image style being used.
+ *
+ * Note that ALT and Title fields should not be filled in here, instead they
+ * should use placeholders that will be updated through JavaScript when the
+ * image is inserted.
+ *
+ * Available placeholders:
+ * - __alt__: The ALT text, intended for use in the <img> tag.
+ * - __title__: The Title text, intended for use in the <img> tag.
+ * - __description__: A description of the image, sometimes used as a caption.
+ * - __filename__: The file name.
+ * - __[token]_or_filename__: Any of the above tokens if available, otherwise
+ *   use the file's name. i.e. __title_or_filename__.
+ */
+?>
+<img src="<?php print $url ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php endif; ?>alt="__alt__" title="__title__" class="image-<?php print $style_name ?><?php print $class ? ' ' . $class : '' ?>" />

+ 24 - 0
sites/all/modules/contrib/files/insert/templates/insert-icon-link.tpl.php

@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Template file for generic links inserted via the Insert module.
+ *
+ * Available variables:
+ * - $item: The complete item being inserted.
+ * - $url: The URL to the item.
+ * - $class: A set of classes assigned to this item (if any).
+ * - $name: The file name of the item being inserted.
+ *
+ * Modules may provide placeholders that will be replaced by user-entered values
+ * when the item is inserted into a textarea. Generic links only support one
+ * placeholder.
+ *
+ * Available placeholders:
+ * - __description__: A description of the item.
+ * - __filename__: The file name.
+ * - __description_or_filename__: A description of the item if available,
+ *   otherwise use the file name.
+ */
+?>
+<span class="file"><?php print $icon; ?> <a href="<?php print $url ?>"<?php print $class ? ' class="' . $class . '"' : '' ?> title="__description__">__description_or_filename__</a></span>

+ 27 - 0
sites/all/modules/contrib/files/insert/templates/insert-image.tpl.php

@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @file
+ * Template file for generic images inserted via the Insert module.
+ *
+ * Available variables:
+ * - $item: The complete item being inserted.
+ * - $url: The URL to the image.
+ * - $class: A set of classes assigned to this image (if any).
+ * - $width: The width of the image.
+ * - $height: The height of the image.
+ *
+ * Note that ALT and Title fields should not be filled in here, instead they
+ * should use placeholders that will be updated through JavaScript when the
+ * image is inserted.
+ *
+ * Available placeholders:
+ * - __alt__: The ALT text, intended for use in the <img> tag.
+ * - __title__: The Title text, intended for use in the <img> tag.
+ * - __description__: A description of the image, sometimes used as a caption.
+ * - __filename__: The file name.
+ * - __[token]_or_filename__: Any of the above tokens if available, otherwise
+ *   use the file's name. i.e. __title_or_filename__.
+ */
+?>
+<img src="<?php print $url ?>" width="<?php print $width ?>" height="<?php print $height ?>" alt="__alt__" title="__title__" <?php print $class ? 'class="' . $class . '" ' : '' ?>/>

+ 24 - 0
sites/all/modules/contrib/files/insert/templates/insert-link.tpl.php

@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Template file for generic links inserted via the Insert module.
+ *
+ * Available variables:
+ * - $item: The complete item being inserted.
+ * - $url: The URL to the item.
+ * - $class: A set of classes assigned to this item (if any).
+ * - $name: The file name of the item being inserted.
+ *
+ * Modules may provide placeholders that will be replaced by user-entered values
+ * when the item is inserted into a textarea. Generic links only support one
+ * placeholder.
+ *
+ * Available placeholders:
+ * - __description__: A description of the item.
+ * - __filename__: The file name.
+ * - __description_or_filename__: A description of the item if available,
+ *   otherwise use the file name.
+ */
+?>
+<a href="<?php print $url ?>"<?php print $class ? ' class="' . $class . '"' : '' ?> title="__description__">__description_or_filename__</a>

+ 30 - 0
sites/all/modules/contrib/files/insert/templates/insert-widget.tpl.php

@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Template file for the insert button.
+ *
+ * This button can have any appearance you like or even be a link, but must
+ * include the class "insert-button", to which the insert JavaScript will be
+ * attached.
+ */
+?>
+<?php if (count($insert_styles) > 1): ?>
+  <div class="insert form-item container-inline inline">
+    <div class="insert-style-select">
+      <label><?php print t('Style') ?>:</label>
+      <select class="insert-style">
+        <?php foreach ($insert_styles as $value => $style): ?>
+          <option value="<?php print $value ?>"<?php print ($value == $default_style) ? 'selected="selected"' : '' ?>><?php print $style ?></option>
+        <?php endforeach; ?>
+      </select>
+    </div>
+<?php else: ?>
+  <input type="hidden" class="insert-style" value="<?php print $default_style ?>" />
+<?php endif; ?>
+
+  <input type="submit" rel="<?php print $widget_type ?>" class="form-submit insert-button" onclick="return false;" value="<?php print t('Insert'); ?>" />
+
+<?php if (count($insert_styles) > 1): ?>
+  </div>
+<?php endif; ?>

+ 5 - 5
sites/all/modules/features/admin/admin.features.inc

@@ -43,11 +43,11 @@ function admin_default_Workflow() {
     "label" : "Publication",
     "typeMap" : [ "documentair", "episode", "page", "thematique" ],
     "system_roles" : {
-      "-1" : "(author)",
-      "1" : "anonymous user",
-      "2" : "authenticated user",
-      "3" : "administrator",
-      "4" : "root"
+      "-1" : "(auteur)",
+      "1" : "utilisateur anonyme",
+      "2" : "utilisateur authentifi\\u00e9",
+      "3" : "administrateur",
+      "4" : "racine"
     }
   }');
 

+ 17 - 12
sites/all/modules/features/admin/admin.features.menu_links.inc

@@ -28,6 +28,7 @@ function admin_menu_default_menu_links() {
     'customized' => 1,
     'language' => 'und',
     'menu_links_customized' => 1,
+    'parent_identifier' => 'navigation_contenu:admin/content/nodes',
   );
   // Exported menu link: navigation_compose-tips:filter/tips.
   $menu_links['navigation_compose-tips:filter/tips'] = array(
@@ -106,10 +107,11 @@ function admin_menu_default_menu_links() {
     'external' => 0,
     'has_children' => 0,
     'expanded' => 0,
-    'weight' => 0,
-    'customized' => 0,
+    'weight' => -49,
+    'customized' => 1,
     'language' => 'und',
-    'menu_links_customized' => 0,
+    'menu_links_customized' => 1,
+    'parent_identifier' => 'navigation_ajouter-du-contenu:node/add',
   );
   // Exported menu link: navigation_log-out:user/logout.
   $menu_links['navigation_log-out:user/logout'] = array(
@@ -173,10 +175,11 @@ function admin_menu_default_menu_links() {
     'external' => 0,
     'has_children' => 0,
     'expanded' => 0,
-    'weight' => 0,
-    'customized' => 0,
+    'weight' => -47,
+    'customized' => 1,
     'language' => 'und',
-    'menu_links_customized' => 0,
+    'menu_links_customized' => 1,
+    'parent_identifier' => 'navigation_ajouter-du-contenu:node/add',
   );
   // Exported menu link: navigation_pisode:node/add/episode.
   $menu_links['navigation_pisode:node/add/episode'] = array(
@@ -192,10 +195,11 @@ function admin_menu_default_menu_links() {
     'external' => 0,
     'has_children' => 0,
     'expanded' => 0,
-    'weight' => 0,
-    'customized' => 0,
+    'weight' => -48,
+    'customized' => 1,
     'language' => 'und',
-    'menu_links_customized' => 0,
+    'menu_links_customized' => 1,
+    'parent_identifier' => 'navigation_ajouter-du-contenu:node/add',
   );
   // Exported menu link: navigation_thematique:node/add/thematique.
   $menu_links['navigation_thematique:node/add/thematique'] = array(
@@ -211,10 +215,11 @@ function admin_menu_default_menu_links() {
     'external' => 0,
     'has_children' => 0,
     'expanded' => 0,
-    'weight' => 0,
-    'customized' => 0,
+    'weight' => -50,
+    'customized' => 1,
     'language' => 'und',
-    'menu_links_customized' => 0,
+    'menu_links_customized' => 1,
+    'parent_identifier' => 'navigation_ajouter-du-contenu:node/add',
   );
   // Exported menu link: navigation_user-account:user.
   $menu_links['navigation_user-account:user'] = array(

+ 32 - 33
sites/all/modules/features/admin/admin.views_default.inc

@@ -165,11 +165,11 @@ function admin_views_default_views() {
     ),
   );
   $handler->display->display_options['style_options']['override'] = FALSE;
-  /* Header: Global: Result summary */
+  /* En-tête: Global : Result summary */
   $handler->display->display_options['header']['result']['id'] = 'result';
   $handler->display->display_options['header']['result']['table'] = 'views';
   $handler->display->display_options['header']['result']['field'] = 'result';
-  /* Field: Bulk operations: Content */
+  /* Champ: Opérations en masse : Contenu */
   $handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
   $handler->display->display_options['fields']['views_bulk_operations']['table'] = 'node';
   $handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
@@ -203,7 +203,7 @@ function admin_views_default_views() {
       'label' => '',
     ),
   );
-  /* Field: Content: Video */
+  /* Champ: Contenu : Video */
   $handler->display->display_options['fields']['field_emvideo']['id'] = 'field_emvideo';
   $handler->display->display_options['fields']['field_emvideo']['table'] = 'field_data_field_emvideo';
   $handler->display->display_options['fields']['field_emvideo']['field'] = 'field_emvideo';
@@ -213,19 +213,19 @@ function admin_views_default_views() {
     'image_style' => 'thumbnail',
     'image_link' => '',
   );
-  /* Field: Content: Type */
+  /* Champ: Contenu : Type */
   $handler->display->display_options['fields']['type']['id'] = 'type';
   $handler->display->display_options['fields']['type']['table'] = 'node';
   $handler->display->display_options['fields']['type']['field'] = 'type';
   $handler->display->display_options['fields']['type']['hide_alter_empty'] = FALSE;
-  /* Field: Content: Title */
+  /* Champ: Contenu : Titre */
   $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']['alter']['word_boundary'] = FALSE;
   $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
   $handler->display->display_options['fields']['title']['hide_alter_empty'] = FALSE;
-  /* Field: Content: Poid */
+  /* Champ: Contenu : Poid */
   $handler->display->display_options['fields']['field_poid']['id'] = 'field_poid';
   $handler->display->display_options['fields']['field_poid']['table'] = 'field_data_field_poid';
   $handler->display->display_options['fields']['field_poid']['field'] = 'field_poid';
@@ -233,7 +233,7 @@ function admin_views_default_views() {
     'thousand_separator' => '',
     'prefix_suffix' => 1,
   );
-  /* Field: Content: Edit link */
+  /* Champ: Contenu : Lien de modification */
   $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
   $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
   $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
@@ -242,12 +242,12 @@ function admin_views_default_views() {
   $handler->display->display_options['fields']['edit_node']['alter']['text'] = '<span class="node-edit">[edit_node]</span>';
   $handler->display->display_options['fields']['edit_node']['element_label_colon'] = FALSE;
   $handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = FALSE;
-  /* Field: Workflow node: Current state ID */
+  /* Champ: Workflow node : Current state ID */
   $handler->display->display_options['fields']['sid']['id'] = 'sid';
   $handler->display->display_options['fields']['sid']['table'] = 'workflow_node';
   $handler->display->display_options['fields']['sid']['field'] = 'sid';
   $handler->display->display_options['fields']['sid']['label'] = 'Current state';
-  /* Field: Workflow scheduled: Scheduled state Name */
+  /* Champ: Workflow scheduled : Scheduled state Name */
   $handler->display->display_options['fields']['sid_1']['id'] = 'sid_1';
   $handler->display->display_options['fields']['sid_1']['table'] = 'workflow_scheduled_transition';
   $handler->display->display_options['fields']['sid_1']['field'] = 'sid';
@@ -255,7 +255,7 @@ function admin_views_default_views() {
   $handler->display->display_options['fields']['sid_1']['exclude'] = TRUE;
   $handler->display->display_options['fields']['sid_1']['alter']['text'] = '[sid_1] : [scheduled]';
   $handler->display->display_options['fields']['sid_1']['hide_empty'] = TRUE;
-  /* Field: Workflow scheduled: Scheduled time */
+  /* Champ: Workflow scheduled : Scheduled time */
   $handler->display->display_options['fields']['scheduled']['id'] = 'scheduled';
   $handler->display->display_options['fields']['scheduled']['table'] = 'workflow_scheduled_transition';
   $handler->display->display_options['fields']['scheduled']['field'] = 'scheduled';
@@ -266,7 +266,7 @@ function admin_views_default_views() {
   $handler->display->display_options['fields']['scheduled']['date_format'] = 'custom';
   $handler->display->display_options['fields']['scheduled']['custom_date_format'] = 'd/m/Y h:m';
   $handler->display->display_options['fields']['scheduled']['second_date_format'] = 'long';
-  /* Field: Content: Épisodes */
+  /* Champ: Contenu : Épisodes */
   $handler->display->display_options['fields']['field_episodes']['id'] = 'field_episodes';
   $handler->display->display_options['fields']['field_episodes']['table'] = 'field_data_field_episodes';
   $handler->display->display_options['fields']['field_episodes']['field'] = 'field_episodes';
@@ -275,7 +275,7 @@ function admin_views_default_views() {
   );
   $handler->display->display_options['fields']['field_episodes']['delta_offset'] = '0';
   $handler->display->display_options['fields']['field_episodes']['multi_type'] = 'ol';
-  /* Field: Content: éclairages */
+  /* Champ: Contenu : éclairages */
   $handler->display->display_options['fields']['field_eclairages']['id'] = 'field_eclairages';
   $handler->display->display_options['fields']['field_eclairages']['table'] = 'field_data_field_eclairages';
   $handler->display->display_options['fields']['field_eclairages']['field'] = 'field_eclairages';
@@ -284,14 +284,14 @@ function admin_views_default_views() {
   );
   $handler->display->display_options['fields']['field_eclairages']['delta_offset'] = '0';
   $handler->display->display_options['fields']['field_eclairages']['multi_type'] = 'ol';
-  /* Field: Content: Thématique */
+  /* Champ: Contenu : Thématique */
   $handler->display->display_options['fields']['field_thematique']['id'] = 'field_thematique';
   $handler->display->display_options['fields']['field_thematique']['table'] = 'field_data_field_thematique';
   $handler->display->display_options['fields']['field_thematique']['field'] = 'field_thematique';
   $handler->display->display_options['fields']['field_thematique']['settings'] = array(
     'link' => 1,
   );
-  /* Field: Content translation: Translate link */
+  /* Champ: Traduction du contenu : Lien de traduction */
   $handler->display->display_options['fields']['translate_node']['id'] = 'translate_node';
   $handler->display->display_options['fields']['translate_node']['table'] = 'node';
   $handler->display->display_options['fields']['translate_node']['field'] = 'translate_node';
@@ -299,12 +299,12 @@ function admin_views_default_views() {
   $handler->display->display_options['fields']['translate_node']['alter']['text'] = '<span class="button">[translate_node]</span>';
   $handler->display->display_options['fields']['translate_node']['hide_empty'] = TRUE;
   $handler->display->display_options['fields']['translate_node']['text'] = 'traduire';
-  /* Field: Content: Updated date */
+  /* Champ: Contenu : Date de mise à jour */
   $handler->display->display_options['fields']['changed']['id'] = 'changed';
   $handler->display->display_options['fields']['changed']['table'] = 'node';
   $handler->display->display_options['fields']['changed']['field'] = 'changed';
   $handler->display->display_options['fields']['changed']['date_format'] = 'short';
-  /* Field: Content: Delete link */
+  /* Champ: Contenu : Lien de suppression */
   $handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
   $handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
   $handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
@@ -317,7 +317,7 @@ function admin_views_default_views() {
     1 => 'AND',
     2 => 'AND',
   );
-  /* Filter criterion: Content: Type */
+  /* Critère de filtrage: Contenu : 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';
@@ -341,7 +341,7 @@ function admin_views_default_views() {
     4 => 0,
   );
   $handler->display->display_options['filters']['type']['expose']['reduce'] = TRUE;
-  /* Filter criterion: current user can update */
+  /* Critère de filtrage: current user can update */
   $handler->display->display_options['filters']['php']['id'] = 'php';
   $handler->display->display_options['filters']['php']['table'] = 'views';
   $handler->display->display_options['filters']['php']['field'] = 'php';
@@ -352,7 +352,7 @@ function admin_views_default_views() {
 //dsm($data);
 return !(node_access(\'update\', node_load($data->nid), $user));
 ';
-  /* Filter criterion: Workflow node: Current state ID */
+  /* Critère de filtrage: Workflow node : Current state ID */
   $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';
@@ -402,19 +402,19 @@ return !(node_access(\'update\', node_load($data->nid), $user));
   $handler->display->display_options['pager']['options']['items_per_page'] = '10';
   $handler->display->display_options['pager']['options']['offset'] = '0';
   $handler->display->display_options['defaults']['fields'] = FALSE;
-  /* Field: Content: Type */
+  /* Champ: Contenu : Type */
   $handler->display->display_options['fields']['type']['id'] = 'type';
   $handler->display->display_options['fields']['type']['table'] = 'node';
   $handler->display->display_options['fields']['type']['field'] = 'type';
   $handler->display->display_options['fields']['type']['hide_alter_empty'] = FALSE;
-  /* Field: Content: Title */
+  /* Champ: Contenu : Titre */
   $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']['alter']['word_boundary'] = FALSE;
   $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
   $handler->display->display_options['fields']['title']['hide_alter_empty'] = FALSE;
-  /* Field: Content: Edit link */
+  /* Champ: Contenu : Lien de modification */
   $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
   $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
   $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
@@ -422,20 +422,20 @@ return !(node_access(\'update\', node_load($data->nid), $user));
   $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = TRUE;
   $handler->display->display_options['fields']['edit_node']['alter']['text'] = '<span class="node-edit">[edit_node]</span>';
   $handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = FALSE;
-  /* Field: Content: Published */
+  /* Champ: Contenu : Publié */
   $handler->display->display_options['fields']['status']['id'] = 'status';
   $handler->display->display_options['fields']['status']['table'] = 'node';
   $handler->display->display_options['fields']['status']['field'] = 'status';
   $handler->display->display_options['fields']['status']['element_label_colon'] = FALSE;
   $handler->display->display_options['fields']['status']['hide_alter_empty'] = FALSE;
   $handler->display->display_options['fields']['status']['not'] = 0;
-  /* Field: Content: Language */
+  /* Champ: Contenu : Langue */
   $handler->display->display_options['fields']['language']['id'] = 'language';
   $handler->display->display_options['fields']['language']['table'] = 'node';
   $handler->display->display_options['fields']['language']['field'] = 'language';
   $handler->display->display_options['fields']['language']['element_label_colon'] = FALSE;
   $handler->display->display_options['fields']['language']['hide_alter_empty'] = FALSE;
-  /* Field: Content translation: Translate link */
+  /* Champ: Traduction du contenu : Lien de traduction */
   $handler->display->display_options['fields']['translate_node']['id'] = 'translate_node';
   $handler->display->display_options['fields']['translate_node']['table'] = 'node';
   $handler->display->display_options['fields']['translate_node']['field'] = 'translate_node';
@@ -459,10 +459,10 @@ return !(node_access(\'update\', node_load($data->nid), $user));
     t('suivant ›'),
     t('dernier »'),
     t('Displaying @start - @end of @total'),
-    t('- Choose an operation -'),
+    t('- Choisir une opération -'),
     t('Video'),
     t('Type'),
-    t('Title'),
+    t('Titre'),
     t('Poid'),
     t('<span class="node-edit">[edit_node]</span>'),
     t('Current state'),
@@ -472,20 +472,19 @@ return !(node_access(\'update\', node_load($data->nid), $user));
     t('Épisodes'),
     t('éclairages'),
     t('Thématique'),
-    t('Translate link'),
+    t('Lien de traduction'),
     t('<span class="button">[translate_node]</span>'),
     t('traduire'),
-    t('Updated date'),
-    t('Delete link'),
+    t('Date de mise à jour'),
+    t('Lien de suppression'),
     t('<span class="node-delete">[delete_node]</span>'),
     t('supprimer'),
     t('Page : all'),
-    t('more'),
     t('Block'),
     t('Recent Content'),
     t('Modifier'),
-    t('Published'),
-    t('Language'),
+    t('Publié'),
+    t('Langue'),
     t('Traduire'),
   );
   $export['admin_contents'] = $view;

+ 5 - 5
sites/all/modules/features/clameurs/clameurs.features.fe_block_settings.inc

@@ -12,12 +12,12 @@ function clameurs_default_fe_block_settings() {
 
   $export['version'] = '2.0';
 
-  $export['clameursmod-thematiques-anchor-links'] = array(
+  $export['menu-menu-footer-menu'] = array(
     'cache' => -1,
     'custom' => 0,
-    'delta' => 'thematiques-anchor-links',
+    'delta' => 'menu-footer-menu',
     'i18n_mode' => 0,
-    'module' => 'clameursmod',
+    'module' => 'menu',
     'node_types' => array(),
     'pages' => '',
     'roles' => array(),
@@ -29,8 +29,8 @@ function clameurs_default_fe_block_settings() {
         'weight' => 0,
       ),
       'clameurs' => array(
-        'region' => '',
-        'status' => 0,
+        'region' => 'footer_top',
+        'status' => 1,
         'theme' => 'clameurs',
         'weight' => 0,
       ),

+ 26 - 0
sites/all/modules/features/clameurs/clameurs.features.menu_custom.inc

@@ -0,0 +1,26 @@
+<?php
+/**
+ * @file
+ * clameurs.features.menu_custom.inc
+ */
+
+/**
+ * Implements hook_menu_default_menu_custom().
+ */
+function clameurs_menu_default_menu_custom() {
+  $menus = array();
+
+  // Exported menu: menu-footer-menu.
+  $menus['menu-footer-menu'] = array(
+    'menu_name' => 'menu-footer-menu',
+    'title' => 'Footer menu',
+    'description' => '',
+    'language' => 'und',
+    'i18n_mode' => 0,
+  );
+  // Translatables
+  // Included for use with string extractors like potx.
+  t('Footer menu');
+
+  return $menus;
+}

+ 87 - 0
sites/all/modules/features/clameurs/clameurs.features.menu_links.inc

@@ -0,0 +1,87 @@
+<?php
+/**
+ * @file
+ * clameurs.features.menu_links.inc
+ */
+
+/**
+ * Implements hook_menu_default_menu_links().
+ */
+function clameurs_menu_default_menu_links() {
+  $menu_links = array();
+
+  // Exported menu link: menu-footer-menu_contact:node/64.
+  $menu_links['menu-footer-menu_contact:node/64'] = array(
+    'menu_name' => 'menu-footer-menu',
+    'link_path' => 'node/64',
+    'router_path' => 'node/%',
+    'link_title' => 'Contact',
+    'options' => array(
+      'attributes' => array(
+        'title' => '',
+      ),
+      'identifier' => 'menu-footer-menu_contact:node/64',
+    ),
+    'module' => 'menu',
+    'hidden' => 0,
+    'external' => 0,
+    'has_children' => 0,
+    'expanded' => 0,
+    'weight' => -49,
+    'customized' => 1,
+    'language' => 'und',
+    'menu_links_customized' => 1,
+  );
+  // Exported menu link: menu-footer-menu_crdits:node/1.
+  $menu_links['menu-footer-menu_crdits:node/1'] = array(
+    'menu_name' => 'menu-footer-menu',
+    'link_path' => 'node/1',
+    'router_path' => 'node/%',
+    'link_title' => 'Crédits',
+    'options' => array(
+      'attributes' => array(
+        'title' => '',
+      ),
+      'identifier' => 'menu-footer-menu_crdits:node/1',
+    ),
+    'module' => 'menu',
+    'hidden' => 0,
+    'external' => 0,
+    'has_children' => 0,
+    'expanded' => 0,
+    'weight' => -48,
+    'customized' => 1,
+    'language' => 'und',
+    'menu_links_customized' => 1,
+  );
+  // Exported menu link: menu-footer-menu_partenaires:node/62.
+  $menu_links['menu-footer-menu_partenaires:node/62'] = array(
+    'menu_name' => 'menu-footer-menu',
+    'link_path' => 'node/62',
+    'router_path' => 'node/%',
+    'link_title' => 'Partenaires',
+    'options' => array(
+      'attributes' => array(
+        'title' => '',
+      ),
+      'identifier' => 'menu-footer-menu_partenaires:node/62',
+    ),
+    'module' => 'menu',
+    'hidden' => 0,
+    'external' => 0,
+    'has_children' => 0,
+    'expanded' => 0,
+    'weight' => -50,
+    'customized' => 1,
+    'language' => 'und',
+    'menu_links_customized' => 1,
+  );
+
+  // Translatables
+  // Included for use with string extractors like potx.
+  t('Contact');
+  t('Crédits');
+  t('Partenaires');
+
+  return $menu_links;
+}

+ 6 - 1
sites/all/modules/features/clameurs/clameurs.info

@@ -21,6 +21,7 @@ dependencies[] = imagecache_canvasactions
 dependencies[] = libraries
 dependencies[] = list
 dependencies[] = login_destination
+dependencies[] = menu
 dependencies[] = node
 dependencies[] = nodeformcols
 dependencies[] = number
@@ -52,7 +53,7 @@ features[ctools][] = page_manager:pages_default:1
 features[ctools][] = panels_mini:panels_default:1
 features[ctools][] = strongarm:strongarm:1
 features[ctools][] = video_embed_field:default_video_embed_styles:1
-features[fe_block_settings][] = clameursmod-thematiques-anchor-links
+features[fe_block_settings][] = menu-menu-footer-menu
 features[features_api][] = api:2
 features[field_base][] = cer_bidirectional
 features[field_base][] = cer_enabled
@@ -121,6 +122,10 @@ features[field_instance][] = node-thematique-field_poid
 features[image][] = video_thumb_docu
 features[image][] = video_thumb_episode
 features[image][] = video_thumb_themat
+features[menu_custom][] = menu-footer-menu
+features[menu_links][] = menu-footer-menu_contact:node/64
+features[menu_links][] = menu-footer-menu_crdits:node/1
+features[menu_links][] = menu-footer-menu_partenaires:node/62
 features[node][] = documentair
 features[node][] = episode
 features[node][] = thematique

+ 28 - 0
sites/all/modules/features/page/page.features.field_base.inc

@@ -33,5 +33,33 @@ function page_field_default_field_bases() {
     'type' => 'text_with_summary',
   );
 
+  // Exported field_base: 'field_images'.
+  $field_bases['field_images'] = array(
+    'active' => 1,
+    'cardinality' => -1,
+    'deleted' => 0,
+    'entity_types' => array(),
+    'field_name' => 'field_images',
+    'field_permissions' => array(
+      'type' => 0,
+    ),
+    'indexes' => array(
+      'fid' => array(
+        0 => 'fid',
+      ),
+    ),
+    'locked' => 0,
+    'module' => 'image',
+    'settings' => array(
+      'default_image' => 0,
+      'entity_translation_sync' => array(
+        0 => 'fid',
+      ),
+      'uri_scheme' => 'public',
+    ),
+    'translatable' => 0,
+    'type' => 'image',
+  );
+
   return $field_bases;
 }

+ 78 - 1
sites/all/modules/features/page/page.features.field_instance.inc

@@ -57,13 +57,90 @@ function page_field_default_field_instances() {
         'summary_rows' => 5,
       ),
       'type' => 'text_textarea_with_summary',
-      'weight' => -4,
+      'weight' => 1,
+    ),
+  );
+
+  // Exported field_instance: 'node-page-field_images'.
+  $field_instances['node-page-field_images'] = array(
+    'bundle' => 'page',
+    'deleted' => 0,
+    'description' => '',
+    'display' => array(
+      'accueil' => array(
+        'label' => 'above',
+        'settings' => array(),
+        'type' => 'hidden',
+        'weight' => 0,
+      ),
+      'default' => array(
+        'label' => 'above',
+        'module' => 'image',
+        'settings' => array(
+          'image_link' => '',
+          'image_style' => '',
+        ),
+        'type' => 'image',
+        'weight' => 1,
+      ),
+      'teaser' => array(
+        'label' => 'above',
+        'settings' => array(),
+        'type' => 'hidden',
+        'weight' => 0,
+      ),
+    ),
+    'entity_type' => 'node',
+    'field_name' => 'field_images',
+    'label' => 'images',
+    'required' => 0,
+    'settings' => array(
+      'alt_field' => 0,
+      'default_image' => 0,
+      'entity_translation_sync' => FALSE,
+      'file_directory' => '',
+      'file_extensions' => 'png gif jpg jpeg',
+      'max_filesize' => '',
+      'max_resolution' => '',
+      'min_resolution' => '',
+      'title_field' => 0,
+      'user_register_form' => FALSE,
+    ),
+    'widget' => array(
+      'active' => 1,
+      'module' => 'image',
+      'settings' => array(
+        'insert' => 1,
+        'insert_absolute' => 0,
+        'insert_class' => '',
+        'insert_default' => 'auto',
+        'insert_styles' => array(
+          'auto' => 'auto',
+          'icon_link' => 0,
+          'image' => 0,
+          'image_large' => 0,
+          'image_linkit_thumb' => 0,
+          'image_medium' => 0,
+          'image_thumbnail' => 0,
+          'image_video_thumb_docu' => 0,
+          'image_video_thumb_episode' => 0,
+          'image_video_thumb_themat' => 0,
+          'image_video_thumbnail' => 0,
+          'link' => 0,
+        ),
+        'insert_width' => '',
+        'preview_image_style' => 'thumbnail',
+        'progress_indicator' => 'throbber',
+      ),
+      'type' => 'image_image',
+      'weight' => 2,
     ),
   );
 
   // Translatables
   // Included for use with string extractors like potx.
   t('Body');
+  t('images');
 
   return $field_instances;
 }

+ 5 - 0
sites/all/modules/features/page/page.info

@@ -3,13 +3,17 @@ core = 7.x
 package = FigLi
 dependencies[] = ctools
 dependencies[] = features
+dependencies[] = image
+dependencies[] = insert
 dependencies[] = node
 dependencies[] = strongarm
 dependencies[] = text
 features[ctools][] = strongarm:strongarm:1
 features[features_api][] = api:2
 features[field_base][] = body
+features[field_base][] = field_images
 features[field_instance][] = node-page-body
+features[field_instance][] = node-page-field_images
 features[node][] = page
 features[user_permission][] = create page content
 features[user_permission][] = delete any page content
@@ -18,6 +22,7 @@ features[user_permission][] = edit any page content
 features[user_permission][] = edit own page content
 features[variable][] = additional_settings__active_tab_page
 features[variable][] = devel_redirect_page
+features[variable][] = field_bundle_settings_node__page
 features[variable][] = menu_options_page
 features[variable][] = menu_parent_page
 features[variable][] = node_options_page

+ 26 - 0
sites/all/modules/features/page/page.strongarm.inc

@@ -24,6 +24,32 @@ function page_strongarm() {
   $strongarm->value = 0;
   $export['devel_redirect_page'] = $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__page';
+  $strongarm->value = array(
+    'view_modes' => array(),
+    'extra_fields' => array(
+      'form' => array(
+        'title' => array(
+          'weight' => '0',
+        ),
+        'path' => array(
+          'weight' => '3',
+        ),
+        'redirect' => array(
+          'weight' => '4',
+        ),
+        'workflow' => array(
+          'weight' => '5',
+        ),
+      ),
+      'display' => array(),
+    ),
+  );
+  $export['field_bundle_settings_node__page'] = $strongarm;
+
   $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;

+ 16 - 0
sites/all/themes/figureslibres/clameurs/css/dist/styles.css

@@ -298,6 +298,22 @@ input {
   width: 100%;
   height: 100%; }
 
+#block-menu-menu-footer-menu ul {
+  margin: 0;
+  padding: 0;
+  text-align: center; }
+
+#block-menu-menu-footer-menu li {
+  display: inline-block;
+  list-style: none; }
+
+#block-menu-menu-footer-menu a {
+  text-decoration: none;
+  color: inherit; }
+
+.footer-block .block {
+  font-size: 0.75em; }
+
 #footer-bottom {
   text-align: center; }
 

+ 6 - 8
sites/all/themes/figureslibres/clameurs/css/styles.scss

@@ -380,16 +380,14 @@ body{
 
 }
 
-// .block, .panel-pane{
-// 	border: 1px solid #D1D1D1;  padding:0.5em; margin:0.5em;
-// 	-moz-border-radius: 5px;
-// 	-webkit-border-radius: 5px;
-// 	border-radius: 5px;
-// 	background-color: #EAEAEA;
-// }
+#block-menu-menu-footer-menu{
+	ul{ margin:0; padding:0; text-align: center;}
+	li{display:inline-block; list-style: none;}
+	a{ text-decoration: none; color: inherit;}
+}
 
 .footer-block .block{
-	// background-color: #353535; border: 1px solid #1a1a1a;
+	font-size: 0.75em;
 }
 #footer-bottom{ text-align: center;}
 #footer-bottom .block{