-
Notifications
You must be signed in to change notification settings - Fork 0
/
replay_index.erb
165 lines (141 loc) · 5.71 KB
/
replay_index.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='ja' lang='ja'>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<link rel="shortcut icon" type="image/x-icon" href="<%= CFG[:static_url] %>favicon.ico" />
<link rel="stylesheet" type="text/css" href="<%= CFG[:static_url] %>css/main.css" />
<link rel="stylesheet" type="text/css" href="<%= CFG[:static_url] %>css/3cols_sides-width-fixed.css" />
<script type="text/javascript" charset="utf-8" src="<%= CFG[:static_url] %>js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="<%= CFG[:static_url] %>js/jsdeferred.jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="<%= CFG[:static_url] %>js/jquery.tablesorter.js"></script>
<script type="text/javascript" charset="utf-8" src="<%= CFG[:static_url] %>js/utils.js"></script>
<script type="text/javascript" charset="utf-8" src="<%= CFG[:static_url] %>js/search.js"></script>
<%# <!--[if IE]><script type="text/javascript" src="<%CFG[:static_url]%>js/excanvas.js"></script><![endif]--> %>
<title>リプレイファイル一覧(作成中) - Tenco!</title>
<script type="text/javascript">
//<![CDATA[
// ロード時実行
$(document).ready(
function(){
// リプレイテーブルソート機能追加
$("#replays").addClass("tablesorter");
$("#replays").tablesorter({
textExtraction: function(node) {
return node.getAttribute('title') || node.innerHTML;
}
});
// javascript 利用部 HTML
// IEだとEnterキーでなぜかボタンをクリックするので
// formタグで抑制する
var search_tool_html = "";
search_tool_html += "<span class='input_set'>\n";
search_tool_html += "<span id='search_tool_msg' class='suppli msg'>search:</span>\n";
search_tool_html += "<form action='' method='post' onSubmit='return false;' style='display:inline'>\n";
search_tool_html += "<input id='search_str' name='search_str' tabindex='1' type='text' size='16' /> <button id='search_button' tabindex='2'>検索</button>\n";
search_tool_html += "</form>\n";
search_tool_html += "</span>\n";
$("#search_tool").html(search_tool_html);
// 検索ボタンに実行関数を紐付け
$("#search_button").click(
function() {
(function() {search("#replays > tbody > tr", "table-row", "#search_str")})();
}
);
// 検索語入力欄でエンターでも実行
$("#search_str").keyup(
function(evt) {
if (evt.which == 13) {
$("#search_button").click();
}
}
);
}
);
// ]]>
</script>
</head>
<body>
<div id="container">
<div id="header">
<h1><a href="<%= CFG[:top_url] %>"><img alt="Tenco!" src='<%= CFG[:static_url] %>images/Tenco.gif' width='<%= 366/3 %>' height='<%= 126/3 %>' /></a></h1>
リプレイファイル一覧ページ α1(2013/05/05)
<p id="meta_info">
<%= now.strftime('%m/%d %H:%M') %> に作成(毎時0分以降に再生成)<br />
</p>
</div>
<%#
<div class="menu">
<ul>
<li><a href=""></a></li>
</ul>
</div>
-%>
<hr />
<div id="wrapper">
<div id="main_wrapper">
<div id="main">
<div class="section">
<h2>リプレイファイル一覧(作成中)</h2>
<noscript class="suppli msg">
javascript を ON にすると、検索・復号ができます
</noscript>
<div id="search_tool" style="text-align:left">
</div>
<table id="replays" style="font-size:80%">
<thead>
<tr>
<th>ゲーム</th>
<th>キャラ1</th>
<th>キャラ2</th>
<th>リプレイファイル</th>
</tr>
</thead>
<tbody>
<%- replays.each do |replay| -%>
<%- tr = track_records[replay.track_record_id.to_i] -%>
<%- gts = game_type1s[replay.game_id.to_i] -%>
<%- game = games[replay.game_id.to_i] -%>
<tr>
<td title="<%= game.id.to_i %>"><%= h game.name %></td>
<td title="<%= tr.player1_type1_id.to_i %>"><img src="<%= "#{CFG[:static_url]}images/game/#{game.id.to_i}/game_#{game.id.to_i}_type1_#{tr.player1_type1_id.to_i}_icon01.png" %>" alt="" width="24px" height="24px" /> <%= h gts[tr.player1_type1_id.to_i].name %></td>
<td title="<%= tr.player2_type1_id.to_i %>"><img src="<%= "#{CFG[:static_url]}images/game/#{game.id.to_i}/game_#{game.id.to_i}_type1_#{tr.player2_type1_id.to_i}_icon01.png" %>" alt="" width="24px" height="24px" /> <%= h gts[tr.player2_type1_id.to_i].name %></td>
<td>
<%- if data = account_twitter_data[replay.player1_account_id.to_i] -%>
<%# icon_image_html(data.first) -%>
<%- end -%>
<a href="<%= CFG[:replay_url] %><%= u_except_slash replay.relative_file_path %>">
<%= h("#{tr.play_timestamp.strftime("%Y%m%d_%H%M%S")}_#{gts[tr.player1_type1_id.to_i].name}_#{gts[tr.player2_type1_id.to_i].name}.rep") %>
</a>
</td>
</tr>
<%- end -%>
</tbody>
</table>
</div>
</div><%# main %>
</div><%# main_wrapper %>
<div id="profile">
<h3>説明</h3>
<p>
クライアントから自動的にランダムでリプレイファイルをアップロードできるようにする予定です。<br />
ただいま準備中です。
</p>
<p>
プレイヤー名は表示しないようにするかもしれません。いろいろ検討中です‥‥。<br />
</p>
</div>
</div><%# wrapper %>
<div id="side" class="tools tools_right">
<h2>リンク</h2>
<%= link_html %>
</div>
<hr />
<div id="footer">
<%= footer_html %>
</div>
</div>
</body>
</html>