Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.36 KB | None | 0 0
  1. {extends 'base_template'}
  2.  
  3. {block 'content'}
  4.  
  5.     {var $total_comments = 'totalCommentsByUser' | snippet : [
  6.         'id' => $_modx->getPlaceholder('vp.id')]
  7.     }
  8.     {var $total_news = 'totalNewsByUser' | snippet : [
  9.         'id' => $_modx->getPlaceholder('vp.id')]
  10.     }
  11.     {var $total_articles = 'totalArticlesByUser' | snippet : [
  12.         'id' => $_modx->getPlaceholder('vp.id')]
  13.     }
  14.     {var $role = $_modx->runSnippet('isDoctorById', ['id' => $_modx->getPlaceholder('vp.id')])}
  15.  
  16.    <div class="container multipurpose">
  17.         <div class="row">
  18.             <div class="col-md-12 content">
  19.                 <div class="multipurpose-block top-block">
  20.                     <div class="account-block">
  21.                         <div class="wrapper">
  22.                             <div class="account-header">
  23.                                 <img class="user-avatar" src="{'userbyid' | snippet : [
  24.                                        'id' => $_modx->getPlaceholder('vp.id'),
  25.                                         'fieldname' => 'photo'
  26.                                         ]}" alt="">
  27.                                 <div class="username">
  28.                                     <p>{'userbyid' | snippet : ['id' => $_modx->getPlaceholder('vp.id'),'fieldname' => 'fullname']}</p>
  29.                                     <p class="role">{$role}</p>
  30.                                 </div>
  31.                                 <div class="userinfo">
  32.                                     <p>{'userbyid' | snippet : [
  33.                                         'id' => $_modx->getPlaceholder('vp.id'),
  34.                                         'fieldname' => 'doctor_info',
  35.                                         'extended' => '1'
  36.                                         ]}</p>
  37.                                 </div>
  38.                                 <button type="button" class="btn test" id="test">
  39.                                             <span>тест
  40.                                             </span>
  41.                                         </button>
  42.                                 <div class="activity-buttons">
  43.                                     <button type="button" class="btn comments">
  44.                                         <span>{$total_comments} {$total_comments | declension : 'комментарий|комментария|комментариев'}</span>
  45.                                     </button>
  46.                                     {if $role == 'Врач'}
  47.                                         <button type="button" class="btn news">
  48.                                             <span>{$total_news} {$total_news | declension : 'новость|новости|новостей'}
  49.                                             </span>
  50.                                         </button>
  51.                                         <button type="button" class="btn articles">
  52.                                             <span>{$total_articles} {$total_articles | declension : 'статья|статьи|статей'}</span>
  53.                                         </button>
  54.                                     {/if}
  55.                                     <!--<button type="button" class="btn aswers">
  56.                                        <span>2 ответа</span>
  57.                                    </button>-->
  58.                                 </div>
  59.                                 <div class="activity-field">
  60.                                     {ignore}
  61.                                         <div id="user_comments_ajax" class="account_activity_block" style="display:none;">
  62.                                             <div id="user_comments_ajax_row">
  63.                                                 [[!pdoPage?
  64.                                                     &element=`getComments`
  65.                                                    &tpl=`tpl.user.activityentity.comments`
  66.                                                    &parents=`0`
  67.                                                    &limit=`10`
  68.                                                    &where=`{"createdby":"[[+vp.id]]"}`
  69.                                                    &ajaxMode=`button`
  70.                                                    &ajaxElemWrapper=`#user_comments_ajax`
  71.                                                    &ajaxElemRows=`#user_comments_ajax_row`
  72.                                                    &ajaxElemPagination=`#user_comments_ajax #user_comments_ajax_pagination`
  73.                                                    &ajaxElemLink=`#user_comments_ajax #user_comments_ajax_pagination a`
  74.                                                    &ajaxElemMore=`#user_comments_ajax .show-more button`
  75.                                                    &ajaxTplMore=`tpl.account.showMoreButton`
  76.                                                    &pageVarKey=`comments`
  77.                                                    &pageNavVar=`comments.nav`
  78.                                                    &totalVar=`comments.total`
  79.                                                ]]
  80.                                            </div>
  81.                                            <div id="user_comments_ajax_pagination">
  82.                                                [[+comments.nav]]
  83.                                            </div>
  84.                                        </div>
  85.                                        <div id="user_news_ajax" class="account_activity_block" style="display:none;">
  86.                                             <div id="user_news_ajax_row">
  87.                                                 [[!pdoPage?
  88.                                                     &element=`getTickets`
  89.                                                    &tpl=`tpl.user.activityentity.news`
  90.                                                    &parents=`61`
  91.                                                    &where=`{"createdby":"[[+vp.id]]"}`
  92.                                                    &limit=`10`
  93.                                                    &ajaxMode=`button`
  94.                                                    &ajaxElemWrapper=`#user_news_ajax`
  95.                                                    &ajaxElemRows=`#user_news_ajax_row`
  96.                                                    &ajaxElemPagination=`#user_news_ajax #user_news_ajax_pagination`
  97.                                                    &ajaxElemLink=`#user_news_ajax #user_news_ajax_pagination a`
  98.                                                    &ajaxElemMore=`#user_news_ajax .show-more button`
  99.                                                    &ajaxTplMore=`tpl.account.showMoreButton`
  100.                                                    &pageVarKey=`news`
  101.                                                    &pageNavVar=`news.nav`
  102.                                                    &totalVar=`news.total`
  103.                                                ]]
  104.                                            </div>
  105.                                            <div id="user_news_ajax_pagination">
  106.                                                [[+news.nav]]
  107.                                            </div>
  108.                                        </div>
  109.                                        <div id="user_articles_ajax" class="account_activity_block" style="display:none;">
  110.                                             <div id="user_articles_ajax_row">
  111.                                                 [[!pdoPage?
  112.                                                     &element=`getTickets`
  113.                                                    &tpl=`tpl.user.activityentity.news`
  114.                                                    &parents=`87`
  115.                                                    &where=`{"createdby":"[[+vp.id]]"}`
  116.                                                    &limit=`10`
  117.                                                    &ajaxMode=`button`
  118.                                                    &ajaxElemWrapper=`#user_articles_ajax`
  119.                                                    &ajaxElemRows=`#user_articles_ajax_row`
  120.                                                    &ajaxElemPagination=`#user_articles_ajax #user_articles_ajax_pagination`
  121.                                                    &ajaxElemLink=`#user_articles_ajax #user_articles_ajax_pagination a`
  122.                                                    &ajaxElemMore=`#user_articles_ajax .show-more button`
  123.                                                    &ajaxTplMore=`tpl.account.showMoreButton`
  124.                                                    &pageVarKey=`articles`
  125.                                                    &pageNavVar=`articles.nav`
  126.                                                    &totalVar=`articles.total`
  127.                                                ]]
  128.                                            </div>
  129.                                            <div id="user_articles_ajax_pagination">
  130.                                                [[+articles.nav]]
  131.                                            </div>
  132.                                        </div>
  133.                                    {/ignore}
  134.                                </div>
  135.                            </div>
  136.                        </div>
  137.                    </div>
  138.                </div>
  139.            </div>
  140.        </div>
  141.    </div>
  142. {/block}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement