Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSébastien Adam <sebastien.adam.webdev@gmail.com>2017-08-29 16:58:38 +0300
committerThorsten Claus <thorstenclaus@web.de>2022-08-30 23:51:18 +0300
commit29fa1e582af411f18d188eb6e190ecd36ee0089f (patch)
treee7e3bc1d6d3e42fc499d980a0e1c96e7f105f249 /app
parent58483bdd2cdf422cda80c7194d2298c8bb84708c (diff)
#7080 using aspect selecting button form html into mobile version
Diffstat (limited to 'app')
-rw-r--r--app/views/aspects/_aspect_dropdown.mobile.haml36
-rw-r--r--app/views/publisher/_publisher.mobile.haml19
2 files changed, 47 insertions, 8 deletions
diff --git a/app/views/aspects/_aspect_dropdown.mobile.haml b/app/views/aspects/_aspect_dropdown.mobile.haml
new file mode 100644
index 000000000..807f295f2
--- /dev/null
+++ b/app/views/aspects/_aspect_dropdown.mobile.haml
@@ -0,0 +1,36 @@
+-# Note: all_aspects is a global in the ApplicationController
+:ruby
+ dropdown_css = {"data-toggle" => "dropdown"}
+ if current_user.getting_started?
+ dropdown_css[:title] = popover_with_close_html("2. #{t('shared.public_explain.control_your_audience')}")
+ dropdown_css["data-content"] = t("shared.public_explain.visibility_dropdown")
+ end
+
+.btn-group.aspect_dropdown
+ %button.btn.btn-default.dropdown-toggle{dropdown_css}
+ %i.entypo-lock.small#visibility-icon
+ %span.text
+ = t("all_aspects")
+ %span.caret
+ %ul.dropdown-menu.pull-right{unSelectable: "on"}
+
+ %li.public.radio{"data-aspect_id" => "public"}
+ %a
+ %span.status_indicator
+ %i.glyphicon.glyphicon-ok
+ %span.text
+ = t("public")
+ %li.all_aspects.radio{"data-aspect_id" => "all_aspects"}
+ %a
+ %span.status_indicator
+ %i.glyphicon.glyphicon-ok
+ %span.text
+ = t("all_aspects")
+ %li.divider
+ - all_aspects.each do |aspect|
+ %li.aspect_selector{"data-aspect_id" => aspect.id}
+ %a
+ %span.status_indicator
+ %i.glyphicon.glyphicon-ok
+ %span.text
+ = aspect.name
diff --git a/app/views/publisher/_publisher.mobile.haml b/app/views/publisher/_publisher.mobile.haml
index e031c1027..6a320da2e 100644
--- a/app/views/publisher/_publisher.mobile.haml
+++ b/app/views/publisher/_publisher.mobile.haml
@@ -8,6 +8,7 @@
= status.hidden_field :provider_display_name, value: 'mobile'
= status.text_area :text, placeholder: t('shared.publisher.whats_on_your_mind'), rows: 4, autofocus: "autofocus", class: "form-control"
+ = hidden_field_tag "aspect_ids[]", "all_aspects"
.form-group
%span#publisher-service-icons
- if current_user.services
@@ -16,16 +17,18 @@
title: service.provider.titleize, class: "service_icon dim",
id: "#{service.provider}", maxchar: "#{service.class::MAX_CHARACTERS}"
- %select{id: "aspect_ids_", class: "form-control", name: "aspect_ids[]"}
- %option{value: 'public'}
- = t('public')
+ -# %select{id: "aspect_ids_", class: "form-control", name: "aspect_ids[]"}
+ -# %option{value: 'public'}
+ -# = t('public')
- %option{value: 'all_aspects', selected: true}
- = t('all_aspects')
+ -# %option{value: 'all_aspects', selected: true}
+ -# = t('all_aspects')
- - current_user.aspects.each do |aspect|
- %option{value: aspect.id}
- = "· #{aspect.name}"
+ -# - current_user.aspects.each do |aspect|
+ -# %option{value: aspect.id}
+ -# = "· #{aspect.name}"
+ .btn-toolbar.pull-right
+ = render partial: "aspects/aspect_dropdown"
.clear
#publisher-textarea-wrapper