Created
May 20, 2014 21:02
-
-
Save anonymous/edc123919bc0fb51536c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% provide(:title, "Meetup Group") %> | |
| <div class="row-fluid"> | |
| <div class="span4 offset1"> | |
| <h2>Topic</h2> | |
| <p><%= @group.topic %></p> | |
| </div> | |
| <div class="span4 offset2"> | |
| <h3>Home Town</h3> | |
| <p><%= @group.home_town %></p> | |
| </div> | |
| </div> | |
| <%if @members.count>0%> | |
| <div class="row-fluid"> | |
| <div class="span11 offset1"> | |
| <h3>Members:</h3> | |
| </div> | |
| </div> | |
| <div class="row-fluid"> | |
| <% @members.each do |m| %> | |
| <div class="span2 offset1"> | |
| <%=m.name%> | |
| </div> | |
| <div class="span2 offset1"> | |
| <%= link_to "View", user_path %> | |
| </div> | |
| <%end%> | |
| </div> | |
| <%else%> | |
| <div class="row-fluid"> | |
| <div class="span11 offset1"> | |
| <h4>There is no members of this group yet</h4> | |
| </div> | |
| </div> | |
| <%end%> | |
| <% if @group.activities.count > 0 %> | |
| <div class="row-fluid"> | |
| <h3>Activities: </h3> | |
| <% @group.activities.each do |activity| %> | |
| <strong>Name:</strong> | |
| <%= activity.name %><br/> | |
| <br/> | |
| <%= image_tag(activity.image_url, :size => '250x250') %> | |
| <br/> | |
| <strong>Location</strong> | |
| <%= activity.location %><br/> | |
| <strong>Duration:</strong><br/> | |
| <%= activity.start_date %><br/> | |
| <%= activity.end_date %><br/> | |
| <strong>Description</strong> | |
| <%= activity.description %><br/> | |
| <strong>Votes</strong> | |
| <%= pluralize(activity.votes.count, "vote") %> | |
| <%= button_to '+1', upvote_group_activity_path(@group.id, activity.id), method: :post %> | |
| <br/><br/> | |
| <% end %> | |
| </div> | |
| <% end %> | |
| <%if @group.owner_id == current_user.id %> | |
| <h2>Add an Activtiy:</h2> | |
| <%= form_for([@group, @group.activities.build]) do |f| %> | |
| <%= f.label :name %> | |
| <%= f.text_field :name %> | |
| <%= f.label :Location %> | |
| <%= f.text_field :location %> | |
| <%= f.label :Start %> | |
| <%= f.datetime_field :start_date %> | |
| <%= f.label :End%> | |
| <%= f.datetime_field :end_date%> | |
| <%= f.label :Description %> | |
| <%= f.text_field :description %> | |
| <strong>Search Tags</strong> | |
| <form action="image_search" > | |
| <input type="text" name="search_input" value="Tags"> | |
| <button type="submit" value="Search">FLICKR</button> | |
| </form> | |
| <% results = flickr.photos.search(:tags => params["search_input"] ) | |
| #rand = Random.new.rand(results.length) | |
| #info = flickr.photos.getInfo(:photo_id => results[rand].id) | |
| #url = FlickRaw.url_b(info) | |
| amount_images = 6 | |
| i = 0 | |
| list_url = [amount_images] | |
| results.each do |r| | |
| if i == amount_images | |
| break | |
| end | |
| info = flickr.photos.getInfo(:photo_id => r.id) | |
| url = FlickRaw.url_b(info) | |
| list_url[i] = url | |
| i = i + 1 | |
| %><%= image_tag(url,:size => '300x300') %> | |
| <%= f.radio_button :image_url, url %> | |
| <%end%><br/><br/> | |
| <%= f.submit %> | |
| <% end %> | |
| <% end %> | |
| <%= link_to 'Back', groups_path %> | |
| | <%= link_to 'Edit', edit_group_path(@group) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment