Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1554 Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>pull/1563/head
@@ -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' | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -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' | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -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' | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -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' | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -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}} | ||||
@@ -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"> | ||||