Browse Source

Merge pull request 'fix-1504 fix-1493 和 公告无配置时,console报错问题修改' (#1554) from wangjr_1213 into V20220228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1554
Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>
pull/1563/head
zhoupzh 3 years ago
parent
commit
73e2f79d92
6 changed files with 38 additions and 22 deletions
  1. +9
    -5
      templates/base/head.tmpl
  2. +9
    -5
      templates/base/head_fluid.tmpl
  3. +9
    -5
      templates/base/head_home.tmpl
  4. +9
    -5
      templates/base/head_pro.tmpl
  5. +1
    -1
      templates/repo/header.tmpl
  6. +1
    -1
      templates/repo/modelarts/notebook/new.tmpl

+ 9
- 5
templates/base/head.tmpl View File

@@ -226,10 +226,12 @@ var _hmt = _hmt || [];
} }
let isShowNoticeTag = false; let isShowNoticeTag = false;
let notices= {{.notices.Notices}} let notices= {{.notices.Notices}}
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
if(notices != null && notices!=''){
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
}
} }
} }
if (isShowNoticeTag){ if (isShowNoticeTag){
@@ -245,7 +247,9 @@ var _hmt = _hmt || [];


} }
}else{ }else{
document.getElementById("notic_content").style.display='none'
if (document.getElementById("notic_content") != null){
document.getElementById("notic_content").style.display='none'
}
} }
} }


+ 9
- 5
templates/base/head_fluid.tmpl View File

@@ -227,10 +227,12 @@ var _hmt = _hmt || [];
} }
let isShowNoticeTag = false; let isShowNoticeTag = false;
let notices= {{.notices.Notices}} let notices= {{.notices.Notices}}
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
if(notices != null && notices!=''){
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
}
} }
} }
if (isShowNoticeTag){ if (isShowNoticeTag){
@@ -246,7 +248,9 @@ var _hmt = _hmt || [];


} }
}else{ }else{
document.getElementById("notic_content").style.display='none'
if (document.getElementById("notic_content") != null){
document.getElementById("notic_content").style.display='none'
}
} }
} }


+ 9
- 5
templates/base/head_home.tmpl View File

@@ -231,10 +231,12 @@ var _hmt = _hmt || [];
} }
let isShowNoticeTag = false; let isShowNoticeTag = false;
let notices= {{.notices.Notices}} let notices= {{.notices.Notices}}
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
if(notices != null && notices!=''){
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
}
} }
} }
if (isShowNoticeTag){ if (isShowNoticeTag){
@@ -250,7 +252,9 @@ var _hmt = _hmt || [];


} }
}else{ }else{
document.getElementById("notic_content").style.display='none'
if (document.getElementById("notic_content") != null){
document.getElementById("notic_content").style.display='none'
}
} }
} }


+ 9
- 5
templates/base/head_pro.tmpl View File

@@ -228,10 +228,12 @@ var _hmt = _hmt || [];
} }
let isShowNoticeTag = false; let isShowNoticeTag = false;
let notices= {{.notices.Notices}} let notices= {{.notices.Notices}}
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
if(notices != null && notices!=''){
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
}
} }
} }
if (isShowNoticeTag){ if (isShowNoticeTag){
@@ -247,7 +249,9 @@ var _hmt = _hmt || [];


} }
}else{ }else{
document.getElementById("notic_content").style.display='none'
if (document.getElementById("notic_content") != null){
document.getElementById("notic_content").style.display='none'
}
} }
} }


+ 1
- 1
templates/repo/header.tmpl View File

@@ -132,7 +132,7 @@
{{end}} --> {{end}} -->


{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
<a class="{{if or .PageIsComparePull .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
{{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> {{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
</a> </a>
{{end}} {{end}}


+ 1
- 1
templates/repo/modelarts/notebook/new.tmpl View File

@@ -19,7 +19,7 @@
<div class="repository new repo ui middle very relaxed page grid"> <div class="repository new repo ui middle very relaxed page grid">
<div class="column"> <div class="column">
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="ui positive message" id="messageInfo">
<div class="ui negative message" id="messageInfo">
<p></p> <p></p>
</div> </div>
<form class="ui form" id="form_id" action="{{.Link}}" method="post"> <form class="ui form" id="form_id" action="{{.Link}}" method="post">


Loading…
Cancel
Save