Commit 2bade347 by tady

ログアウトボタン設置

parent 14aaf278
...@@ -13,8 +13,19 @@ ...@@ -13,8 +13,19 @@
</head> </head>
<body> <body>
<% if notice %><p class="notice"><%= notice %></p><% end %> <% if notice %>
<% if alert %><p class="alert"><%= alert %></p><% end %> <script type="text/javascript">
alert('<%= notice %>');
</script>
<!-- <p class="notice"><%= notice %></p> -->
<% end %>
<% if alert %>
<script type="text/javascript">
alert('<%= alert %>');
</script>
<!-- <p class="notice"><%= notice %></p> -->
<p class="alert"><%= alert %></p>
<% end %>
<%= yield %> <%= yield %>
......
<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container"> <div class="container">
<!-- Brand and toggle get grouped for better mobile display --> <!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
...@@ -11,7 +12,6 @@ ...@@ -11,7 +12,6 @@
<a class="navbar-brand" href="<%= root_path %>">Rendezvous</a> <a class="navbar-brand" href="<%= root_path %>">Rendezvous</a>
</div> </div>
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form id="app-search-form" class="navbar-form navbar-left" role="search" action="<%= root_path %>"> <form id="app-search-form" class="navbar-form navbar-left" role="search" action="<%= root_path %>">
...@@ -24,13 +24,16 @@ ...@@ -24,13 +24,16 @@
</span> </span>
</div> </div>
</form> </form>
<%= form_tag(destroy_user_session_path, :method => :delete, class: 'navbar-form navbar-right') do %>
<%= submit_tag 'SignOut', class: 'btn btn-default' %>
<% end %>
<div class="navbar-right"> <div class="navbar-right">
<a href="<%= new_post_path %>" class="btn btn-primary navbar-btn">Post&nbsp;&nbsp; <a href="<%= new_post_path %>" class="btn btn-primary navbar-btn">Post&nbsp;&nbsp;
<span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon glyphicon-pencil"></span>
</a> </a>
<a href="#" class="btn btn-default navbar-btn">
<span class="glyphicon glyphicon-wrench"></span>
</a>
<img src="<%= current_user.image_url %>" width="25" height="25"> <img src="<%= current_user.image_url %>" width="25" height="25">
<%= current_user.name %> <%= current_user.name %>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment