Skip to content
Extraits de code Groupes Projets
Valider f9e9a052 rédigé par Flaburgan's avatar Flaburgan Validation de flaburgan
Parcourir les fichiers

Add followed tags to the mobile menu

parent 731adffa
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -129,7 +129,7 @@ This is disabled by default since it requires the installation of additional pac ...@@ -129,7 +129,7 @@ This is disabled by default since it requires the installation of additional pac
* Make the source code URL configurable [#5410](https://github.com/diaspora/diaspora/pull/5410) * Make the source code URL configurable [#5410](https://github.com/diaspora/diaspora/pull/5410)
* Prefill publisher on the tag pages [#5442](https://github.com/diaspora/diaspora/pull/5442) * Prefill publisher on the tag pages [#5442](https://github.com/diaspora/diaspora/pull/5442)
* Allows users to export their data in JSON format from their user settings page [#5354](https://github.com/diaspora/diaspora/pull/5354) * Allows users to export their data in JSON format from their user settings page [#5354](https://github.com/diaspora/diaspora/pull/5354)
* Add followed tags in the mobile menu [#5468](https://github.com/diaspora/diaspora/pull/5468)
# 0.4.1.2 # 0.4.1.2
......
...@@ -40,6 +40,12 @@ $(document).ready(function(){ ...@@ -40,6 +40,12 @@ $(document).ready(function(){
$("#all_aspects + li").toggleClass('hide'); $("#all_aspects + li").toggleClass('hide');
}); });
/* Show / hide followed tags in the drawer */
$('#followed_tags').bind("tap click", function(evt){
evt.preventDefault();
$("#followed_tags + li").toggleClass('hide');
});
/* Heart toggle */ /* Heart toggle */
$(".like_action", ".stream").bind("tap click", function(evt){ $(".like_action", ".stream").bind("tap click", function(evt){
evt.preventDefault(); evt.preventDefault();
......
module TagsHelper module TagsHelper
def looking_for_tag_link def looking_for_tag_link
return if search_query.include?('@') || normalized_tag_name.blank? return if search_query.include?('@') || normalize_tag_name(search_query).blank?
content_tag('small') do content_tag('small') do
t('people.index.looking_for', :tag_link => tag_link).html_safe t('people.index.looking_for', tag_link: tag_link(search_query)).html_safe
end end
end end
def normalized_tag_name def normalize_tag_name(tag)
ActsAsTaggableOn::Tag.normalize(search_query) ActsAsTaggableOn::Tag.normalize(tag.to_s)
end end
def tag_link def tag_link(tag)
tag = normalized_tag_name link_to("##{tag}", tag_path(name: normalize_tag_name(tag)))
link_to("##{tag}", tag_path(:name => tag))
end end
end end
...@@ -91,6 +91,13 @@ ...@@ -91,6 +91,13 @@
- current_user.aspects.each do |aspect| - current_user.aspects.each do |aspect|
%li %li
= link_to aspect.name, aspects_stream_path(a_ids: [aspect.id]) = link_to aspect.name, aspects_stream_path(a_ids: [aspect.id])
%li#followed_tags
= link_to t('streams.followed_tag.title'), "#"
%li.no_border.hide
%ul
- current_user.followed_tags.each do |tag|
%li
= tag_link(tag)
%li %li
= link_to user_profile_path(current_user.username) do = link_to user_profile_path(current_user.username) do
= t('layouts.header.profile') = t('layouts.header.profile')
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter