#2670 fix #1954 【个人中心缺省页】活动动态展示不对

Merged
zhoupzh merged 1 commits from fix-1954 into V20220815 1 year ago
  1. +15
    -14
      templates/user/dashboard/dashboard.tmpl

+ 15
- 14
templates/user/dashboard/dashboard.tmpl View File

@@ -22,24 +22,26 @@
{{template "user/dashboard/heatmap" .}}
{{end}}
{{template "user/dashboard/feeds" .}}
<diV id = "activity_cont" style="display: none;">
<div class="ui placeholder segment bgtask-none padding_none line" >
<div class="act_title" style="padding-left: 0px ;">
{{.i18n.Tr "home.activity"}} :
{{ if eq (len .Feeds) 0 }}
<diV ss="{{(len .Feeds)}}" id = "activity_cont" style="display: block;">
<div class="ui placeholder segment bgtask-none padding_none line" >
<div class="act_title" style="padding-left: 0px ;">
{{.i18n.Tr "home.activity"}} :
</div>
<div class="ui icon header bgtask-header-pic"></div>
<p class="p_hint">
{{.i18n.Tr "home.no_events"}}
</p>
</div>
<div class="ui icon header bgtask-header-pic"></div>
<p class="p_hint">
{{.i18n.Tr "home.no_events"}}
</p>
</div>
</diV>
</diV>
{{ end }}
</div>
{{template "user/dashboard/repolist" .}}
</div>
</div>
</div>
{{template "base/footer" .}}
<script>
<script>

const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
uid_ = Number((document.querySelector('meta[name=_context_uid]') || {}).content)
@@ -49,11 +51,10 @@
$.getJSON(URL, (result, _textStatus, request) => {
const counts_pro = request.getResponseHeader('X-Total-Count');
console.log("count:",counts_pro)
if (counts_pro == 0){
if (counts_pro == 0 && {{ (len .Feeds) }} == 0) {
document.getElementById("default_page").style.display = "block";
document.getElementById("activity_cont").style.display = "block"
}
})
})
</script>

<style>


Loading…
Cancel
Save