initial commit

This commit is contained in:
Senad Uka
2013-12-09 03:23:49 +01:00
parent 9582c13e0c
commit e8751fa215
204 changed files with 6675 additions and 41 deletions

View File

@@ -0,0 +1,9 @@
<div class="puzhome">
<h1> Najnoviji uspjesi</h1>
<% @guesses.each do |guess| %>
<div><%= guess.created_at_formatted %><h3> <%= link_to( guess.username, users_url + "?username=" + guess.username.to_s) %>: <%= guess.definition %></h3> </div>
<% end %>
</div>

View File

@@ -0,0 +1,4 @@
json.array!(@guesses) do |guess|
json.extract! guess, :username, :definition
json.url guess_url(guess, format: :json)
end

View File

@@ -0,0 +1 @@
Nothing to see here - move along!

View File

@@ -0,0 +1,3 @@
json.extract! guess, :username, :definition

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en" itemscope itemtype="http://schema.org/Organization">
<head>
<meta charset="utf-8">
<title>Rijeci</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<div class="main">
<div class="topnav">
<h1 class="title"></h1>
<h1 class="titlenum"></h1>
</div>
<div class="content">
<%= yield %>
</div>
<div class="footer">
<a href="http://www.islambosna.ba"><img src="http://www.islambosna.ba/wp-content/uploads/2013/06/logotip_noba_520t.png" /></a>
Developed by Ahmed Islamovic.
</div>
</div>
<a class="forkme" href="https://github.com/senaduka/flip"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<%= form_for(@result) do |f| %>
<% if @result.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@result.errors.count, "error") %> prohibited this result from being saved:</h2>
<ul>
<% @result.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id %><br>
<%= f.number_field :user_id %>
</div>
<div class="field">
<%= f.label :time %><br>
<%= f.text_field :time %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing result</h1>
<%= render 'form' %>
<%= link_to 'Show', @result %> |
<%= link_to 'Back', results_path %>

View File

@@ -0,0 +1,29 @@
<h1>Listing results</h1>
<table>
<thead>
<tr>
<th>User</th>
<th>Time</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @results.each do |result| %>
<tr>
<td><%= result.user_id %></td>
<td><%= result.time %></td>
<td><%= link_to 'Show', result %></td>
<td><%= link_to 'Edit', edit_result_path(result) %></td>
<td><%= link_to 'Destroy', result, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Result', new_result_path %>

View File

@@ -0,0 +1,4 @@
json.array!(@results) do |result|
json.extract! result, :user_id, :time
json.url result_url(result, format: :json)
end

View File

@@ -0,0 +1,5 @@
<h1>New result</h1>
<%= render 'form' %>
<%= link_to 'Back', results_path %>

View File

@@ -0,0 +1,14 @@
<p id="notice"><%= notice %></p>
<p>
<strong>User:</strong>
<%= @result.user_id %>
</p>
<p>
<strong>Time:</strong>
<%= @result.time %>
</p>
<%= link_to 'Edit', edit_result_path(@result) %> |
<%= link_to 'Back', results_path %>

View File

@@ -0,0 +1 @@
json.extract! @result, :user_id, :time, :created_at, :updated_at

View File

@@ -0,0 +1,11 @@
<div class="puzhome">
<h1> Najnovije pobjede</h1>
<% i = 1 %>
<% @solutions.each do |solution| %>
<div><%=i%>. <%= solution.created_at_formatted %> <%= link_to( solution.username, users_url + "?username=" + solution.username) %>: <%= solution.number %> u vremenu <%=solution.time%></div>
<% i += 1%>
<% end %>
</div>

View File

@@ -0,0 +1,4 @@
json.array!(@solutions) do |solution|
json.extract! solution, :number, :time, :username
json.url solution_url(solution, format: :json)
end

View File

@@ -0,0 +1 @@
json.extract! @solution, :number, :time, :username, :created_at, :updated_at

View File

@@ -0,0 +1,19 @@
<div class="puzhome">
<h1> Najnovije pobjede</h1>
<% i = 1 %>
<% @solutions.each do |solution| %>
<div><%=i%>. <%= solution.created_at_formatted %> <%= solution.username %>: <%= solution.number %> u vremenu <%=solution.time%></div>
<% i += 1%>
<% end %>
<h1> Najnoviji uspjesi</h1>
<% @guesses.each do |guess| %>
<div><%= guess.created_at_formatted %><h3><%= guess.username %>: <%= guess.definition %></h3> </div>
<% end %>
</div>