#7080 using aspect selecting button form html into mobile version
This commit is contained in:
parent
58483bdd2c
commit
29fa1e582a
2 changed files with 47 additions and 8 deletions
36
app/views/aspects/_aspect_dropdown.mobile.haml
Normal file
36
app/views/aspects/_aspect_dropdown.mobile.haml
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue