Skip to content

Commit

Permalink
Create tile template, wip. #379
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel.metzenthin committed Jan 18, 2018
1 parent 81e5dd4 commit 517d4c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/views/application/_tile_template.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div>
<img src="<%= image_url %>" />
<h5> <%= title %></h5>
<span> <% description %></span>
</div>
5 changes: 5 additions & 0 deletions app/views/teams/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<% end %>
</tbody>
</table>

<% @teams.each do |team| %>
<% render partial: 'application/tile_template', title: team.name, image_url: 'https://owncloud.hpi.de/index.php/s/45SBYQMw1jnN9UM/download', description: 'Test' %>
<% end %>

<% if can? :create, Team %>
<%= link_to t('.new', :default => t("helpers.links.new")),
new_team_path,
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
t.text "description"
t.string "kind_of_sport"
t.boolean "private"
t.boolean "single", default: false
t.text "avatar_data"
t.boolean "single", default: false
end

create_table "users", force: :cascade do |t|
Expand Down

0 comments on commit 517d4c8

Please sign in to comment.