Display possible content.jsons on sidebar
This commit is contained in:
parent
11f84d7bac
commit
f405e702ba
3 changed files with 25 additions and 2 deletions
|
@ -389,6 +389,19 @@ class UiWebsocketPlugin(object):
|
|||
body.append("""
|
||||
<li>
|
||||
<label>Content publishing</label>
|
||||
""")
|
||||
|
||||
# Choose content you want to sign
|
||||
contents = ["content.json"]
|
||||
contents += site.content_manager.contents.get("content.json", {}).get("includes", {}).keys()
|
||||
if len(contents) > 1:
|
||||
body.append("<div class='contents'>Choose: ")
|
||||
for content in contents:
|
||||
content = cgi.escape(content, True)
|
||||
body.append("<a href='#{content}' onclick='$(\"#input-contents\").val(\"{content}\"); return false'>{content}</a> ".format(**locals()))
|
||||
body.append("</div>")
|
||||
|
||||
body.append("""
|
||||
<input type='text' class='text' value="content.json" id='input-contents' style='width: 201px'/>
|
||||
<a href='#Sign' class='button' id='button-sign'>Sign</a>
|
||||
<a href='#Publish' class='button' id='button-publish'>Publish</a>
|
||||
|
|
|
@ -103,4 +103,9 @@
|
|||
/* Globe */
|
||||
.globe { width: 360px; height: 360px }
|
||||
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
||||
.globe.error { text-align: center; padding-top: 156px; box-sizing: border-box; opacity: 0.2; }
|
||||
.globe.error { text-align: center; padding-top: 156px; box-sizing: border-box; opacity: 0.2; }
|
||||
|
||||
/* Sign publish */
|
||||
.contents { background-color: #3B3B3B; color: white; padding: 7px 10px; font-family: Consolas; font-size: 11px; display: inline-block; margin-bottom: 6px; }
|
||||
.contents a { color: white }
|
||||
.contents a:active { background-color: #6B6B6B }
|
|
@ -157,4 +157,9 @@
|
|||
/* Globe */
|
||||
.globe { width: 360px; height: 360px }
|
||||
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
||||
.globe.error { text-align: center; padding-top: 156px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; opacity: 0.2; }
|
||||
.globe.error { text-align: center; padding-top: 156px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; opacity: 0.2; }
|
||||
|
||||
/* Sign publish */
|
||||
.contents { background-color: #3B3B3B; color: white; padding: 7px 10px; font-family: Consolas; font-size: 11px; display: inline-block; margin-bottom: 6px; }
|
||||
.contents a { color: white }
|
||||
.contents a:active { background-color: #6B6B6B }
|
Loading…
Reference in a new issue