Skip to content

Commit

Permalink
Added markdown documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsons, Adam authored and Parsons, Adam committed Mar 25, 2015
1 parent 1d057a2 commit 731636f
Show file tree
Hide file tree
Showing 17 changed files with 87 additions and 20 deletions.
3 changes: 2 additions & 1 deletion assets/scripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ $(function () {
}
}]
}]
]
],
footer: '<div class="btn-group" role="group"><a class="btn btn-default btn-xs" href="http://daringfireball.net/projects/markdown/basics" role="button" target="_blank">Markdown Help</a><a class="btn btn-default btn-xs" href="http://pythonhosted.org//Markdown/extensions/code_hilite.html#syntax" role="button" target="_blank">Code Highlighting Help</a></div>'
});

$(".threadfix-process").click(function(event) {
Expand Down
6 changes: 6 additions & 0 deletions assets/styles/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
border-bottom-left-radius: $input-border-radius;
border-bottom-right-radius: $input-border-radius;
}

.md-footer {
border-bottom-left-radius: $input-border-radius;
border-bottom-right-radius: $input-border-radius;
}

}

/* Sticky footer */
Expand Down
2 changes: 1 addition & 1 deletion project/boh/static/boh/css/application.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions project/boh/static/boh/js/application.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion project/boh/templates/boh/activity/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h3 class="panel-title">Edit Activity</h3>
</div>
<form method="post" action="{% url 'boh:activity.delete' activity.id %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this activity?');">Delete Activity</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this activity?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Activity</button>
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/application/edit_relation.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3 class="panel-title">Edit Person</h3>
</div>
<form method="post" action="{% url 'boh:application.people.delete' application.id relation.id %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to remove this related person?');">Remove Related Person</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to remove this related person?');"><span class="fa fa-times" aria-hidden="true"></span> Remove Related Person</button>
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/application/settings/danger.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 class="panel-title">Delete Application</h3>
<form method="post" action="{% url 'boh:application.settings.danger' application.id %}">
{% csrf_token %}
<p class="text-muted">Once you delete an application, there is no going back. Please be certain.</p>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this application?');">Delete Application</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this application?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Application</button>
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_staff %}
<li{% if active_top == 'management' %} class="active"{% endif %}><a href="{% url 'boh:management.services' %}"><span class="fa fa-cogs" aria-hidden="true"></span></span><span class="hidden-sm"> Manage</span></a></li>
<li{% if active_top == 'management' %} class="active"{% endif %}><a href="{% url 'boh:management.overview' %}"><span class="fa fa-cogs" aria-hidden="true"></span></span><span class="hidden-sm"> Manage</span></a></li>
{% endif %}
<li class="dropdown{% if active_top == 'user' %} active{% endif %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="fa fa-user" aria-hidden="true"></span> {{ user.first_name }} {{ user.last_name }} <span class="fa fa-caret-down" aria-hidden="true"></span></a>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/engagement/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3 class="panel-title">Edit Engagement</h3>
</div>
<form method="post" action="{% url 'boh:engagement.delete' engagement.id %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this engagement?');">Delete Engagement</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this engagement?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Engagement</button>
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/environment/edit/danger.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 class="panel-title">Delete Environment</h3>
<form method="post" action="{% url 'boh:environment.edit.danger' environment.id %}">
{% csrf_token %}
<p class="text-muted">Once you delete this environment, there is no going back. Please be certain.</p>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this environment?');">Delete Environment</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this environment?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Environment</button>
</form>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions project/boh/templates/boh/management/base_management.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
<h3 class="panel-title">Manage Settings</h3>
</div>
<div class="list-group">
<a href="{% url 'boh:management.overview' %}" class="list-group-item{% if active == 'overview' %} active{% endif %}"><span class="fa fa-home fa-fw" aria-hidden="true"></span> Overview</a>
<a href="#" class="list-group-item{% if active == 'organizations' %} active{% endif %} disabled"><span class="fa fa-building fa-fw" aria-hidden="true"></span> Organizations</a>
<a href="#" class="list-group-item{% if active == 'tags' %} active{% endif %} disabled"><span class="fa fa-tags fa-fw" aria-hidden="true"></span> Application Tags</a>
<a href="#" class="list-group-item{% if active == 'tags' %} active{% endif %} disabled"><span class="fa fa-clock-o fa-fw" aria-hidden="true"></span> Activity Types</a>
<a href="#" class="list-group-item{% if active == 'tags' %} active{% endif %} disabled"><span class="fa fa-cubes fa-fw" aria-hidden="true"></span> Data Elements</a>
<a href="#" class="list-group-item{% if active == 'tags' %} active{% endif %} disabled"><span class="fa fa-umbrella fa-fw" aria-hidden="true"></span> Service Levels</a>
<a href="{% url 'boh:management.services' %}" class="list-group-item{% if active == 'services' %} active{% endif %}"><span class="fa fa-plug fa-fw" aria-hidden="true"></span> Services</a>
<a href="{% url 'boh:management.users' %}" class="list-group-item{% if active == 'users' %} active{% endif %}"><span class="fa fa-users fa-fw" aria-hidden="true"></span> Users</a>
<a href="{% url 'boh:management.services' %}" class="list-group-item{% if active == 'services' %} active{% endif %}"><span class="fa fa-plug fa-fw" aria-hidden="true"></span> Third Party Services</a>
<a href="{% url 'boh:management.users' %}" class="list-group-item{% if active == 'users' %} active{% endif %} disabled"><span class="fa fa-users fa-fw" aria-hidden="true"></span> Users</a>
</div>
</div>
<div class="panel panel-default">
Expand Down
48 changes: 48 additions & 0 deletions project/boh/templates/boh/management/overview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends "boh/management/base_management.html" %}

