<!-- header start -->
<include file="Public/Header" />
<!-- header end -->

<!-- right content start  -->
<div class="content-right">
  <div class="content">
    <!-- form start -->
    <form class="am-form m-b-20" action="{{:U('Admin/Bubble/Index')}}" method="POST">
      <div class="am-g">
        <input type="text" class="am-radius form-keyword" placeholder="{{:L('bubble_so_keyword_tips')}}" name="keyword" <present name="param['keyword']"> value="{{$param.keyword}}"</present> />
        <button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">{{:L('common_operation_query')}}</button>
        <label class="fs-12 m-l-5 c-p fw-100 more-submit">
          {{:L('common_more_screening')}}
          <input type="checkbox" name="is_more" value="1" id="is_more" <if condition="isset($param['is_more']) and $param['is_more'] eq 1">checked</if> />
          <i class="am-icon-angle-down"></i>
        </label>

        <div class="more-where <if condition="!isset($param['is_more']) or $param['is_more'] neq 1">none</if>">
          <div class="param-date param-where">
            <input type="text" name="time_start" readonly="readonly" class="am-radius m-t-10" placeholder="{{:L('common_time_start_name')}}" id="time_start" <if condition="isset($param['time_start'])">value="{{$param.time_start}}"</if>/>
            <span>~</span>
            <input type="text" readonly="readonly" class="am-radius m-t-10" placeholder="{{:L('common_time_end_name')}}" name="time_end" id="time_end" <if condition="isset($param['time_end'])">value="{{$param.time_end}}"</if>/>
          </div>
        </div>
      </div>
    </form>
    <!-- form end -->

    <!-- list start -->
    <if condition="!empty($data)">
      <!-- mood start -->
      <foreach name="data" item="v">
        <div class="am-panel am-panel-default am-radius list-content data-list-mood-{{$v.id}}">
          <div class="am-panel-bd">
            <div class="list-title o-h">
              <img src="__PUBLIC__/Common/Images/user-img-sm.gif" class="am-circle am-fl" width="48" height="48" />
              <div class="am-fl m-l-10 m-t-5">
                <span class="block">
                  <a href="javascript:;">{{$v.nickname}}</a>
                </span>
                <span class="block cr-999">{{$v.add_time}}</span>
              </div>
              <div class="am-fr">
                <i class="am-icon-trash-o c-p cr-999 submit-delete" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}" data-url="{{:U('Admin/Bubble/MoodDelete')}}" data-list-tag=".data-list-mood-{{$v.id}}"></i>
              </div>
            </div>
            <div class="m-t-5">{{$v.content}}</div>
            <div class="m-t-5 o-h">
              <span class="am-fr cr-999">{{$v.comments_count}}</span>
              <i class="am-icon-commenting am-icon-sm am-fr m-l-30 cr-ccc"></i>
              <span class="am-fr cr-999">{{$v.praise_count}}</span>
              <i class="am-icon-thumbs-up am-icon-sm am-fr <if condition="empty($v['praise_list'])">cr-ccc<else />c-p praise-submit</if>" data-id="{{$v.id}}"></i>
            </div>
            <if condition="!empty($v['praise_list'])">
              <table class="am-table am-table-striped am-table-hover am-table-bordered am-table-radius am-table-compact m-t-5 m-b-0 praise-table" id="praise-popup-{{$v.id}}" style="display:none;">
                <thead>
                  <tr>
                    <th>{{:L('bubble_praise_table_nickname')}}</th>
                    <th>{{:L('bubble_praise_table_add_time')}}</th>
                    <th>{{:L('common_operation_name')}}</th>
                  </tr>
                </thead>
                <tbody>
                  <foreach name="v.praise_list" item="vp">
                    <tr class="praise-list-{{$vp.id}}">
                      <td><a href="javascript:;">{{$vp.nickname}}</a></td>
                      <td>{{:date('Y-m-d H:i:s', $vp['add_time'])}}</td>
                      <td>
                        <button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Bubble/MoodPraiseDelete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$vp.id}}" data-list-tag=".praise-list-{{$vp.id}}"></button>
                      </td>
                    </tr>
                  </foreach>
                </tbody>
              </table>
            </if>
            <if condition="!empty($v['comments'])">
              <div class="o-h data-list-mood-{{$v.id}}">
                <hr data-am-widget="divider" class="am-divider am-divider-dashed m-t-10 m-b-10" />
                <foreach name="v.comments" item="vc">
                  <div class="o-h m-t-10 am-radius comments-user data-comments-{{$v.id}}-{{$vc.id}}">
                    <img src="__PUBLIC__/Common/Images/user-img-sm.gif" class="am-circle user-portrait" width="30" height="30" />
                    <a href="javascript:;">{{$vc.nickname}}</a>
                    <span class="cr-999">{{$vc.add_time}}</span>
                    <div class="am-fr comments-item-tools">
                      <span class="c-p cr-999 m-l-20 submit-delete" data-id="{{$vc.id}}" data-url="{{:U('Admin/Bubble/MoodCommentsDelete')}}" data-list-tag=".data-comments-{{$v.id}}-{{$vc.id}}">
                        <i class="am-icon-trash-o"></i>{{:L('common_operation_delete')}}
                      </span>
                    </div>
                    <div>{{$vc.content}}</div>
                  </div>
                  <if condition="!empty($vc['item'])">
                    <foreach name="vc.item" item="vcs">
                      <div class="o-h m-t-10 am-radius comments-user m-l-30 data-comments-{{$v.id}}-{{$vc.id}} data-comments-{{$v.id}}-{{$vc.id}}-{{$vcs.id}} <if condition="$vcs['reply_id'] gt 0">data-comments-reply-{{$v.id}}-{{$vcs.reply_id}}</if>">
                        <img src="__PUBLIC__/Common/Images/user-img-sm.gif" class="am-circle user-portrait" width="30" height="30" />
                        <a href="javascript:;">{{$vcs.nickname}}</a>
                        <span>{{:L('common_operation_reply')}}</span>
                        <a href="javascript:;">{{$vcs.reply_nickname}}</a>
                        <span class="cr-999">{{$vcs.add_time}}</span>
                        <div class="am-fr comments-item-tools">
                          <span class="c-p cr-999 m-l-20 submit-delete" data-id="{{$vcs.id}}" data-url="{{:U('Admin/Bubble/MoodCommentsDelete')}}" data-list-tag=".data-comments-{{$v.id}}-{{$vc.id}}-{{$vcs.id}}, .data-comments-reply-{{$v.id}}-{{$vcs.id}}">
                            <i class="am-icon-trash-o"></i>{{:L('common_operation_delete')}}
                          </span>
                        </div>
                        <div>{{$vcs.content}}</div>
                      </div>
                    </foreach>
                  </if>
                </foreach>
              </div>
            </if>
          </div>
        </div>
      </foreach>
      <!-- mood end -->

      <!-- page start -->
      {{$page_html}}
      <!-- page end -->

      <!-- comments win start -->
      <div class="am-modal am-modal-prompt" tabindex="-1" id="bubble-comments" data-url="{{:U('Admin/Bubble/MoodComments')}}" data-mood-praise-msg="{{:L('bubble_mood_praise_error')}}" data-mood-comments-msg="{{:L('bubble_mood_comments_error')}}">
        <div class="am-modal-dialog am-radius">
          <div class="am-modal-hd"></div>
          <div class="am-modal-bd">
            <textarea rows="3" minlength="1" maxlength="255" class="am-radius am-modal-prompt-input" placeholder="{{:L('bubble_comments_placeholder')}}" data-validation-message="{{:L('bubble_comments_format')}}"></textarea>
          </div>
          <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>{{:L('common_operation_cancel')}}</span>
            <span class="am-modal-btn" data-am-modal-confirm>{{:L('common_operation_comments')}}</span>
          </div>
        </div>
      </div>
      <!-- comments win end -->
    <else />
        <hr data-am-widget="divider" style="" class="am-divider am-divider-default" />
      <include file="Public/NoData" />
    </if>
    <!-- list start -->
  </div>
</div>
<!-- right content end  -->

<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end