diff --git a/app/assets/javascripts/application/users.coffee b/app/assets/javascripts/application/users.coffee new file mode 100644 index 0000000000000000000000000000000000000000..521a0c47b2c50cb7ea2038ec21a21da977e6ba6c --- /dev/null +++ b/app/assets/javascripts/application/users.coffee @@ -0,0 +1,4 @@ +$('a.showmore').on 'click', -> + $('span', this).toggle() + $('.user-biography').slideToggle() + return \ No newline at end of file diff --git a/app/assets/javascripts/edges.coffee b/app/assets/javascripts/edges.coffee deleted file mode 100644 index 24f83d18bbd38c24c4f7c3c2fc360cd68e857a2a..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/edges.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/registrations.coffee b/app/assets/javascripts/registrations.coffee deleted file mode 100644 index 24f83d18bbd38c24c4f7c3c2fc360cd68e857a2a..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/registrations.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/university.coffee b/app/assets/javascripts/university.coffee deleted file mode 100644 index 24f83d18bbd38c24c4f7c3c2fc360cd68e857a2a..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/university.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/users.coffee b/app/assets/javascripts/users.coffee deleted file mode 100644 index 24f83d18bbd38c24c4f7c3c2fc360cd68e857a2a..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/users.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/application/learning_objects.scss b/app/assets/stylesheets/application/learning_objects.scss index 3d9aebffd9c3b00426a9b20727282e3ccc54aa87..69bf2e7a9ff92f5a96ad923032fb7010913123c6 100644 --- a/app/assets/stylesheets/application/learning_objects.scss +++ b/app/assets/stylesheets/application/learning_objects.scss @@ -29,7 +29,7 @@ .learning-object-thumbnail { max-width: 250px; - height: 150px; + height: 150px !important; position: relative; } diff --git a/app/assets/stylesheets/application/users.scss b/app/assets/stylesheets/application/users.scss index 03d17a6158957c3a8b70f19eec92d332e3c48d02..7e1d8ccaa7f4a5d0d24e73f323574a60ecef5969 100644 --- a/app/assets/stylesheets/application/users.scss +++ b/app/assets/stylesheets/application/users.scss @@ -11,7 +11,8 @@ $background-grey: #e7e7e8; .user-header { background-color: $background-grey; width: 100%; - height: 145px; + min-height: 145px; + height: auto; margin-top: 30px; margin-bottom: 50px; padding: 15px; @@ -25,6 +26,7 @@ $background-grey: #e7e7e8; font-style: italic; } .header-content { + margin-top: 20px; } .right-column { @@ -42,3 +44,8 @@ $background-grey: #e7e7e8; .user-files { } + +.user-biography { + padding-left: 85px !important; + display: none; +} \ No newline at end of file diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cda7f8ed990b71a14c0076ffaa4560a8e631ccc0..8faf96e9fede08d089264beabbef5a50c9d89471 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2,6 +2,7 @@ class UsersController < ApplicationController def show @objects = learning_object_repository.all + @new_collection = Collection.new end end diff --git a/app/views/collections/_create.html.erb b/app/views/collections/_create.html.erb index cf67f6c19e68f176968fd05e7e54c15804fdd47b..f4e4af8be27c0fada134733a18a70a19e7302d5b 100644 --- a/app/views/collections/_create.html.erb +++ b/app/views/collections/_create.html.erb @@ -1,7 +1,7 @@ -<a href="#" id="create_collection_popover">Criar coleção</a> +<button id="create_collection_popover" type="button" class="btn btn-primary">Criar coleção</button> <div id="create_collection_popover_content" style="display: none"> - <%= render 'collections/form' %> + <%= render 'collections/form', collection: collection %> </div> <div id="create_collection_popover_title" style="display: none"> diff --git a/app/views/collections/_form.html.erb b/app/views/collections/_form.html.erb index 7330b0254f3ba93c7b437ec76db29a8ae8689ffb..eb14855e26ec71f031f6e1164e192c4041c5b999 100644 --- a/app/views/collections/_form.html.erb +++ b/app/views/collections/_form.html.erb @@ -1,7 +1,7 @@ -<%= form_for @collection do |f| %> +<%= form_for collection do |f| %> - <%= f.label :title %> - <%= f.text_field :title, required: true, style: 'width: 250px;' %> + <%= f.label :name %> + <%= f.text_field :name, required: true, style: 'width: 250px;' %> <%= f.label :privacy %> <select name="collection[privacy]"> diff --git a/app/views/learning_objects/_learning_object_vertical.erb b/app/views/learning_objects/_learning_object_vertical.erb index 7e6887797cf178618594c96f7c20502db68c7043..2ebbc5ee9fadf0926e1fabe282d9ee32054cde98 100644 --- a/app/views/learning_objects/_learning_object_vertical.erb +++ b/app/views/learning_objects/_learning_object_vertical.erb @@ -15,4 +15,4 @@ <span>Por <a>Usuário </a></span> </div> </div> -</div> +</div> \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 006c5610489895d1ee2b6a41c119250ceefd9169..e5b7fa87614efe1e3ea192a024d3d75728c4a146 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -10,13 +10,31 @@ <div class="media-body"> <h2 class="media-heading">Usuário</h2> <h3 class="header-sub">nome da instituição</h3> - <h3 class="header-content">x items</h3> + <div class="header-content"> + <a href="#" class="showmore"> + <span>ver mais</span> + <span style="display: none;">fechar</span> + </a> + </div> </div> </div> </div> <div class="col-md-6 right-column"> - <button type="button" class="btn btn-default">Seguir</button> + <button type="button" class="btn btn-default">Editar perfil</button> + </div> + + <div class="col-md-12 user-biography"> + <h3>Biografia</h3> + + <p>asdasdsadasdas</p> + + <a href="#" class="showmore"> + <span style="display: none;">fechar</span> + <span>fechar</span> + </a> </div> + + <div style="clear: both;"></div> </div> <div class="user-files"> @@ -24,12 +42,13 @@ <div class="col-md-6"> <div class="media"> <div class="media-body"> - <h2 class="media-heading">Arquivos do usuário</h2> + <h2 class="media-heading">Objetos do usuário</h2> <h4>x items</h4> </div> </div> </div> - <div class="col-md-6 right-column"> + <div class="col-md-6 right-column align-right"> + <button type="button" class="btn btn-primary">Adicionar novo objeto</button> </div> </div> @@ -53,12 +72,12 @@ <div class="col-md-6"> <div class="media"> <div class="media-body"> - <h2 class="media-heading">Coleções</h2> - <h4>x items</h4> + <h2 class="media-heading">Minhas Coleções</h2> </div> </div> </div> - <div class="col-md-6 right-column"> + <div class="col-md-6 right-column align-right"> + <%= render 'collections/create', collection: @new_collection %> </div> </div> @@ -71,9 +90,4 @@ <%= render @objects[2], orientation: "vertical" %> </div> </div> -</div> - - -<div class="row"> - <%#= render 'collections/create' %> -</div> +</div> \ No newline at end of file