{% block title %}Manage Settings | Overview{% endblock %}

{% block manage_content %}
<h2 class="no-margin-top">Manage Settings Overview</h2>
<p>Here you will find all the options for configuring and customizing Bag of Holding.</p>

<div class="row">
<!--
<div class="col-sm-6">
<h3><span class="fa fa-building fa-fw" aria-hidden="true"></span> Organizations</h3>
<a class="btn btn-primary" href="#" role="button">Manage Organizations</a>
</div>
<div class="col-sm-6">
<h3><span class="fa fa-tags fa-fw" aria-hidden="true"></span> Application Tags</h3>
<a class="btn btn-primary" href="#" role="button">Manage Application Tags</a>
</div>
<div class="col-sm-6">
<h3><span class="fa fa-clock-o fa-fw" aria-hidden="true"></span> Activity Types</h3>
<a class="btn btn-primary" href="#" role="button">Manage Activity Types</a>
</div>
<div class="col-sm-6">
<h3><span class="fa fa-cubes fa-fw" aria-hidden="true"></span> Data Elements</h3>
<a class="btn btn-primary" href="#" role="button">Manage Data Elements</a>
</div>
<div class="col-sm-6">
<h3><span class="fa fa-umbrella fa-fw" aria-hidden="true"></span> Service Levels</h3>
<a class="btn btn-primary" href="#" role="button">Manage Service Levels</a>
</div>
-->
<div class="col-sm-6">
<h3><span class="fa fa-plug fa-fw" aria-hidden="true"></span> Third Party Services</h3>
<a class="btn btn-primary" href="{% url 'boh:management.services' %}" role="button">Manage Third Party Services</a>
</div>
<!--
<div class="col-sm-6">
<h3><span class="fa fa-users fa-fw" aria-hidden="true"></span> Users</h3>
<a class="btn btn-primary" href="#" role="button">Manage Users</a>
</div>
-->
<div class="col-sm-6">
<h3><span class="fa fa-user-secret fa-fw" aria-hidden="true"></span> Django Admin</h3>
<a class="btn btn-primary" href="{% url 'admin:index' %}" target="_blank" role="button">View Django Admin</a>
</div>
</div>

{% endblock manage_content %}
2 changes: 1 addition & 1 deletion project/boh/templates/boh/management/threadfix/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ <h3 class="panel-title">Edit ThreadFix Service</h3>
</form>
<form method="post" action="{% url 'boh:management.services.threadfix.delete' threadfix.id %}">
{% csrf_token %}
<button class="btn btn-danger pull-right" type="submit" onclick="return confirm('Are you sure want to delete this ThreadFix service?');">Delete ThreadFix Service</button>
<button class="btn btn-danger pull-right" type="submit" onclick="return confirm('Are you sure want to delete this ThreadFix service?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete ThreadFix Service</button>
</form>
{% endblock manage_content %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 class="panel-title">Delete Organization</h3>
<form method="post" action="{% url 'boh:organization.settings.danger' organization.id %}">
{% csrf_token %}
<p class="text-muted">Once you delete an organization, there is no going back. Please be certain.</p>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this organization?');">Delete Organization</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this organization?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Organization</button>
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/boh/templates/boh/person/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3 class="panel-title">Edit {{ person.first_name }} {{ person.last_name }}</h3>
<div class="col-md-4">
<form method="post" action="{% url 'boh:person.delete' person.id %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this person?');">Delete Person</button>
<button class="btn btn-danger" type="submit" onclick="return confirm('Are you sure want to delete this person?');"><span class="fa fa-trash-o" aria-hidden="true"></span> Delete Person</button>
</form>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions project/boh/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
url(r'^reports/$', views.dashboard_reports, name='dashboard.reports'),

# Management
url(r'^manage/$', views.management_overview, name='management.overview'),
url(r'^manage/services/$', views.management_services, name='management.services'),
url(r'^manage/services/threadfix/add', views.management_services_threadfix_add, name='management.services.threadfix.add'),
url(r'^manage/services/threadfix/(?P<threadfix_id>\d+)/edit', views.management_services_threadfix_edit, name='management.services.threadfix.edit'),
Expand Down
14 changes: 12 additions & 2 deletions project/boh/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

# Dashboard


@login_required
@require_http_methods(['GET'])
def dashboard_personal(request):
Expand Down Expand Up @@ -141,12 +140,23 @@ def dashboard_reports(request):

# Management

@login_required
@staff_member_required
@require_http_methods(['GET'])
def management_overview(request):
threadfix_services = ThreadFix.objects.all()

return render(request, 'boh/management/overview.html', {
'threadfix_services': threadfix_services,
'active_top': 'management',
'active': 'overview'
})


@login_required
@staff_member_required
@require_http_methods(['GET'])
def management_services(request):

threadfix_services = ThreadFix.objects.all()

return render(request, 'boh/management/services.html', {
Expand Down

0 comments on commit 731636f

Please sign in to comment.