From 06f41312a2fabeed4cff75165e322e1c2650ea42 Mon Sep 17 00:00:00 2001 From: agordillo Date: Fri, 28 Aug 2015 11:09:17 +0200 Subject: [PATCH] Fix category helps, and fix favorites help --- .../categories/_category-favorit.html.erb | 5 ----- app/views/categories/_category.html.erb | 2 -- app/views/categories/favorites.html.erb | 6 +----- app/views/categories/show.html.erb | 16 +++++++--------- ...gories.html.erb => _help_category.html.erb} | 2 +- .../help/_help_category_favorites.html.erb | 18 ++++++++++++++++++ app/views/help/_help_category_own.html.erb | 18 ++++++++++++++++++ ...ile.html.erb => _help_profile_own.html.erb} | 0 app/views/users/show.html.erb | 2 +- config/locales/en.yml | 9 +++++---- config/locales/es.yml | 7 ++++--- 11 files changed, 55 insertions(+), 30 deletions(-) rename app/views/help/{_help_categories.html.erb => _help_category.html.erb} (91%) create mode 100644 app/views/help/_help_category_favorites.html.erb create mode 100644 app/views/help/_help_category_own.html.erb rename app/views/help/{_help_own_profile.html.erb => _help_profile_own.html.erb} (100%) diff --git a/app/views/categories/_category-favorit.html.erb b/app/views/categories/_category-favorit.html.erb index 9a28f4000..a5d01a89d 100755 --- a/app/views/categories/_category-favorit.html.erb +++ b/app/views/categories/_category-favorit.html.erb @@ -1,16 +1,11 @@
  • - -
    <%= link_to "".html_safe, category, :title => category.title %>
    -
    -
    <%= t('excursion.actions.favorite') %>
    -

    diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb index 2d92c5ad9..a7e45d90f 100755 --- a/app/views/categories/_category.html.erb +++ b/app/views/categories/_category.html.erb @@ -13,8 +13,6 @@
    - -
    <%= render :partial => 'categories/thumbnail', :locals =>{ :category => category} %>
    diff --git a/app/views/categories/favorites.html.erb b/app/views/categories/favorites.html.erb index 254c80f8f..e6521dfe7 100755 --- a/app/views/categories/favorites.html.erb +++ b/app/views/categories/favorites.html.erb @@ -3,13 +3,9 @@
    -
    - - <%= t('categories.favorites.title') %> - - <%= render partial: 'help/help_categories' %> + <%= render partial: 'help/help_category_favorites' %>
    <%= t('categories.favorites.description') %>
    diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index 936ffb3e1..a86096585 100755 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -21,23 +21,22 @@
    - - <%= render partial: 'help/help_categories' %> - + <% if user_signed_in? and @category.owner.user == current_subject %> + <%= render partial: 'help/help_category_own' %> + <% else %> + <%= render partial: 'help/help_category' %> + <% end %>

    <%= @category.title %>

    <%= @category.description %>
    -
    <%= t('by') %> <%= link_to @category.author.name, @category.author.subject %>
    - - <% if can?(:update, @category) %> + <% if can?(:update, @category) %> <%= link_to(raw("")+ t('excursion.actions.edit'), '#', :id => "edit_icon_link", :class =>"btn btn-default edit_icon") %> <%=t('categories.dragandrop.place')%> - <% end %> - + <% end %> <% if can?(:destroy, @category) %> <%= link_to(raw("") + t('excursion.actions.delete') , @category, :method => :delete, :remote => false, :confirm => "Are you sure?", :class =>"action btn btn-default" )%> <% end %> @@ -72,7 +71,6 @@
    - <% @items = @category.property_objects order = @category.categories_order unless order.nil? diff --git a/app/views/help/_help_categories.html.erb b/app/views/help/_help_category.html.erb similarity index 91% rename from app/views/help/_help_categories.html.erb rename to app/views/help/_help_category.html.erb index 42507ab42..bf99427fd 100755 --- a/app/views/help/_help_categories.html.erb +++ b/app/views/help/_help_category.html.erb @@ -2,7 +2,7 @@ diff --git a/app/views/help/_help_category_favorites.html.erb b/app/views/help/_help_category_favorites.html.erb new file mode 100644 index 000000000..0b646061a --- /dev/null +++ b/app/views/help/_help_category_favorites.html.erb @@ -0,0 +1,18 @@ + + + + + +<%content_for :javascript do%> + $('#helpfavoritecategoriesid').popover({ + html : true, + content: function() { + return $('#contentfavoritecategoriesid').html(); + } + }); +<%end%> \ No newline at end of file diff --git a/app/views/help/_help_category_own.html.erb b/app/views/help/_help_category_own.html.erb new file mode 100644 index 000000000..e561e40c9 --- /dev/null +++ b/app/views/help/_help_category_own.html.erb @@ -0,0 +1,18 @@ + + + + + +<%content_for :javascript do%> + $('#helpowncategoriesid').popover({ + html : true, + content: function() { + return $('#contentowncategoriesid').html(); + } + }); +<%end%> \ No newline at end of file diff --git a/app/views/help/_help_own_profile.html.erb b/app/views/help/_help_profile_own.html.erb similarity index 100% rename from app/views/help/_help_own_profile.html.erb rename to app/views/help/_help_profile_own.html.erb diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index fef593979..e8274932a 100755 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -29,7 +29,7 @@ <% if profile_subject_is_current? %> - <%= render :partial => 'help/help_own_profile' %> + <%= render :partial => 'help/help_profile_own' %> <% else %> <%= render :partial => 'help/help_profile' %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index e10fb1bc0..4ac294e04 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -310,7 +310,7 @@ en: timeline_date2: "16 December 2013" timeline_date3: "23 December 2013" criteria: "Selection criteria" - criteria2: "The eExcursions will be ranked according to the number of favourites voted by the user community on ViSH.The first 10 ranked excursions will then be judged in order to select the winners." + criteria2: "The eExcursions will be ranked according to the number of favorites voted by the user community on ViSH.The first 10 ranked excursions will then be judged in order to select the winners." prizes: "Check The Prizes" prizes2: "The winners will receive prizes in the form of Amazon vouchers * For each of the categories there is a chance to win a 1st and 2nd prize" prizes3: "The overall winners will receive extra prizes" @@ -371,7 +371,8 @@ en: cat1_html: "1. Type a title and description.
    " cat2_html: "2. Then, click on save button to create your new category." categories1_html : "Categories" - categories2_html : "This is the view of the category you've created, under all the features you've added to it are displayed. At any time you can edit or delete the category." + categories2_html : "Categories are repositories or personal folders to which we can add different resources and elements in order to organize or classify them somehow.
    The different elements contained in this category are displayed below." + categories2_own_html : "This is the view of the category you've created, below all the items you have added to it are displayed. You can edit or delete the category at any time." categorize_html: "On this panel you can add the excursion or resource into one or more categories.

    You can select the categories from the list of your already created categories, from the most used by you or create new ones using the text box placed below.

    You can create as many as you wish and all of them will show up in your profile in the categories section." create_group_title: "Modal to create groups of pupils" create_group_p1: "Fill in the form with the name for the group and the number of pupils accounts" @@ -386,8 +387,8 @@ en: excursions2_html : "This section shows the excursion you have accessed.
    You can navigate through the excursion slides by clicking on the arrow buttons, by clicking on the left or right side of the slides or by using the arrow keys on the keyboard.
    On the right zone recommended excursions are shown, under the excursion you have the information of it, as well as options to share it, download it (in SCORM format), report inappropriate content or spam, clone it, add it to your favorites or add it to a category.
    You can also comment the excursión from the bottom." exse_html : "This panel shows the filters applied to the search results." exse2_html : "Explore / Search" - favourite1_html : "Favourites" - favourite2_html : "This section displays your favorite resources on items that really have made favorites." + favorite1_html : "Favorites" + favorite2_html : "This section shows your favorite resources, in it you can see the items that you have marked as favorite." home1_html: "This zone show the excursions created by people you are following." info1_html: "Click on one of the following options depending on the type of resource you want to upload:" info1_doc_html: "Documents: to upload files (images, videos, ...)." diff --git a/config/locales/es.yml b/config/locales/es.yml index 413b616d8..77bd84493 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -361,7 +361,8 @@ es: cat2_html: "2. Después, haga click en el botón guardar para crear su nueva categoría.
    " categorize_html: "En este panel puedes añadir la excursión o el recurso a una o más categorías de tu usuario.

    Puedes seleccionarlas entre las ya creadas de tu lista de categorías, de las que más uses o crear nuevas desde la caja de texto inferior.

    Puedes crear tantas como quieras y todas ellas serán visibles desde tu perfil de usuario en la zona de categorías." categories1_html: "Categorías" - categories2_html: "Esta es la vista de la categoría que has creado, debajo se mostrarán todos los elementos que has añadido a ella. En cualquier momento puedes editar o borrar la categoría." + categories2_html: "Las categorías son repositorios o carpetas personales a las que se pueden añadir diferentes recursos y elementos a fin de organizarlos o clasificarlos de alguna manera.
    Los diferentes elementos contenidos en esta categoría se muestran en la zona inferior." + categories2_own_html: "Esta es la vista de la categoría que has creado, debajo se muestran todos los elementos que has añadido a ella. En cualquier momento puedes editar o borrar la categoría." create_group_title: "Modal para la creación de grupos de alumnos" create_group_p1: "Rellena el formulario con el nombre que desees darle al grupo y el número de alumnos que contiene" create_group_p2: "Una vez creado tendrás esa cantidad de cuentas de alumnos y podrás bajarte las credenciales para que accedan" @@ -375,8 +376,8 @@ es: excursions2_html : "En esta sección se muestra la excursión a la que ha accedido.
    Puedes navegar por las diapositivas de la excursión haciendo clic en las flechas, haciendo clic en la parte izquierda o derecha de las diapositivas o usando las teclas de dirección del teclado.
    En la zona de la derecha se muestran excursiones recomendadas, bajo la excursión se muestra la información de la misma, así como opciones para compartirla , descargarla (en formato SCORM), notificar contenidos inapropiados o spam, clonarla, añadirla a sus favoritos, o añadirla a una categoría.
    También puede comentar la excursión desde la parte inferior." exse_html: "Este panel muestra los filtros aplicados a los resultados de búsqueda." exse2_html: "Explorar / Buscar" - favourite1_html: "Favoritos" - favourite2_html: "Esta sección muestra tus recursos favoritos, en el veras los elementos que has hecho favoritos." + favorite1_html: "Favoritos" + favorite2_html: "Esta sección muestra tus recursos favoritos, en ella verás los elementos que has marcado como favoritos." home1_html: "Esta zona muestra las excursiones creadas por los usuarios a los que sigues." info1_html: "Haga click en una de las siguientes opciones en función del tipo de recurso que desee subir:" info1_doc_html: "Documentos: para subir cualquier tipo de archivo (imágenes, vídeos, ...)."