diff options
Diffstat (limited to 'app/views/welcome')
-rw-r--r-- | app/views/welcome/authenticate.html.erb | 15 | ||||
-rw-r--r-- | app/views/welcome/dashboard.html.erb | 5 | ||||
-rw-r--r-- | app/views/welcome/index.html.erb | 8 |
3 files changed, 28 insertions, 0 deletions
diff --git a/app/views/welcome/authenticate.html.erb b/app/views/welcome/authenticate.html.erb new file mode 100644 index 0000000..548101b --- /dev/null +++ b/app/views/welcome/authenticate.html.erb @@ -0,0 +1,15 @@ +<h1>Authentication#sso_callback</h1> + +<p>Welcome <%= @current_user&.name %>!</p> + +<p>Your Agents: + <ul> + <% @current_user&.agencies&.each do |a| %> + <li><%= a.name %> (<%= a.roles %>)</li> + <% end %> + </ul> +</p> + +<%= p @current_user %> +<%= p @sso.user_info %> +<%= p session %> diff --git a/app/views/welcome/dashboard.html.erb b/app/views/welcome/dashboard.html.erb new file mode 100644 index 0000000..81264e2 --- /dev/null +++ b/app/views/welcome/dashboard.html.erb @@ -0,0 +1,5 @@ +<h1>Welcome <%= h current_user.name %>!</h1> + +<p>Current Agent: <%= current_user&.agencies&.first&.agent&.name %></p> + +<p>Cool, what can we do now?</p> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb new file mode 100644 index 0000000..a1fa276 --- /dev/null +++ b/app/views/welcome/index.html.erb @@ -0,0 +1,8 @@ +<h1>Bienvenue à l'atelier carto d'IN COMMON</h1> + +<% if current_user.present? %> + <p>Hi <%= h current_user.name %>, please <%= link_to 'proceed to your dashboard', url_for(action: 'dashboard') %>.</p> + <p>You may <%= link_to 'sign off', logout_url %>.</p> +<% else %> + <p><%= link_to "S'identifier avec Talk.incommon.cc", '/authenticate' %></p> +<% end %> |