Commit 89410cb8 by liuyingying

拿来管理员页面

parent d31c66e2
*{
margin:0;
padding: 0;
}
.userlist{
width:100%;
margin:70px auto;
}
button{
outline:none;
background-color: transparent;
border:none;
}
a{
color:#ff9800;
}
ul{
list-style: none;
}
nav{
width:100%;
height:50px;
color:#FF9800;
background-color: black;
}
#adminname, #hunterLogo{
width:200px;
height:50px;
line-height: 50px;
font-size: 24px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#hunterLogo{
float:left;
margin-left: 50px;
}
.logout{
width:50px;
height:50px;
line-height: 50px;
font-size: 20px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
float:right;
color:#ff9800;
text-align: right;
margin-right: 10px;
cursor: pointer;
text-decoration: none;
}
a:hover{
color:#ff7000;
}
#adminname{
float:right;
text-align: right;
margin-right: 50px;
}
.adminForm{
width:100%;
}
#adduserform{
width:100%;
}
#adduserform > .form-group{
float:left;
margin:10px;
}
.adduserbtn, .deluserbtn, .resetPwd{
display:inline-block;
width:100px;
height: 40px;
line-height: 40px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size:16px;
border:none;
border-radius:2px;
vertical-align: middle;
}
.adduserbtn{
color:#FF9800;
background-color: black;
}
.adduserbtn:hover{
color:#FF7000;
}
.deluserbtn{
width:20px;
height:20px;
margin-top:-15px;
}
.deluserbtn{
color:#FF9800;
}
.deluserbtn:hover{
color: #FF7000;
}
.resetPwd{
color:#FF9800;
}
.resetPwd:hover{
color: #FF7000;
}
@media (max-width: 767px){
.userlist{
width:100%;
margin:100px auto;
}
}
#leftBar{
width:170px;
height:100%;
padding-top:20px;
margin-top:-20px;
float: left;
color:black;
}
#leftBar > ul{
margin-top:-20px;
}
#leftBar > ul > li{
width:100%;
height:50px;
line-height: 50px;
text-align: center;
font-size: 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
cursor: pointer;
-webkit-transition:all 0.2s ease-in-out;
transition:all 0.2s ease-in-out;
}
#leftBar > ul > li:hover{
width:100%;
height:50px;
background-color: navajowhite;
}
.rightCnt{
width:70%;
float: left;
margin-left:10%;
}
svg{
width:100%;
height:100%;
}
.editbtn, .delebtn{
width:20px;
height:20px;
float: right;
border:none;
background:white;
margin:0 10px;
}
.editbtn :hover, .delebtn :hover{
width:25px;
height:25px;
}
.article-content > p{
float: left;
width:70%;
height:20px;
overflow:hidden;
}
.article-content > a{
cursor: pointer;
}
.article-content > p{
margin:10px 0;
}
.article-content > span {
float: right;
margin-left: 10px;
}
.article-content>button{
outline:none;
background:none;
border:none;
color: #FF9800;
}
.article-content > button:hover{
color:#c59a6d;
}
.title{
width:60%;
font-size:20px;
text-align: left;
}
#articles{
position: relative;
}
#articleList{
position:absolute;
width:50%;
}
.lastStep{
width:30px;
height:30px;
}
#writenoticeLi>a{
color:black;
}
#artTitle{
width:100%;
height:auto;
line-height: 50px;
text-align: center;
font-size:24px;
font-weight: bold;
}
#authorName{
width:100%;
height:30px;
margin-top:10px;
line-height: 30px;
text-align: right;
font-style: italic;
}
#content{
width:100%;
margin-top:50px;
background-color: #eaeaea;
}
#addScore{
width:100%;
height:60px;
line-height:60px;
}
#user_score_List,#score_history_List{
display: block;
height:35px;
line-height:35px;
font-size: 18px;
float: left;
margin:10px;
cursor: pointer;
}
#user_score_List{
border-right:solid 3px black;
padding-right:20px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.user_score_List{
margin-left:10px;
}
#editScoreBtn{
width:30px;
height:30px;
margin-top: 10px;
margin-left: 20px;
float:right;
margin-right:10%;
}
#addScoreForm{
width:100%;
height:50px;
-webkit-transition:all 0.2s ease-in-out;
transition:all 0.2s ease-in-out;
}
#addScoreForm > .form-group{
float:left;
margin:10px;
}
.select_0{
width:150px;
}
.select_1{
width:60px;
}
.select_0,.select_1{
height: 34px;
background: transparent;
border:solid 1px #ccc;
}
.addScorebtn{
width: 50px;
height: 34px;
background-color: rgba(0,0,0,0.8);
color: #ff9800;
border-radius: 2px;
}
.list_head,.list_score_body,.list_records_body{
width:100%;
height:45px;
line-height: 45px;
}
.user_score_List>.list_head >ul> li,.list_score_body > li{
width:25%;
float: left;
}
.user_score_List,.score_history_List{
-webkit-transition:all 0.2s ease-in-out;
transition:all 0.2s ease-in-out;
}
.list_records_body > li,.score_history_List>.list_head>ul>li{
width:33%;
float: left;
}
.addOrsub{
width: 30px;
height: 30px;
font-size: 22px;
line-height: 25px;
border: solid 2px #ccc;
border-radius: 15px;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -718,13 +718,19 @@ def admin(request):
if User.objects.last().userID > 0:
users = User.objects.all()
publications = Publications.objects.all()
articles = Articles.objects.filter(isPrivate='1')
for article in articles:
if article.publish == '1':
article.publish = '已发布'
else:
article.publish = '未发布'
for user in users:
if user.identity=='0':
if user.identity == '0':
user.identity = '普通用户'
else:
user.identity = '管理员'
if ScoreRecords.objects.last() is None:
records=0
records = 0
else:
records = ScoreRecords.objects.all()
return render(request,"hunter/admin.html",locals())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment