浏览代码

print pdf

- set available print links for our view modes
- hide flags from print

Signed-off-by: bachy <git@g-u-i.net>
bachy 12 年之前
父节点
当前提交
fc0253d9c2
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 5 5
      materio_flag.module
  2. 4 0
      materio_search_api.module

+ 5 - 5
materio_flag.module

@@ -130,10 +130,10 @@ function materio_flag_block_info() {
     'cache' => DRUPAL_NO_CACHE
   );
 
-$blocks['materio_flag_mylists_nav'] = array(
-  'info' => t('My Materio flag lists navigation'),
-  'cache' => DRUPAL_NO_CACHE
-);
+  $blocks['materio_flag_mylists_nav'] = array(
+    'info' => t('My Materio flag lists navigation'),
+    'cache' => DRUPAL_NO_CACHE
+  );
 
   return $blocks;
 }
@@ -243,7 +243,7 @@ function materio_flag_entity_info_alter(&$entity_info) {
  */
 function materio_flag_entity_view($entity, $type, $view_mode, $langcode) {
   if($type == 'node'){
-    if(user_access('create flag lists')){
+    if(user_access('create flag lists') && $view_mode != 'print'){
       
       $entity->content['flaglistslinks'] = materio_flag_get_entity_links($entity, $type, $view_mode);
 

+ 4 - 0
materio_search_api.module

@@ -223,8 +223,12 @@ function materio_search_api_entity_info_alter(&$entity_info) {
  */
 function materio_search_api_node_view($node, $view_mode, $langcode) {
   if (in_array($view_mode, array('cardsmall','cardmedium', 'cardbig', 'cardfull'))) {
+    # PRINT 7.1
     print_node_view($node, 'full');
     print_pdf_node_view($node, 'full');
+
+    # PRINT 7.2-beta
+    //print_ui_node_view($node, 'full');
     // dsm($node, 'node');
   }
 }