Skip to content

Commit

Permalink
change toggle state UI
Browse files Browse the repository at this point in the history
Former-commit-id: 90c5c92323c7ceb71183e4ffd1e93a067df08b1c [formerly a1f71159a1460537b224d96622ebca53a71e022c] [formerly 2ea7abb81d0edc36164917f2bbb80941699d2b10 [formerly 2ea7abb81d0edc36164917f2bbb80941699d2b10 [formerly b9ffc7bdb95ed72eef24ee6fcfad593503477ffa]]]
Former-commit-id: 2451e5cf1d1128a54982c89494db4d8c4bb6dd8e [formerly 51067308847457ff57e8e1ba5309d856fcfd7ce3]
Former-commit-id: 75e370c623ec9f158f98c2fe4cdd20bb933a7aec
Former-commit-id: 04c9152
  • Loading branch information
tkriplean committed Dec 13, 2013
1 parent b9891cf commit 109c827
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,25 @@
crafting = @state == Proposal.ReasonsState.separated

if !active && updating
call = 'View your opinion'
call = 'View Your Opinion'
else
if updating
call = 'Update your opinion'
call = 'Update Your Opinion'
else
call = if crafting then 'Adding your own opinion' else 'Add your own opinion'
if crafting
call = 'Craft Your Own Opinion'
else
call = 'Craft Your Own Opinion'

results_call = 'View All Opinions'

current_user = App.request 'user:current'
_.extend {}, @model.attributes,
active : active
updating : updating
crafting : crafting
call : call
results_call : results_call

onRender : ->
super
Expand Down
21 changes: 14 additions & 7 deletions app/assets/stylesheets/apps/franklin/proposal/_toggle.sass
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@
// +font-size(3)
&[data-state="separated"], &[data-state="together"]
margin-top: $vertical_baseline
a
margin-top: 2 * $vertical_baseline

.m-proposal-state-primary
+font-size(6)
color: $decision_board_text_color
font-weight: bold

.m-proposal-state-secondary
color: lighten($base_text_color, 20%)
&:hover
color: darken($decision_board_text_color, 10%)
+font-size(3)
i
+font-size(4)
vertical-align: middle
color: $base_text_color
+font-size(1)
text-decoration: underline
// i
// +font-size(4)
// vertical-align: middle
21 changes: 14 additions & 7 deletions app/views/backbone/_proposal.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,26 @@

(( if(crafting && (active || updating) ) { ))

%a{ :href => "{{Routes.proposal_path( long_id )}}"}
%i.icon-large


.m-proposal-state-primary
{{ call }}

%a{ :href => "{{Routes.proposal_path( long_id )}}", :class => 'm-proposal-state-secondary'}
// %i.icon-large
// 

{{ results_call }}

(( } else if(!crafting && (active || updating) ) { ))
%a{ :href => "{{Routes.new_position_proposal_path( long_id )}}"}
%i.icon-large

.m-proposal-state-primary
{{ results_call }}

%a{ :href => "{{Routes.new_position_proposal_path( long_id )}}", :class => 'm-proposal-state-secondary'}
// %i.icon-large
// 

{{ call }}


(( } ))

////////////// position ////////////
Expand Down

0 comments on commit 109c827

Please sign in to comment.