diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/core/form.html | 13 | ||||
-rw-r--r-- | templates/core/list.html | 7 | ||||
-rw-r--r-- | templates/default.html | 28 | ||||
-rw-r--r-- | templates/login.html | 10 | ||||
-rw-r--r-- | templates/manage.html | 70 |
5 files changed, 117 insertions, 11 deletions
diff --git a/templates/core/form.html b/templates/core/form.html new file mode 100644 index 0000000..4c1fb71 --- /dev/null +++ b/templates/core/form.html @@ -0,0 +1,13 @@ +{% extends "manage.html" %} +{% load bootstrap3 %} +{% load i18n %} + +{% block detail_view %} + <form method="post"> + {% csrf_token %} + {% bootstrap_form form %} + {% buttons %} + <button type="submit" class="btn btn-primary">{% trans "Save" %}</button> + {% endbuttons %} + </form> +{% endblock detail_view %} diff --git a/templates/core/list.html b/templates/core/list.html new file mode 100644 index 0000000..87428c0 --- /dev/null +++ b/templates/core/list.html @@ -0,0 +1,7 @@ +{% extends "manage.html" %} + +{% block detail_list %} +{% for i in object_list %} + <li><a href="{{ i.get_absolute_url }}">{{ i }}</a></li> +{% endfor %} +{% endblock detail_list %} diff --git a/templates/default.html b/templates/default.html index ca5829a..b9c5ee0 100644 --- a/templates/default.html +++ b/templates/default.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="{{ STATIC_URL }}bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> + <link href="{{ STATIC_URL }}bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" media="screen"> <link href="{{ STATIC_URL }}css/signin.css" rel="stylesheet" media="screen"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> @@ -13,16 +14,29 @@ <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> - <body> - <div class="container"> - + <body style="padding-top:50px"> + <div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> + <div class="container-fluid"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div class="collapse navbar-collapse"> + {% block toolbar %} + {% endblock toolbar %} + </div><!--/.nav-collapse --> + </div> + </div> + <div class="container-fluid"> {% block main %} - {% endblock main %} - - </div> <!-- /container --> + </div><!-- /container --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> - <script src="https://code.jquery.com/jquery.js"></script> + <script src="{{ STATIC_URL }}js/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="{{ STATIC_URL }}bootstrap/js/bootstrap.min.js"></script> </body> diff --git a/templates/login.html b/templates/login.html index 2167d15..35479e7 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,10 +1,12 @@ {% extends "default.html" %} +{% load bootstrap3 %} +{% load i18n %} {% block main %} - <form class="form-signin" method="post"> + <form class="form-signin" method="post" action="#"> {% csrf_token %} - <h2 class="form-signin-heading">Please sign in</h2> - {{ form.as_p }} - <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> + <h2 class="form-signin-heading">{% trans "Please sign in" %}</h2> + {% bootstrap_form form %} + <button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Sign in" %}</button> </form> {% endblock main %} diff --git a/templates/manage.html b/templates/manage.html index 67b0352..a463109 100644 --- a/templates/manage.html +++ b/templates/manage.html @@ -1 +1,71 @@ {% extends "default.html" %} +{% load i18n %} + +{% block toolbar %} + <ul class="nav navbar-nav" style="margin-right:130px"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-file"></span> <b class="caret"></b></a> + <ul class="dropdown-menu"> + {% if request.user.is_superuser %} + <li><a href="{% url 'core-add_site' %}">{% trans "Add Provider" %}</a></li> + <li><a href="{% url 'core-add_user' %}">{% trans "Add User" %}</a></li> + <li><a href="{% url 'core-add_article' %}">{% trans "Add Article" %}</a></li> + {% endif %} + {% if request.user.is_staff %} + <li><a href="{% url 'issues-add_issue' %}">{% trans "Add Issue" %}</a></li> + {% endif %} + </ul> + </li> + </ul> + {% block toolbar_buttons %} + <a class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-plus"></span> asd</a> + {% endblock toolbar_buttons %} + <ul class="nav navbar-nav navbar-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ request.user }} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">Action</a></li> + <li><a href="#">Another action</a></li> + <li><a href="#">Something else here</a></li> + <li class="divider"></li> + <li><a href="{% url 'core-logout' %}">Sign Out</a></li> + </ul> + </li> + </ul> +{% endblock toolbar %} + +{% block main %} +<div id="sidebar" style="position:fixed;width:200px;height:100%;background-color:#cacaca;border-right:1px solid #aaa"> + <ul class="nav nav-stacked nav-collapse"> + {% block sidebar_menu %} + {% if request.user.is_superuser %} + <li class="active"><a href="{% url 'core-list_sites' %}"><span class="glyphicon glyphicon-briefcase"></span> {% trans "Service Providers" %}</a></li> + <li><a href="{% url 'core-list_users' %}"><span class="glyphicon glyphicon-user"></span> {% trans "Users" %}</a></li> + <li><a href="{% url 'core-list_docs' %}"><span class="glyphicon glyphicon-file"></span> {% trans "Articles" %}</a></li> + {% endif %} + <li class="divider"></li> + {% if request.user.is_staff %} + <li><a href="{% url 'issues-list_issues' %}"><span class="glyphicon glyphicon-cog"></span> {% trans "Troubleshooting" %}</a></li> + {% endif %} + {% endblock sidebar_menu %} + </ul> +</div> + +<div id="detail" style="margin-left:200px"> + <div class="container"> + <div class="col-md-4"> + <ul class="nav nav-pills nav-stacked"> + {% block detail_list %} + {% for i in object_list %} + <li><a href="{{ i.get_absolute_url }}">{{ i }}</a></li> + {% endfor %} + {% endblock detail_list %} + </ul> + </div> + <div class="col-md-8"> + {% block detail_view %} + {% endblock detail_view %} + </div> + </div> +</div> +{% endblock main %} |