Skip to content

Commit

Permalink
fix admin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
hggq committed Dec 1, 2023
1 parent 661c9af commit d6bd5da
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions controller/src/admin/topics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ std::string admin_addtopicpost(std::shared_ptr<httppeer> peer)
}

topicm.setMemo(client.post["memo"].as_string());
topicm.setCateid(client.post["topictype"].to_int());
topicm.setUrlpath(client.post["urlpath"].as_string());
topicm.setParentid(client.post["parentid"].to_int());
topicm.setUserid(0);
Expand Down
24 changes: 23 additions & 1 deletion view/admin/martopic.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,29 @@ <h5 class="card-title mt-2">栏目管理</h5>
<%c echo<<a.second["urlpath"].as_string(); %>
</td>
<td>
<%c echo<<a.second["cateid"].as_string(); %>
<%c
switch(a.second["cateid"].to_int())
{
case 0:
echo<<"图文内容";
break;
case 1:
echo<<"单页图文";
break;
case 2:
echo<<"多页图文";
break;
case 3:
echo<<"单页倒叙";
break;
case 4:
echo<<"文档目录";
break;
case 13:
echo<<"博客类型";
break;
}
%>
</td>
<td>
<input type="text" class="form-inline topicsort col-md-3" id="title_<%c echo<<a.second["id"].to_string(); %>" name="title_<%c echo<<a.second["id"].to_string(); %>" value="<%c echo<<a.second["sortid"].to_string(); %>" onchange="updatetopic(<%c echo<<a.second["id"].to_string(); %>,this.value)">
Expand Down

0 comments on commit d6bd5da

Please sign in to comment.