Permalink
Browse files

add menu, add nickname alias

  • Loading branch information...
1 parent 747c85e commit a1de32f8cec63721f6c3595613a6dd2d10bd4447 @withgod committed Mar 28, 2012
View
3 app/assets/javascripts/application.js
@@ -12,4 +12,7 @@
//
//= require jquery
//= require jquery_ujs
+//= require bootstrap-twipsy
+//= require bootstrap-popover
+//= require bootstrap-modal
//= require_tree .
View
3 app/assets/javascripts/user.js.coffee
@@ -1,3 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
6 app/views/layouts/application.html.erb
@@ -8,8 +8,12 @@
<%= csrf_meta_tags %>
</head>
<body>
-
<div class="container">
+ <ul class="pills">
+ <li><a href="/">top</a></li>
+ <li><a href="/user/index">users</a></li>
+ </ul>
+
<%= yield %>
</div>
View
13 app/views/user/detail.html.erb
@@ -1,8 +1,17 @@
<h1>User#detail</h1>
-<a href="/user/index">user index</a>
<h2>summary</h2>
<dl>
- <dt>your id</dt>
+ <dt>nickname</dt>
+ <dd>
+ <%=@user.last_nick%>
+ <a href="javascript:void(0)" rel="popover" title="other nicknames">alias</a>
+ <span style="display:none" id="nicknames">
+ <% @user.nicknames.each do|nick| %>
+ <%= nick.nickname%><br>
+ <% end %>
+ </span>
+ </dd>
+ <dt>steam id</dt>
<dd><%=params[:id]%>/<%=@user[:steamid]%></dd>
<dt>total jump challenge</dt>
<dd><%= @user.results.size%></dd>
View
2 app/views/user/index.html.erb
@@ -1,6 +1,6 @@
<h1>User#index</h1>
<h2> total jump ranking </h2>
-
+total <%= @users.size %> user
<ul>
<% @users.sort {|a, b| b.total_count<=>a.total_count}.each do|user| %>
<li>[<%= user.total_count%>] <a href="/user/<%= user.steamcomid%>"><%= user.last_nick%></a>

0 comments on commit a1de32f

Please sign in to comment.