updated location styling and output. increased card size. made links open in new tabs. removed create account link. added ability to see list of your personal objects that you've added.
This commit is contained in:
parent
ca2898fe3d
commit
9c0f12a55a
18 changed files with 107 additions and 82 deletions
|
@ -54,7 +54,7 @@ input[type="submit"] { margin-top:5px; }
|
|||
.focus { position:fixed; top:0; left:0; width:90%; z-index:10; display: block; min-width:533px; margin: 50px 50px 25px 50px; background: #D1D1D1; border-radius: 20px; color:#000; border:1px solid #000; }
|
||||
.focusleft, .focusmiddle, .focusright { display:block; float:left; }
|
||||
.focusleft { width:20%; min-width:70px; text-align:center; }
|
||||
.focusmiddle { display:block; width:49%; min-height:100px; border-right:2px solid #000; border-left:2px solid #000;}
|
||||
.focusmiddle { display:block; width:49%; min-height:115px; border-right:2px solid #000; border-left:2px solid #000;}
|
||||
.focusright { width:30%; min-width:150px; }
|
||||
.focus .focusleft p { font-weight:bold; font-size:16px; line-height:20px; padding:10px 0 5px 0; }
|
||||
.focus .focusright p { font-weight:bold; font-size:16px; line-height:20px; padding:10px 0 5px 10px; }
|
||||
|
@ -62,6 +62,7 @@ input[type="submit"] { margin-top:5px; }
|
|||
.focus .title { font-size:22px; line-height:25px; border-bottom:2px solid #000; padding:10px; }
|
||||
.focus .desc { font-style:italic; padding:10px; }
|
||||
.focus .desc h3 { font-style:normal; }
|
||||
.focus .location { padding-left:10px; }
|
||||
.focus .link { padding:0 0 0 10px; display:block; width:90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
.divider { margin: 20px 50px 20px 50px; border-bottom:2px solid #FFF; }
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
// Place all the styles related to the groups controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.group { display:block; float:left; position:relative; width:155px; height:265px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.group .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.group .icon { position:absolute; top:117px; left:-25px; }
|
||||
|
||||
.group .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.group .desc { font-style:italic; overflow-y:scroll;}
|
||||
.group .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.group .link { position:absolute; width:155px; top:260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
|
||||
// Place all the styles related to the groups controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.group { display:block; float:left; position:relative; width:170px; height:300px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.group .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.group .icon { position:absolute; top:135px; left:-25px; }
|
||||
|
||||
.group .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.group .desc { font-style:italic; }
|
||||
.group .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.group .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
// Place all the styles related to the items controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.item { display:block; float:left; position:relative; width:155px; height:265px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.item .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.item .icon { position:absolute; top:117px; left:-25px; }
|
||||
|
||||
.item .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.item .desc { font-style:italic; overflow-y:scroll;}
|
||||
.item .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.item .link { position:absolute; width:155px; top:260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
// Place all the styles related to the items controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.item { display:block; float:left; position:relative; width:170px; height:300px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.item .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.item .icon { position:absolute; top:135px; left:-25px; }
|
||||
|
||||
.item .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.item .desc { font-style:italic; }
|
||||
.item .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.item .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
// Place all the styles related to the people controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.person { display:block; float:left; position:relative; width:155px; height:265px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.person .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.person .icon { position:absolute; top:117px; left:-25px; }
|
||||
|
||||
.person .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.person .desc { font-style:italic; overflow-y:scroll;}
|
||||
.person .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.person .link { position:absolute; width:155px; top:260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
// Place all the styles related to the people controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.person { display:block; float:left; position:relative; width:170px; height:300px; padding:10px 10px 10px 35px; background:#d1d1d1; border-radius:15px; margin:30px 0 30px 50px; color:#000; }
|
||||
|
||||
.person .type {position: absolute;
|
||||
color: white;
|
||||
top: -22px;
|
||||
right: 0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
line-height: 24px;}
|
||||
|
||||
.person .icon { position:absolute; top:135px; left:-25px; }
|
||||
|
||||
.person .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
|
||||
|
||||
.person .desc { font-style:italic; }
|
||||
.person .desc h3 { font-style:normal; margin-top:5px; }
|
||||
|
||||
.person .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
@ -117,7 +117,7 @@ class GroupsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
respond_with(@user, location: restore(default: root_url)) do |format|
|
||||
respond_with(@user, location: restore(default: group_url(@group))) do |format|
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -176,8 +176,9 @@ class ItemsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
respond_with(@user, location: restore(default: root_url)) do |format|
|
||||
respond_with(@user, location: restore(default: item_url(@item))) do |format|
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# DELETE /actions/:id
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class MainController < ApplicationController
|
||||
|
||||
before_filter :require_user, only: [:userobjects]
|
||||
respond_to :html, :js, :json
|
||||
|
||||
def home
|
||||
|
@ -9,5 +10,13 @@ class MainController < ApplicationController
|
|||
|
||||
respond_with(@all)
|
||||
end
|
||||
|
||||
def userobjects
|
||||
@user = current_user
|
||||
|
||||
@all = @user.groups + @user.people + @user.items
|
||||
|
||||
respond_with(@all)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -101,7 +101,7 @@ class PeopleController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
respond_with(@user, location: restore(default: root_url)) do |format|
|
||||
respond_with(@user, location: restore(default: person_url(@person))) do |format|
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
<%= image_tag "group.png", :class => 'icon', :size => '50x50' %>
|
||||
<%= link_to group.name, group_url(group), :class => 'title' %>
|
||||
<div class="desc"><p><%= group.desc %></p></div>
|
||||
<%= link_to group.link, group.link, :class => 'link' %>
|
||||
<%= link_to group.link, group.link, :class => 'link', :target => '_blank' %>
|
||||
<% end %>
|
|
@ -11,9 +11,12 @@
|
|||
</div>
|
||||
<div class="focusright">
|
||||
<p>Location</p>
|
||||
<%= @group.city %>, <%= @group.province %>, <%= @group.country %>
|
||||
<Span class="location">
|
||||
<%= @group.city %><% if @group.city != "" && @group.province != "" %>, <% end %><%= @group.province %><% if (@group.city != "" || @group.province != "") && @group.country != "" %>, <% end %><%= @group.country %>
|
||||
<% if (@group.city == "" && @group.province == "" && @group.country == "") %>Earth<% end %>
|
||||
</span>
|
||||
<p>Link</p>
|
||||
<%= link_to @group.link, @group.link, :class => 'link' %>
|
||||
<%= link_to @group.link, @group.link, :class => 'link', :target => '_blank' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfloat nodemargin"></div>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<%= image_tag item.item_category.icon, :class => 'icon', :size => '50x50' %>
|
||||
<%= link_to item.name, item_url(item), :class => 'title' %>
|
||||
<div class="desc"><p><%=item.desc %></p></div>
|
||||
<%= link_to item.link, item.link, :class => 'link' %>
|
||||
<%= link_to item.link, item.link, :class => 'link', :target => '_blank' %>
|
||||
<% end %>
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div class="focusright">
|
||||
<p>Link</p>
|
||||
<%= link_to @item.link, @item.link, :class => 'link' %>
|
||||
<%= link_to @item.link, @item.link, :class => 'link', :target => '_blank' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfloat nodemargin"></div>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<% unless authenticated? %>
|
||||
<ul>
|
||||
<li><%= link_to "Login", new_session_path, id: "Login" %></li>
|
||||
<li><%= link_to "Create Account", new_user_path, id: "CreateAccount" %></li>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Items", items_path %></li>
|
||||
<li><%= link_to "People", people_path %></li>
|
||||
|
@ -24,6 +23,7 @@
|
|||
<% if authenticated? %>
|
||||
<ul>
|
||||
<li><%= link_to "Logout", session_path, method: 'delete', id: "Login" %></li>
|
||||
<li><%= link_to "My Objects", userobjects_path %></li>
|
||||
<li>|</li>
|
||||
<li><%= link_to "Add Item", new_item_path %></li>
|
||||
<li><%= link_to "Add Person", new_person_path %></li>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<%= render object %>
|
||||
<% end %>
|
||||
<% if @all.empty? %>
|
||||
<p><br>Shucks, there is nothing in ISSAD.<p>
|
||||
<p><br>Shucks, there is nothing in metamap.<p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
|
|
9
app/views/main/userobjects.html.erb
Normal file
9
app/views/main/userobjects.html.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="everything" id="everything">
|
||||
<% @all.each do |object| %>
|
||||
<%= render object %>
|
||||
<% end %>
|
||||
<% if @all.empty? %>
|
||||
<p><br>You haven't added any objects yet.<p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
|
@ -3,5 +3,5 @@
|
|||
<%= image_tag "person.png", :class => 'icon', :size => '50x50' %>
|
||||
<%= link_to person.name, person_url(person), :class => 'title' %>
|
||||
<div class="desc"><p><%=person.desc %></p></div>
|
||||
<%= link_to person.link, person.link, :class => 'link' %>
|
||||
<%= link_to person.link, person.link, :class => 'link', :target => '_blank' %>
|
||||
<% end %>
|
|
@ -13,7 +13,7 @@
|
|||
<p>Location</p>
|
||||
<%= @person.city %>, <%= @person.province %>, <%= @person.country %>
|
||||
<p>Link</p>
|
||||
<%= link_to @person.link, @person.link, :class => 'link' %>
|
||||
<%= link_to @person.link, @person.link, :class => 'link', :target => '_blank' %>
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,8 @@ ISSAD::Application.routes.draw do
|
|||
|
||||
root to: 'main#home', via: :get
|
||||
|
||||
match 'my-objects', to: 'main#userobjects', via: :get, as: :userobjects
|
||||
|
||||
resource :user
|
||||
resource :session
|
||||
|
||||
|
|
Loading…
Reference in a new issue