roman.lesnikov@gmail.com %!s(int64=4) %!d(string=hai) anos
pai
achega
c886865f95

+ 7 - 0
modules/boonex/artificer/data/template/bx_forum/css/main.css

@@ -87,4 +87,11 @@ div.bx-forum-participants.none .bx-forum-participant {
 }
 .bx-menu-meta-item-ex {
     margin-right: 0px !important;
+}
+.bx-menu-meta-item-ex span:nth-child(2){
+    margin-left: 0.375rem;
+}
+.bx-menu-meta-item-ex .bx-menu-meta-icon{
+    min-width: 16px;
+    text-align: center;
 }

+ 28 - 1
modules/boonex/forum/classes/BxForumTemplate.php

@@ -140,7 +140,7 @@ class BxForumTemplate extends BxBaseModTextTemplate
 
         $oProfileLast = BxDolProfile::getInstanceMagic($aRow['lr_profile_id']);
 
-        $sTitle = strmaxtextlen($aRow[$CNF['FIELD_TITLE']], 55);
+        $sTitle = $aRow[$CNF['FIELD_TITLE']];
 
         $aMetas = array('main' => false, 'counters' => false, 'reply' => false);
         foreach(array_keys($aMetas) as $sMeta) {
@@ -161,6 +161,24 @@ class BxForumTemplate extends BxBaseModTextTemplate
                 'content' => $sMenuMeta
             );
         }
+        
+        $oObject = isset($CNF['OBJECT_COMMENTS']) ? BxDolCmts::getObjectInstance($CNF['OBJECT_COMMENTS'], $aRow[$CNF['FIELD_ID']]) : null;
+        $sParticipants = $oObject ? $oObject->getCounter(['show_counter_empty' => true, 'show_counter' => false, 'show_counter_style' => 'simple', 'dynamic_mode' => true, 'caption' => '', 'show_icon' => false, 'caption_empty' => '']) : '';
+        
+        $oObject = isset($CNF['OBJECT_SCORES']) ? BxDolScore::getObjectInstance($CNF['OBJECT_SCORES'], $aRow[$CNF['FIELD_ID']], true, $this->_oModule->_oTemplate) : null;
+        $sVotes = $oObject ? $oObject->getElementInline() : '';
+        
+        $sImage = '';
+        $mixedImage = $this->_getHeaderImage($aRow);
+        if($mixedImage !== false) {
+            if(!empty($mixedImage['object']))
+                $o = BxDolStorage::getObjectInstance($mixedImage['object']);
+            else if(!empty($mixedImage['transcoder']))
+                $o = BxDolTranscoder::getObjectInstance($mixedImage['transcoder']);
+
+            if($o)
+                $sImage = $o->getFileUrlById($mixedImage['id']);
+        }
 
         return $this->parseHtmlByName('entry-preview.html', array(
             'bx_if:show_stick' => array(
@@ -173,10 +191,19 @@ class BxForumTemplate extends BxBaseModTextTemplate
             ),
             'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $oModule->_oConfig->CNF['URI_VIEW_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]),
             'title' => $sTitle ? $sTitle : _t('_Empty'),
+            'participants' => $sParticipants,
+            'badges' => $this->_oModule->serviceGetBadges($aRow[$CNF['FIELD_ID']]),
+            'votes' => $sVotes,
+            'image' => $sImage,
             'bx_if:meta_main' => array(
                 'condition' => $aMetas['main'] !== false && (!isset($aParams['show_meta_main']) || $aParams['show_meta_main']),
                 'content' => $aMetas['main']
             ),
+            'bx_if:image' => array(
+                'condition' => $sImage != '',
+                'content' => ['image' => $sImage]
+            ),
+            
             'bx_if:meta_counters' => array(
                 'condition' => $aMetas['counters'] !== false && (!isset($aParams['show_meta_counters']) || $aParams['show_meta_counters']),
                 'content' => $aMetas['counters']

+ 3 - 11
modules/boonex/forum/install/sql/enable.sql

@@ -352,8 +352,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_forum_snippet_meta_main', 'bx_forum', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', 'clock', '', 2147483647, 1, 0, 1, 2, 0),
 ('bx_forum_snippet_meta_main', 'bx_forum', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 1, 0, 1, 3, 3),
 ('bx_forum_snippet_meta_main', 'bx_forum', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', 'comments', '', 2147483647, 1, 0, 1, 4, 0),
-('bx_forum_snippet_meta_main', 'bx_forum', 'status', '_bx_forum_menu_item_title_system_sm_status', '_bx_forum_menu_item_title_sm_status', '', '', '', '', '', 2147483647, 1, 0, 1, 5, 3),
-('bx_forum_snippet_meta_main', 'bx_forum', 'badges', '_bx_forum_menu_item_title_system_sm_badges', '_bx_forum_menu_item_title_sm_badges', '', '', '', '', '', 2147483647, 1, 0, 1, 6, 3);
+('bx_forum_snippet_meta_main', 'bx_forum', 'status', '_bx_forum_menu_item_title_system_sm_status', '_bx_forum_menu_item_title_sm_status', '', '', '', '', '', 2147483647, 1, 0, 1, 5, 3);
 
 
 -- MENU: custom menu for 'counters' snippet meta info
@@ -412,16 +411,9 @@ INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `fie
 ('bx_forum_feature', 'Sql', 'SELECT `bx_forum_discussions`.*, `bx_forum_cmts`.`cmt_text` AS `cmt_text` %s FROM `bx_forum_discussions` LEFT JOIN `bx_forum_cmts` ON (`bx_forum_cmts`.`cmt_id` = `bx_forum_discussions`.`lr_comment_id`) %s WHERE 1 %s %s', 'bx_forum_discussions', 'id', 'lr_timestamp', '', 10, NULL, 'start', '', 'title,text,text_comments', 'auto', '', 2147483647, 'BxForumGrid', 'modules/boonex/forum/classes/BxForumGrid.php');
 
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
-(@sName, 'category', '', '10%', '', 1),
-(@sName, 'text', '', '75%', '', 2),
-(@sName, 'participants', '', '10%', '', 3),
-(@sName, 'rating', '', '5%', '', 4),
+(@sName, 'text', '', '100%', '', 1),
 
-('bx_forum_favorite', 'author', '', '10%', '', 1),
-('bx_forum_favorite', 'text', '', '90%', '', 2),
-
-('bx_forum_feature', 'author', '', '10%', '', 1),
-('bx_forum_feature', 'text', '', '90%', '', 2);
+('bx_forum_favorite', 'text', '', '100%', '', 2);
 
 -- GRIDS: moderation tools
 INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES

+ 13 - 6
modules/boonex/forum/template/css/main.css

@@ -112,7 +112,9 @@
     top: 0;
 }
 #bx-forum-snippet-meta-main{
-	margin-left: -8px;
+    overflow: hidden;
+    display: flex;
+    grid-gap: 0.25rem;
 }
 .bx-forum-preview .bx-def-unit-info {
     line-height:1.15em;
@@ -382,10 +384,16 @@
 }
 .bx-forum-grid td{
     vertical-align: top;
+    padding: 0px !important;
 }
 .bx-forum-grid tr:hover{
     cursor: pointer;
 }
+.bx-forum-grid .bx-grid-table-wrapper2{
+    margin-left: -1rem;
+    margin-right: -1rem;
+    width:calc(100% + 2rem);
+}
 .bx-forum-grid tr td:first-child{
     padding-left: 0rem;
 }
@@ -492,11 +500,6 @@
 .bx-forum-grid #bx-form-element-search{
     flex-grow: 3;
 }
-#bx-forum-snippet-meta-main{
-    overflow: hidden;
-    display: flex;
-    grid-row-gap: 0.5rem;
-}
 .bx-forum-unit.bx-base-text-unit-gallery .bx-base-text-unit-info .bx-base-pofile-unit A,
 .bx-forum-unit.bx-base-text-unit-gallery .bx-base-text-unit-title A{
     color:#fff !important;
@@ -538,6 +541,7 @@
 	padding: 0px !important;
 }
 
+
 /* ---------------new meta menu need to move incore*/
 
 .bx-menu-meta-icon img,
@@ -564,4 +568,7 @@
 	margin: -0.75rem !important;
 	margin-top: 0px !important;
 }
+.bx-menu-meta-item-ex span:nth-child(2) {
+    margin-left: 0.375rem;
+}
 

+ 43 - 11
modules/boonex/forum/template/entry-preview.html

@@ -1,11 +1,43 @@
-<div class="bx-forum-grid-preview flex flex-col justify-between ">
-    <div class="bx-forum-gp-title text-base mb-2">
-    	<bx_if:show_stick><i class="sys-icon thumbtack" title="<bx_text_attribute:_bx_forum_txt_entry_sticked />"></i></bx_if:show_stick>
-    	<bx_if:show_lock><i class="sys-icon lock" title="<bx_text_attribute:_bx_forum_txt_entry_locked />"></i></bx_if:show_lock>
-    	<a class="text-lg lg:text-xl font-semibold whitespace-nowrap text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white" href="__url__">__title__</a>
-    </div>
-    <div class="bx-forum-gp-meta bx-forum-gpm-top text-sm">
-        <bx_if:meta_main><div class="bx-base-general-unit-meta bx-forum-gpm-main ">__content__</div></bx_if:meta_main>
-        <bx_if:meta_counters><div class="bx-base-general-unit-meta bx-forum-gpm-counters bx-def-media-phone-hide">__content__</div></bx_if:meta_counters>
-    </div>
-</div>
+<div onclick="location.href='__url__'" class="group block hover:bg-gray-50 dark:hover:bg-gray-700/20">
+                          <div class="p-4 flex items-center ">
+                            <div class="min-w-0 flex sm:items-top sm:justify-between align-top">
+                             
+                              <div class="pr-4 flex-1 grow">
+                                <div class="flex flex-wrap space-y-2.5 px-0 items-start flex-col">                               
+                                  <div class=" flex text-lg flex-wrap  font-semibold text-gray-600 group-hover:text-gray-900 dark:text-gray-300 dark:group-hover:text-white">
+                                      <span class="leading-tight">                                    
+                                     <a href="__url__">__title__</a>
+                                          <span class="mr-1 inline-flex align-middle items-center -space-x-1 overflow-hidden">
+                                      __participants__
+                                    </span>
+                                      __badges__
+                                  </span>
+                                  </div>
+
+                                
+                                  <nav class="flex ">
+                                    <div class="inline-flex flex-wrap text-xs font-medium gap-2">
+                                        __votes__
+                                     
+
+                                      
+
+                                     
+                                        <bx_if:meta_main><div class="bx-base-general-unit-meta bx-forum-gpm-main items-center flex">__content__</div></bx_if:meta_main>
+        <bx_if:meta_counters><div class="bx-base-general-unit-meta bx-forum-gpm-counters bx-def-media-phone-hide items-center flex">__content__</div></bx_if:meta_counters>
+
+                                      
+                                    </div>
+                                  </nav>
+                                </div>
+                                
+                              
+                              </div>
+                              <bx_if:image>
+                                  <img src="__image__" class="bg-cover sm:flex aspect-video h-16 rounded-md text-4xl align-top bg-black/10 dark:bg-white/10">
+                              </bx_if:image>  
+                              
+                            </div>
+                            
+                          </div>
+                        </div>

+ 3 - 3
modules/boonex/forum/template/score_element_inline.html

@@ -1,13 +1,13 @@
 <span id="__html_id__" class="sys-action __style_prefix__ __class__ inline-flex items-center whitespace-nowrap" bx_score_data_score="__score__" bx_score_data_cup="__cup__" bx_score_data_cdown="__cdown__">
     <span class="sys-action-cnt __style_prefix__-cnt relative z-0 inline-flex shadow-sm rounded-md">
         <bx_if:show_do_vote_up>
-            <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up relative inline-flex items-center px-2 py-1 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700">__do_vote__</span>
+            <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up -mr-px border relative inline-flex items-center px-1.5 py-1 rounded-l-md shadow-sm hover:shadow active:shadow-none font-medium text-xs bg-gray-100 text-gray-600 hover:text-gray-900 active:text-gray-900 border-gray-300  active:bg-gray-300  active:border-gray-400 hover:bg-white dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-700/50  dark:active:bg-gray-800 dark:active:border-gray-700  dark:text-gray-300 dark:hover:text-white dark:active:text-gray-200">__do_vote__</span>
         </bx_if:show_do_vote_up>
         <bx_if:show_counter>
-            <span class="sys-action-counter-holder __style_prefix__-counter-holder -ml-px relative inline-flex items-center px-2 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700 text-center justify-center"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span>
+            <span class="sys-action-counter-holder __style_prefix__-counter-holder  border relative inline-flex items-center px-1.5 py-1 shadow-sm hover:shadow active:shadow-none font-medium text-xs bg-gray-100 text-gray-600 hover:text-gray-900 active:text-gray-900 border-gray-300  active:bg-gray-300  active:border-gray-400 hover:bg-white dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-700/50  dark:active:bg-gray-800 dark:active:border-gray-700  dark:text-gray-300 dark:hover:text-white dark:active:text-gray-200"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span>
         </bx_if:show_counter>
         <bx_if:show_do_vote_down>
-            <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down  -ml-px relative inline-flex items-center px-2 py-1 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700">__do_vote__</span>
+            <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down  -ml-px border relative inline-flex items-center px-1.5 py-1 rounded-r-md shadow-sm hover:shadow active:shadow-none font-medium text-xs bg-gray-100 text-gray-600 hover:text-gray-900 active:text-gray-900 border-gray-300  active:bg-gray-300  active:border-gray-400 hover:bg-white dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-700/50  dark:active:bg-gray-800 dark:active:border-gray-700  dark:text-gray-300 dark:hover:text-white dark:active:text-gray-200">__do_vote__</span>
         </bx_if:show_do_vote_down>
 </span>__script__
 </span>

+ 4 - 1
modules/boonex/forum/template/status.html

@@ -1 +1,4 @@
-<div class="bx-forum-status-__status_class__ rounded-md px-2 py-1 text-xs"><i class="sys-icon circle sys-colored"></i> __status__</div>
+<div class="bx-forum-status-__status_class__ rounded-md px-2 py-1 text-xs">
+    <span class="bx-menu-meta-icon"><i class="sys-icon circle sys-colored"></i></span>
+    <span>__status__</span>
+</div>

+ 17 - 21
modules/boonex/forum/template/unit_gallery.html

@@ -1,29 +1,25 @@
 <div onclick="location.href='__content_url__'" class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size flex flex-col w-full p-2 box-border relative inline-block cursor-pointer">
-    <div class="grid grid-cols-1">
-        <div class="bx-base-text-unit-cnt rounded-lg ring-1 ring-gray-200 dark:ring-gray-700 overflow-hidden bg-white dark:bg-gray-800 row-start-1 col-start-1" >
+    <div class="bg-white dark:bg-gray-800 shadow ring-1 ring-gray-300 dark:ring-gray-700 rounded-md xl:mx-auto h-full">
+        <div class="h-full space-y-4 p-1 pb-4 flex flex-col justify-between">
             <bx_if:thumb>
-                <a href="__content_url__" title="__summary_attr__">
-                    <div class="flex-shrink-0">
-                        <img class="h-48 w-full object-cover rounded-lg" src="__gallery_url__" alt="">
-                    </div>
-                </a>
+                <a href="__content_url__" title="__summary_attr__">   <img class="flex grow-0 w-full aspect-video overflow-y-auto align-top  object-cover rounded" src="__gallery_url__" alt=""></a>  
             </bx_if:thumb>
-            <bx_if:no_thumb>
-                <div class="bx-def-gal-img-column flex-shrink-0">
-                    <div class="bx-base-text-unit-no-thumb flex flex-col items-center justify-center h-48 p-4 bg-gradient-to-b box-border rounded-lg"></div>
+            <div class="grow-none px-3 mt-4 text-lg leading-tight font-semibold text-gray-700 group-hover:text-gray-900 dark:text-gray-200 dark:group-hover:text-white">
+                <a href="__content_url__" title="__summary_attr__" class=" text-lg leading-tight font-semibold text-gray-600 group-hover:text-gray-900 dark:text-gray-300 dark:group-hover:text-white">__title__</a>
+            </div>               
+            <bx_if:no_thumb>  
+                <div class="grow relative rounded w-full max-w-full sm:aspect-video overflow-hidden font-normal text-sm  text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">
+                    <div class="absolute top-auto bottom-0  w-full h-1/4 bg-gradient-to-b from-white/0 to-white dark:from-gray-900/0 dark:to-gray-800"></div>
+                    <div class=" px-3">__summary_plain__</div>
                 </div>
-            </bx_if:no_thumb>
-        </div>
-        <div class="flex flex-col m-4 justify-between row-start-1 col-start-1 items-start">
-            
-            <div class="bx-base-text-unit-text box-border bottom-0 max-w-full h-full justify-between flex flex-col">
-                <div class="bx-base-text-unit-title flex items-center text-left mb-2">
-                    <a href="__content_url__" class="text-ellipsis text-xl font-bold text-white group-hover:text-gray-900 dark:group-hover:text-white">__title__</a>
+            </bx_if:no_thumb> 
+            <bx_if:meta>
+                <div class="bx-base-general-unit-meta flex grow-0 px-2">
+                    <div class="inline-flex flex-wrap text-xs font-medium">
+                        __meta__
+                    </div>
                 </div>
-               <div class="bx-base-text-unit-info text-xs">
-                    <bx_if:meta><div class="bx-base-general-unit-meta pb-2">__meta__</div></bx_if:meta>
-               </div>
-            </div>
+            </bx_if:meta>
         </div>
     </div>
 </div>

+ 1 - 1
plugins_public/tailwind/css/tailwind.css

@@ -431,7 +431,7 @@
     }
 
     .bx-def-font-meta {
-        @apply text-xs font-bold;
+        @apply text-xs;
     }
     .bx-def-font-meta:not(a) {
         @apply text-gray-700 dark:text-gray-400 text-opacity-60;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 1 - 1
template/menu_custom_hor.html

@@ -1,4 +1,4 @@
-<ul id="__html_id__" class="bx-menu-custom bx-menu-custom-hor bx-menu-hor-inline<bx_if:show_more_auto_class> bx-menu-more-auto</bx_if:show_more_auto_class> bx-menu-object-__object__ bx-clearfix">
+<ul id="__html_id__" class="bx-menu-custom bx-menu-custom-hor bx-menu-hor-inline<bx_if:show_more_auto_class> bx-menu-more-auto</bx_if:show_more_auto_class> bx-menu-object-__object__">
     <bx_repeat:menu_items>
         <li class="bx-menu-item bx-menu-item-__name____class__">__item__</li>
     </bx_repeat:menu_items>

+ 2 - 2
template/unit_meta_item_ex.html

@@ -1,10 +1,10 @@
-<span class="bx-menu-meta-item-ex __class__ group  space-x-1.5  border border-transparent hover:border-gray-200/50 text-gray-600 dark:text-gray-400 active:bg-gray-300 active:border-gray-300 dark:active:bg-black/50   hover:bg-gray-200/50 dark:hover:text-gray-200 dark:hover:bg-gray-700/50 dark:hover:border-gray-700/50 dark:active:border-gray-700 hover:text-gray-800 flex items-center px-1.5 py-1  text-xs font-medium rounded-md">
+<span class="bx-menu-meta-item-ex __class__ group  space-x-1.5  border border-transparent hover:border-gray-200/50 text-gray-600 dark:text-gray-400 active:bg-gray-300 active:border-gray-300 dark:active:bg-black/50   hover:bg-gray-200/50 dark:hover:text-gray-200 dark:hover:bg-gray-700/50 dark:hover:border-gray-700/50 dark:active:border-gray-700 hover:text-gray-800 flex items-center px-1.5 py-1  text-xs font-medium rounded-md ">
     <bx_if:extended>
         <bx_if:a>
             <a href ='__link__' class="flex items-center">
         </bx_if:a>
         <bx_if:icon>
-            <span class="bx-menu-meta-icon mr-1 text-slate-700 dark:text-gray-300">__icon__</span>
+            <span class="bx-menu-meta-icon text-slate-700 dark:text-gray-300">__icon__</span>
         </bx_if:icon>
         <bx_if:noicon>
         </bx_if:noicon>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio