Browse Source

修改提示语以及未登录状态处理

tags/v1.22.1.3^2
wangjr 3 years ago
parent
commit
7545272fb5
6 changed files with 21 additions and 20 deletions
  1. +1
    -1
      templates/base/head.tmpl
  2. +1
    -1
      templates/base/head_fluid.tmpl
  3. +1
    -1
      templates/base/head_home.tmpl
  4. +1
    -1
      templates/base/head_pro.tmpl
  5. +3
    -1
      templates/org/header.tmpl
  6. +14
    -15
      templates/org/home_courses.tmpl

+ 1
- 1
templates/base/head.tmpl View File

@@ -249,7 +249,7 @@ var _hmt = _hmt || [];
document.getElementById("notic_content").style.display='none' document.getElementById("notic_content").style.display='none'
} }
} }
if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') {
if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) {
isShowNotice(); isShowNotice();
} }
</script> </script>

+ 1
- 1
templates/base/head_fluid.tmpl View File

@@ -248,7 +248,7 @@ var _hmt = _hmt || [];
document.getElementById("notic_content").style.display='none' document.getElementById("notic_content").style.display='none'
} }
} }
if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') {
if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) {
isShowNotice(); isShowNotice();
} }
</script> </script>

+ 1
- 1
templates/base/head_home.tmpl View File

@@ -252,7 +252,7 @@ var _hmt = _hmt || [];
document.getElementById("notic_content").style.display='none' document.getElementById("notic_content").style.display='none'
} }
} }
if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') {
if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) {
isShowNotice(); isShowNotice();
} }
</script> </script>

+ 1
- 1
templates/base/head_pro.tmpl View File

@@ -249,7 +249,7 @@ var _hmt = _hmt || [];
document.getElementById("notic_content").style.display='none' document.getElementById("notic_content").style.display='none'
} }
} }
if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') {
if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) {
isShowNotice(); isShowNotice();
} }
</script> </script>

+ 3
- 1
templates/org/header.tmpl View File

@@ -47,7 +47,8 @@
} else { } else {
$('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); $('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut();
} }
location.reload()
setTimeout("location.reload()",2000);
// location.reload()
// if(data.code==0){ // if(data.code==0){
// alert("Join success") // alert("Join success")
// location.reload() // location.reload()
@@ -57,6 +58,7 @@
// } // }
}, },
}); });
} }


</script> </script>


+ 14
- 15
templates/org/home_courses.tmpl View File

@@ -135,11 +135,11 @@
</div> </div>
<div class="ui sixteen wide mobile six wide tablet four wide computer column"> <div class="ui sixteen wide mobile six wide tablet four wide computer column">
<!-- {{if .CanCreateOrgRepo}} -->
<div class=" ui bottom attached segment text center noborder text center" >
<div class=" ui bottom attached segment text center noborder text center" >
{{if .IsSigned}}
<a style="width: 80%;" class="ui green button bpadding" href="{{AppSubUrl}}/course/create"><i class="ri-folder-add-line" style="vertical-align: middle;"></i> &nbsp;{{.i18n.Tr "org.release_course"}} </a> <a style="width: 80%;" class="ui green button bpadding" href="{{AppSubUrl}}/course/create"><i class="ri-folder-add-line" style="vertical-align: middle;"></i> &nbsp;{{.i18n.Tr "org.release_course"}} </a>
</div>
<!-- {{end}} -->
{{end}}
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -204,7 +204,9 @@
{{end}} {{end}}
<div class="ui bottom attached segment text center noborder"> <div class="ui bottom attached segment text center noborder">
<a class="ui blue basic button" onclick="jion_course_team()" style="width: 80%;"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a>
{{if .IsSigned}}
<a class="ui blue basic button" onclick="jion_course_team()" style="width: 80%;"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a>
{{end}}
</div> </div>
</div> </div>
{{if .IsOrganizationMember}} {{if .IsOrganizationMember}}
@@ -424,6 +426,7 @@
document.getElementById("recommend").innerHTML=rec +" : "+ show_num document.getElementById("recommend").innerHTML=rec +" : "+ show_num
} }

function jion_course_team(){ function jion_course_team(){
$.ajax({ $.ajax({
type:"GET", type:"GET",
@@ -437,15 +440,11 @@
} else { } else {
$('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); $('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut();
} }
location.reload()
// if(data.code==0){
// alert("Join success")
// location.reload()
// }else{
// alert("Join failure")
// }
}
});
setTimeout("location.reload()",2000);
},

});
} }
</script> </script>

Loading…
Cancel
Save