{% extends 'jinja_master/master.html' %}
{% block title %}{{neighborhood.name}} / Overview{% endblock %}
{% block header %}Administration Overview for {{neighborhood.name}}{% endblock %}
{% macro custom_color(number) %}
<li>
<label>Custom Color {{number}}</label>
<div class="editable viewing">
<div class="viewer">{{neighborhood.theme and neighborhood.theme['color%s' % number] or 'None'}}</div>
<div class="editor">
<input name="color{{number}}" value="{{neighborhood.theme and neighborhood.theme['color%s' % number] or ''}}"/>
</div>
</div>
</li>
<hr/>
{% endmacro %}
{% block nav_menu %}
{% include 'jinja_master/neigh_nav_menu.html' %}
{% endblock %}
{% block top_nav %}
{% include 'jinja_master/neigh_top_nav.html' %}
{% endblock %}
{% block content %}
<form method="POST" action="update" enctype="multipart/form-data">
<ol>
<li>
<label>Name</label>
<div class="editable viewing span-15 last">
<div class="viewer">{{neighborhood.name}}</div>
<div class="editor">
<input name="name" value="{{neighborhood.name}}"/>
</div>
</div>
</li>
<hr/>
<li>
<label>Redirect</label>
<div class="editable viewing span-15 last">
<div class="viewer">{{neighborhood.redirect}}</div>
<div class="editor">
<input name="redirect" value="{{neighborhood.redirect}}"/>
</div>
</div>
</li>
<hr/>
<li>
<label>Home Content<br/>(HTML)</label>
<div class="editable viewing span-15 last">
{% if neighborhood.homepage %}
<div class="viewer">{{neighborhood.homepage}}</div>
{% else %}
<div class="viewer">None</div>
{% endif %}
<div class="editor multiline">{{c.markdown_editor.display(name='homepage', value=neighborhood.homepage)}}</div>
</div>
</li>
<hr/>
<li>
<label>Allow Browsing</label>
<div class="editable viewing span-15 last">
<div class="viewer">{{neighborhood.allow_browse}}</div>
<div class="editor">
<input type="checkbox" name="allow_browse" {% if neighborhood.allow_browse %}checked="checked"{% endif %}/>
</div>
</div>
</li>
<hr/>
<li>
<div class="span-18 last">
Custom colors override the default theme for your neighborhood.
</div>
</li>
<li>
<label>Custom Color 1</label>
<div class="editable viewing span-15 last">
<div class="viewer">{{neighborhood.theme and neighborhood.theme.color1 or 'None'}}</div>
<div class="editor">
<input name="color1" value="{{neighborhood.theme and neighborhood.theme.color1 or ''}}"/>
</div>
</div>
</li>
<hr/>
{{custom_color(2)}}
{{custom_color(3)}}
{{custom_color(4)}}
{{custom_color(5)}}
{{custom_color(6)}}
<li>
<label>Custom CSS</label>
<div class="editable viewing span-15 last">
{% if neighborhood.css %}
<div class="viewer"><pre>{{neighborhood.css}}</pre></div>
{% else %}
<div class="viewer">No CSS has been created</div>
{% endif %}
<div class="editor multiline">
<textarea name="css">{{neighborhood.css}}</textarea>
</div>
</div>
</li>
<hr/>
<li>
<label>Icon</label>
<div class="editable viewing span-15 last">
{% if neighborhood.icon %}
<div class="viewer"><img src="{{neighborhood.url()}}/icon"/></div>
{% else %}
<div class="viewer">No icon has been uploaded</div>
{% endif %}
<div class="editor">
{{lib.file_field('icon', '')}}
</div>
</div>
</li>
<hr/>
<li>
<label> </label>
<input type="submit" value="Save"/>
</li>
</ol>
</form>
{% endblock %}