 ;;..................................................................................................
 
 
+;;;**************************************************************************************************
+;;;* BEGIN images and files list viewer with button collapser
+;;;* tag: <image-and-files-btn-viewer>
+;;;*
+;;;* description: Компонент для отображения привязанных файлов и картинок в виде выпадающего через кнопку списка
+;;;*
+;;;**************************************************************************************************
+
+(defn image-and-files-btn-viewer [app own {:keys [chan-thumb-show-in-full-screen]}]
+  (reify
+    om/IRender
+    (render [_]
+      (let [{:keys [images files]} @app]
+        (ui-collapser
+         app (str "изображений (" (count images) ") файлов (" (count files) ")")
+         :k (or (not (empty? images)) (not (empty? files)))
+         (apply
+          dom/ul #js {:className "list-group"}
+          (into
+           (reduce
+            (fn [a {:keys [id path top_description description] :as row}]
+              (conj a (dom/li #js {:className "list-group-item"}
+                              (ui-media
+                               {:media-object         (ui-media-object
+                                                       {:src (str path "_as_60.png")})
+                                :heading              top_description
+                                :on-click-in-image-fn #(put! chan-thumb-show-in-full-screen row)
+                                :button-do-text       "cмотреть"
+                                :button-do-fn         #(put! chan-thumb-show-in-full-screen row)
+                                :body                 description
+                                }))))
+            [] images)
+           (reduce
+            (fn [a {:keys [id path filename top_description description] :as row}]
+              (conj a (dom/li #js {:className "list-group-item"}
+                              (ui-media
+                               {:media-object (ui-glyphicon "file" "" "2em")
+                                :href         path
+                                :on-click-fn
+                                (fn [e]
+                                  ;; Далее прервать выполнение события для родительского
+                                  ;; компонента
+                                  (.stopPropagation e))
+                                :heading      (dom/span nil top_description
+                                                        " " (dom/small nil filename))
+                                :body         description
+                                }))))
+            [] files))))))))
+
+;;; END images and files list viewer with button collapser
+;;;..................................................................................................
+
+
+
 
 
 ;;**************************************************************************************************

(defn the-time-has-passed-from-the-date-as-str [date]
  (let [[d h m] (the-time-has-passed-from-the-date date)]
    (gstring/format "прошло: %d дн. %02d час. %02d мин." d h m)))




  (dom/div #js {:className "media" :style style
                :onClick   on-click-fn}
           (dom/div #js {:className "media-left"}
                    (dom/a #js {:href    href
                                :onClick (fn [e]
                                           (when on-click-in-image-fn (on-click-in-image-fn))
                                           ;; Далее прервать выполнение события для родительского
                                           ;; компонента
                                           (.stopPropagation e))}
                           media-object))
           (dom/div #js {:className "media-body"}
                    (when button-do-fn (ui-button {:style    #js {:float "right"}
