ソースを参照

Merge branch 'master' of https://github.com/unaio/una

AntonLV 4 年 前
親
コミット
637eed983f

+ 3 - 2
modules/boonex/artificer/template/css/main.css

@@ -2,11 +2,12 @@
 html.hidden {
     display: block !important;
 }
-
 .bx-def-unit.absolute {
     position: relative;
 }
-
 .bx-base-profile-cover-block-wrapper .bx-menu-custom.bx-menu-custom-hor{
     justify-content: center !important;
+}
+.bx-search-result-block {
+    display: flex;
 }

+ 8 - 10
modules/boonex/forum/classes/BxForumMenuSnippetMeta.php

@@ -57,7 +57,7 @@ class BxForumMenuSnippetMeta extends BxBaseModTextMenuSnippetMeta
         if(!$oComments || !$oComments->isEnabled())
             return false;
 
-        return $this->getUnitMetaItemCustom($oComments->getElementInline(array('show_counter' => true)));
+        return $this->getUnitMetaItemCustom('<i class="sys-icon comment "></i> ' . $oComments->getCommentsCountAll());
     }
 
     protected function _getMenuItemReplyAuthor($aItem)
@@ -100,20 +100,18 @@ class BxForumMenuSnippetMeta extends BxBaseModTextMenuSnippetMeta
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
 
-        $oObject = isset($CNF['OBJECT_COMMENTS']) ? BxDolCmts::getObjectInstance($CNF['OBJECT_COMMENTS'], $this->_aContentInfo[$CNF['FIELD_ID']]) : null;
-        $sIcon = '';
+        $sStatus = '';
         if ($this->_aContentInfo['resolvable']){
             if ($this->_aContentInfo['resolved']){
-                $sIcon .= 'check-circle';
+                $sStatus .= _t('_bx_forum_grid_filter_resolved_resolved');
             }
             else{
-                $sIcon .= 'question-circle';
-            }   
+                $sStatus .= _t('_bx_forum_grid_filter_resolved_unresolved');
+            }  
+            
+            return $this->getUnitMetaItemCustom($this->_oModule->_oTemplate->parseHtmlByName('status.html', ['status' => $sStatus, 'status_class' => $this->_aContentInfo['resolved']])); 
         }
-        else{
-            $sIcon .= 'comment'; 
-        }
-        return $this->getUnitMetaItemCustom($this->_oModule->_oTemplate->parseHtmlByName('status.html', ['icon' => $sIcon , 'counter' => (int)$oObject->getCommentsCountAll()])); 
+        return '';
     }
     
     protected function _getMenuItemBadges($aItem)

+ 1 - 1
modules/boonex/forum/classes/BxForumSearchResult.php

@@ -21,7 +21,7 @@ class BxForumSearchResult extends BxBaseModTextSearchResult
             'object_metatags' => 'bx_forum',
             'title' => _t('_bx_forum_page_title_browse'),
             'table' => 'bx_forum_discussions',
-            'ownFields' => array('id', 'title', 'text', 'thumb', 'author', 'added', 'comments', 'lr_profile_id'),
+            'ownFields' => array('id', 'title', 'text', 'thumb', 'author', 'added', 'comments', 'lr_profile_id', 'cat'),
             'searchFields' => array(),
             'restriction' => array(
                 'author' => array('value' => '', 'field' => 'author', 'operator' => '='),

+ 22 - 0
modules/boonex/forum/classes/BxForumTemplate.php

@@ -208,6 +208,28 @@ class BxForumTemplate extends BxBaseModTextTemplate
     {
         return '';
     }
+    
+    protected function getUnit ($aData, $aParams = array())
+    {
+        $aTmplVars = parent::getUnit($aData, $aParams);
+        
+        $CNF = $this->_oModule->_oConfig->CNF;
+        
+        $oCategory = BxDolCategory::getObjectInstance($CNF['OBJECT_CATEGORY']);
+        
+        $sIcon = $this->_oModule->_oTemplate->parseHtmlByName('default_category.html', []);
+        
+        $aCategoryData = $this->_oModule->_oDb->getCategories(array('type' => 'by_category', 'category' => $aData[$CNF['FIELD_CATEGORY']]));
+
+        if(isset($aCategoryData['icon']))
+            $sIcon = $this->getImage($aCategoryData['icon'], array('class' => 'sys-icon'));
+        
+        $aTmplVars['category'] = $oCategory->getCategoryTitle($aData[$CNF['FIELD_CATEGORY']]);
+        $aTmplVars['category_icon'] = $sIcon;
+        
+
+        return $aTmplVars;
+    }
 }
 
 /** @} */

+ 6 - 5
modules/boonex/forum/install/sql/enable.sql

@@ -349,7 +349,8 @@ 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', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
 ('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),
 ('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, 4),
-('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, 5);
+('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, 5),
+('bx_forum_snippet_meta_main', 'bx_forum', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 1, 0, 1, 6);
 
 -- MENU: custom menu for 'counters' snippet meta info
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
@@ -407,10 +408,10 @@ 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, 'rating', '', '5%', '', 1),
-(@sName, 'category', '', '10%', '', 2),
-(@sName, 'text', '', '75%', '', 3),
-(@sName, 'participants', '', '10%', '', 4),
+(@sName, 'category', '', '10%', '', 1),
+(@sName, 'text', '', '75%', '', 2),
+(@sName, 'participants', '', '10%', '', 3),
+(@sName, 'rating', '', '5%', '', 4),
 
 ('bx_forum_favorite', 'author', '', '10%', '', 1),
 ('bx_forum_favorite', 'text', '', '90%', '', 2),

+ 1 - 1
modules/boonex/forum/template/category_list.html

@@ -1,6 +1,6 @@
 <div class="bx-category-list">
     <bx_repeat:cats>
-        <div class="bx-category-list-item bx-forum-category-list-item __class__ bx-def-round-corners bx-def-padding-sec">
+        <div class="bx-category-list-item bx-forum-category-list-item __class__ rounded-lg bx-def-padding-sec">
             <a href="__url__"><div class="bx-forum-icon bx-def-margin-sec-right">__icon__</div> __name__ (__num__)</a> 
         </div>
     </bx_repeat:cats>

+ 76 - 44
modules/boonex/forum/template/css/main.css

@@ -112,7 +112,7 @@
     top: 0;
 }
 .bx-forum-gpm-main .bx-base-general-unit-meta-item{
-    font-size: 0.875rem !important; 
+    font-size: 12px !important; 
     color:rgb(107,114,128) !important;
 }
 
@@ -142,8 +142,8 @@
 .bx-forum-grid-preview .bx-forum-gp-title a,
 .bx-forum-grid-preview .bx-forum-gp-text {
     font-size: 1rem; 
-    line-height: 1.5; 
-    font-weight: 500; 
+    line-height: 125%; 
+    font-weight: 600; 
 }
 
 .bx-forum-grid-preview .bx-forum-gp-title .sys-icon,
@@ -163,12 +163,6 @@
 .bx-forum-grid-preview .bx-forum-gp-meta.bx-forum-gpm-top {
     -webkit-justify-content: space-between;
     justify-content: space-between;
-
-    padding-bottom: 0.2rem;
-}
-
-.bx-forum-grid-preview .bx-forum-gp-meta.bx-forum-gpm-bottom {
-    padding-top: 0.2rem;
 }
 
 .bx-forum-grid-preview .bx-forum-gp-meta .bx-menu-custom.bx-menu-custom-hor {
@@ -242,6 +236,9 @@
     line-height: 0.875rem;
     font-size: 0.6rem;
 }
+.bx-forum-grid-preview .bx-menu-item-date .text-sm{
+    font-size: 12px;
+}
 
 .bx-forum-grid-preview .bx-forum-gp-meta.bx-forum-gpm-bottom .bx-forum-gpm-reply .bx-menu-item-reply-author .bx-def-icon-size-min-height {
     min-height: 1.0rem;
@@ -293,70 +290,84 @@
     display: flex;
     align-items: center;
 }
+.bx-forum-category{
+    display: flex;
+    line-height: initial;
+}
 .bx-forum-category-list-item-selected{
-    background:  #ccc;
+    background:  #F3F4F6;
+    border-radius: 8px;
 }
 .bx-forum-icon{
-    width: 2rem;
-    height: 2rem;
+    width: 1.5rem;
+    height: 1.5rem;
     text-align: center;
-    line-height: 2rem;
+    line-height: 1.7rem;
     font-size: 1.25rem;
 }
 .bx-forum-icon svg,
 .bx-forum-icon .sys-icon{
-    width: 2rem;
-    height: 2rem;
+    width: 1.5rem;
+    height: 1.5rem;
     border-radius: 2rem;
+    display: block;
+}
+.bx-forum-icon img.sys-icon{
+    display: block !important;
+}
+.bx-forum-icon i.sys-icon{
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
 }
 .bx-forum-thumb{
-    width: 3rem;
-    height: 3rem;
+    width: 3.5rem;
+    height: 3.5rem;
     text-align: center;
     font-size: 2rem;
-    line-height: 2.9rem;
-    background: rgb(107,114,120);
-    border-radius: 3rem;
+    line-height: 3.4rem;
     display: flex;
     align-items: center;
     justify-content: center;
-    margin-top: 11px;
 }
 .bx-forum-thumb img{
     border-radius: 500px;
 }
 .bx-forum-thumb .sys-icon{
-    width: 3rem;
-    height: 3rem;
-    color: #fff;
-    font-size: 1.75rem;
+    color: #111928;
+    font-size: 1.25rem;
+}
+.bx-forum-thumb img.sys-icon {
+    width: 1.5rem;
+    height: 1.5rem;
 }
 .bx-forum-thumb .sys-icon-svg{
-    width: 2.4rem;
-    height: 2.4rem;
+    width: 1.5rem;
+    height: 1.5rem;
 }
 
 .bx-forum-grid-status{
     display: flex;
 }
-.bx-grid-table-cell-rating .sys-action-cnt{
-    flex-direction: column;
-    justify-content: center;
-    border: 1px solid rgb(209,213,219) !important;
-    border-radius: 0.75rem;
+.bx-forum-status-0{
+    background: #FDE8E8;
+    color: #9B1C1C;
+    font-weight: 500;
 }
-.bx-grid-table-cell-rating .sys-action-cnt > SPAN{
-    margin-left: 0px !important;
-    text-align: center;
-    border-collapse: collapse;
+.bx-forum-status-1{
+    background: #DEF7EC;
+    font-weight: 500;
+    color: #03543F;
 }
-.bx-grid-table-cell-rating .bx-score{
-    display: block;
-    margin: 0px !important;
+#bx-grid-table-bx_forum tr{
+    border-bottom: 1px solid #F4F4F5
 }
 .bx-grid-table-cell-participants .cmt-counter{
     float: right;
 }
+#bx-grid-table-bx_forum td{
+    vertical-align: middle !important;
+}
 .bx-forum-grid td{
     vertical-align: top;
 }
@@ -397,10 +408,7 @@
 .bx-media-phone .bx-forum-grid td{
     width: auto !important;
 }
-.bx-media-phone .bx-forum-grid .bx-grid-table-cell-rating{
-    grid-area: rating;
-    padding-left: 0px;
-}
+
 .bx-media-phone .bx-forum-grid .bx-grid-table-cell-category{
     grid-area: category;
     display: none;
@@ -412,7 +420,9 @@
 .bx-media-phone .bx-forum-grid .bx-grid-table-cell-participants{
     grid-area: participants;
     padding-top: 0px;
+
 }
+
 .bx-media-phone .bx-grid-table-cell-participants .cmt-counter{
     float:none
 }
@@ -428,9 +438,31 @@
     color:rgb(107,114,128) !important;
 }
 .bx-forum-unit .bx-base-text-unit-no-thumb{
-    background: linear-gradient(to bottom, #356699 0%,#b1cee2 100%);
+    background: linear-gradient(90deg, #3F83F8 0%, #0694A2 100%);
     text-align: left;
     color:#fff;
     border-radius: 7px 7px 0 0;
 }
+#bx-grid-table-bx_forum .bx-score-element-holder,
+#bx-grid-table-bx_forum .bx-score-counter-holder{
+    border:1px solid rgba(209,213,219, 1) !important;
+    border-width: 1px !important;
+    margin: 0px !important;
+    padding: 0px 5px;
+    border-collapse: collapse;
+}
+#bx-grid-table-bx_forum .bx-score-counter-holder{
+    border-left: none !important;
+    border-right: none !important;
+    padding: 2px 10px;
+    padding-top: 1px;
+}
+#bx-grid-table-bx_forum .bx-score-cnt .bx-score-element-holder:first-child{
+    border-top-left-radius: 0.375rem;
+    border-bottom-left-radius: 0.375rem;
+}
 
+#bx-grid-table-bx_forum .bx-score-cnt .bx-score-element-holder:last-child{
+    border-top-right-radius: 0.375rem;
+    border-bottom-right-radius: 0.375rem;
+}

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

@@ -1 +1 @@
-<span class="bx-def-font-grayed text-sm"><i class="sys-icon far __icon__"></i>  __counter__</span>
+<div class="bx-forum-status-__status_class__ rounded-md px-2 py-0.5 text-xs">__status__</div>

+ 1 - 1
modules/boonex/forum/template/thumb.html

@@ -1 +1 @@
-<div class="bx-forum-thumb" title="__title__">__icon__</div>
+<div class="bx-forum-thumb bg-gray-100 rounded-md" title="__title__">__icon__</div>

+ 5 - 1
modules/boonex/forum/template/unit_gallery.html

@@ -1,4 +1,8 @@
-<div class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec">
+<div class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec relative" >
+    <div class="bx-forum-category rounded-md bg-gray-100 absolute py-1 px-2 ml-3 mt-3" >
+        <div class="bx-forum-icon bx-def-margin-sec-right">__category_icon__</div>
+        <div>__category__</div>
+    </div>
     <div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
         <bx_if:thumb>
             <a href="__content_url__" title="__summary_attr__">

+ 17 - 11
modules/boonex/videos/template/unit_gallery_embed.html

@@ -1,14 +1,20 @@
-<bx_if:thumb>
-    <div class="bx-def-round-corners bx-def-font-middle" style="height:100%;">
-        __entry_video__
+<div>
+    <div class="bx-embed-video-caption absolute z-10 flex justify-between w-full items-center p-1 whitespace-nowrap">
+        <a href="__content_url__" class="block overflow-hidden text-ellipsis pr-2 ">__title__</a>
+        __main_logo__
     </div>
-</bx_if:thumb>
-<bx_if:no_thumb>
-    <div class="bx-def-gal-img-column">
-        <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
-            __summary_plain__
-            <div class="bx-base-text-unit-strecher">__strecher__</div>
+    <bx_if:thumb>
+        <div class="bx-def-round-corners bx-def-font-middle" style="height:100%;">
+            __entry_video__
         </div>
-    </div>
-</bx_if:no_thumb>
+    </bx_if:thumb>
+    <bx_if:no_thumb>
+        <div class="bx-def-gal-img-column">
+            <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+                __summary_plain__
+                <div class="bx-base-text-unit-strecher">__strecher__</div>
+            </div>
+        </div>
+    </bx_if:no_thumb>
+</div>
        

+ 0 - 3
studio/template/css/common.less

@@ -99,11 +99,8 @@ a:hover > .sys-icon-a i {
 .bx-btn,
 .bx-btn.bx-btn-primary {
     .box-sizing(border-box);
-
     height: 36px;
     height: 2.4rem;
-    line-height: 36px;
-    line-height: 2.4rem;
 
     .background-color(rgba(68, 134, 244, 1.0));
 

+ 4 - 3
studio/template/css/login.css

@@ -2,19 +2,20 @@ div.bx-std-page {
 
 }
 div.bx-std-login-form {
-	width: 595px;
+	width: 635px;
 	height: auto;
 }
+form.bx-std-login-form {
+    display: flex;
+}
 div.bx-std-login-form {}
 div.bx-std-lf-input {
 	position: relative;
-	float: left;
 	width: 225px;
 	margin-right: 10px;
 }
 div.bx-std-lf-submit {
 	position: relative;
-    float: left;
     width: 125px;
 }
 div.bx-std-lf-submit .bx-btn {

+ 10 - 0
template/css/embed.css

@@ -19,4 +19,14 @@ body,
 }
 .bx-embed > div{
     padding: 0px !important;
+}
+
+.bx-embed #bx-logo{
+    max-height: 2rem !important;
+}
+.bx-embed-video-caption{
+    background: rgba(0, 0 ,0, 0.7);
+}
+.bx-embed-video-caption A{
+    color:white;
 }