/
application.html.erb
72 lines (65 loc) · 2.33 KB
/
application.html.erb
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rest OAuth 2.0 Server</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<link rel="stylesheet" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css">
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
<%= csrf_meta_tag %>
</head>
<body onload="prettyPrint()">
<div class="container">
<% unless request.path == oauth_authorization_path %>
<a class="ribbon" href="https://github.com/lelylan/rest-oauth2-server" target="_blank"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div class="header">
<h1>Rest OAuth 2.0 Server</h1>
<p>
<b><a href="https://github.com/lelylan/rest-oauth2-server" title="GitHub repository">Rest OAuth 2.0 Server</a>
let you open up your API and manage end-user authentication and client application authorization
implementing the OAuth 2.0 Specifications (draft 13). Read more on <a href="https://github.com/lelylan/rest-oauth2-server" title="GitHub readme">Github</a>
</b>
</p>
</div>
<% end %>
<div class="navigation">
<% if current_user %>
<div style="float: right">
Logged in as <%= current_user.email %>.
<%= link_to "Log out", log_out_path %>
</div>
<div>
<%= link_to("Home", current_user) %> |
<%= link_to("Accesses", accesses_path) %> |
<%= link_to("Clients", clients_path) %>
<% if current_user.admin? %> |
<%= link_to("Users", users_path) %> |
<%= link_to("Scopes", scopes_path) %>
<% end %>
</div>
<% else %>
<%= link_to "Sign up", sign_up_path %> or
<%= link_to "log in", log_in_path %>
<% end %>
</div>
<br/>
<% if flash.notice %>
<div class="flash_notice">
<%= flash.notice %>
</div>
<% end %>
<% if flash.alert %>
<div class=flash_alert>
<%= flash.alert %>
<% if @info %>
<p>Additional information:
<%= @info.to_json%>
</p>
<% end %>
</div>
<% end %>
<%= yield %>
</div>
</body>
</html>