aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/oauth2/resources.html
blob: c52043db4b5d0b434ff6115c06f301524b117fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{%extends "base.html"%}
{%from "oauth2/profile_nav.html" import profile_nav%}
{%block title%}View User{%endblock%}
{%block content%}
<div class="container" style="min-width: 1250px;">
  {{profile_nav("resources", user_privileges)}}
  <h3>Resources</h3>

  {{flash_me()}}

  <div class="container-fluid">
    <div class="row">
      <a href="{{url_for('oauth2.resource.create_resource')}}"
	 class="btn btn-info" title="Create a new resource">
	Create New Resource
      </a>
    </div>

    <div class="row">
      <table class="table">
	<caption>Resources</caption>
	<thead>
	  <tr>
	    <th>Name</th>
	    <th>Category</th>
	  </tr>
	</thead>
	<tbody>
	  {%for resource in resources %}
	  <tr>
	    <td>
	      <a href="{{url_for(
		       'oauth2.resource.view_resource',
		       resource_id=resource.resource_id)}}"
		 title="View resource {{resource.resource_name}}">
		{{resource.resource_name}}
	      </a>
	    </td>
	    <td>{{resource.resource_category.resource_category_key}}</td>
	  </tr>
	  {%else%}
	  <tr>
	    <td colspan="3">
	      <span class="glyphicon glyphicon-warning-sign"></span>&nbsp;
	      <span class="text-warning">
		The user has no access to any resource.
	      </span>
	    </td>
	  </tr>
	  {%endfor%}
	</tbody>
      </table>
    </div>

  </div>

</div>
{%endblock%}