Commit e3a39a8e084a040e2c21ff20101e7671942a9647
1 parent
6e5fa2b1
Exists in
master
and in
6 other branches
Update the proposal-box for issue #60
Showing
3 changed files
with
44 additions
and
24 deletions
Show diff stats
src/app/components/proposal-box/proposal-box.directive.js
| @@ -90,17 +90,6 @@ | @@ -90,17 +90,6 @@ | ||
| 90 | }, 10); | 90 | }, 10); |
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | - ProposalBoxController.prototype.showContent = function(slug) { | ||
| 94 | - var vm = this; | ||
| 95 | - | ||
| 96 | - vm.$state.go('programa', { | ||
| 97 | - slug: slug, | ||
| 98 | - proposal_id: vm.proposal.id | ||
| 99 | - }, { | ||
| 100 | - location: true | ||
| 101 | - }); | ||
| 102 | - }; | ||
| 103 | - | ||
| 104 | ProposalBoxController.prototype.canVote = function() { | 93 | ProposalBoxController.prototype.canVote = function() { |
| 105 | var vm = this; | 94 | var vm = this; |
| 106 | 95 |
src/app/components/proposal-box/proposal-box.html
| @@ -145,16 +145,18 @@ | @@ -145,16 +145,18 @@ | ||
| 145 | <div class="proposal-box--content-inner">{{vm.proposal.abstract}}</div> | 145 | <div class="proposal-box--content-inner">{{vm.proposal.abstract}}</div> |
| 146 | </div> | 146 | </div> |
| 147 | <div ng-hide="vm.showVote" class="proposal-box--join"> | 147 | <div ng-hide="vm.showVote" class="proposal-box--join"> |
| 148 | - <button | 148 | + <a |
| 149 | class="btn btn-link color-theme-common-fg" | 149 | class="btn btn-link color-theme-common-fg" |
| 150 | ng-if="vm.archived === false" | 150 | ng-if="vm.archived === false" |
| 151 | - ng-click="vm.showContent(vm.topic.slug)" | ||
| 152 | - >Participe</button> | ||
| 153 | - <button | 151 | + ui-sref="programa({slug: vm.topic.slug, proposal_id: vm.proposal.id})" |
| 152 | + ui-sref-opts="{location: true}" | ||
| 153 | + >Participe</a> | ||
| 154 | + <a | ||
| 154 | class="btn btn-link color-theme-common-fg" | 155 | class="btn btn-link color-theme-common-fg" |
| 155 | ng-if="vm.archived === true" | 156 | ng-if="vm.archived === true" |
| 156 | - ng-click="vm.showContent(vm.topic.slug)" | ||
| 157 | - >Ir para o programa</button> | 157 | + ui-sref="programa({slug: vm.topic.slug, proposal_id: vm.proposal.id})" |
| 158 | + ui-sref-opts="{location: true}" | ||
| 159 | + >Ir para o programa</a> | ||
| 158 | </div> | 160 | </div> |
| 159 | <div ng-show="vm.showVote" class="proposal-box--actions text-center"> | 161 | <div ng-show="vm.showVote" class="proposal-box--actions text-center"> |
| 160 | <div class="row"> | 162 | <div class="row"> |
| @@ -185,7 +187,7 @@ | @@ -185,7 +187,7 @@ | ||
| 185 | </div> | 187 | </div> |
| 186 | </div> | 188 | </div> |
| 187 | </div> | 189 | </div> |
| 188 | - <div class="proposal-box--bottom text-center"> | 190 | + <div class="proposal-box--bottom text-center" ng-class="{archived: vm.archived}"> |
| 189 | <div class="proposal-box--share"> | 191 | <div class="proposal-box--share"> |
| 190 | <span>COMPARTILHE ESTA <b>PROPOSTA</b></span> | 192 | <span>COMPARTILHE ESTA <b>PROPOSTA</b></span> |
| 191 | <div class="dropdown"> | 193 | <div class="dropdown"> |
| @@ -198,11 +200,25 @@ | @@ -198,11 +200,25 @@ | ||
| 198 | class="dropdown-menu dropdown-menu-right"></social-share> | 200 | class="dropdown-menu dropdown-menu-right"></social-share> |
| 199 | </div> | 201 | </div> |
| 200 | </div> | 202 | </div> |
| 201 | - <div class="proposal-box--ranking"> | ||
| 202 | - <div class="proposal-box--ranking-inner"> | ||
| 203 | - <span class="icon icon-small icon-ranking" aria-hidden="true"></span> | ||
| 204 | - <span>Colocação nos resultados:</span> | ||
| 205 | - <span>{{vm.proposal.ranking_position}}º</span> | 203 | + |
| 204 | + <div ng-if="vm.archived === true"> | ||
| 205 | + <div class="proposal-box--archived color-theme-bg-complementar-2"> | ||
| 206 | + <div class="proposal-box--archived-inner"> | ||
| 207 | + <a ui-sref="programa({slug: vm.topic.slug, proposal_id: vm.proposal.id})" ui-sref-opts="{location: true}"> | ||
| 208 | + Veja as respostas e compromissos assumidos | ||
| 209 | + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> | ||
| 210 | + </a> | ||
| 211 | + </div> | ||
| 212 | + </div> | ||
| 213 | + </div> | ||
| 214 | + | ||
| 215 | + <div ng-if="vm.archived === false"> | ||
| 216 | + <div class="proposal-box--ranking"> | ||
| 217 | + <div class="proposal-box--ranking-inner"> | ||
| 218 | + <span class="icon icon-small icon-ranking" aria-hidden="true"></span> | ||
| 219 | + <span>Colocação nos resultados:</span> | ||
| 220 | + <span>{{vm.proposal.ranking_position}}º</span> | ||
| 221 | + </div> | ||
| 206 | </div> | 222 | </div> |
| 207 | </div> | 223 | </div> |
| 208 | </div> | 224 | </div> |
src/app/components/proposal-box/proposal-box.scss
| @@ -39,6 +39,12 @@ | @@ -39,6 +39,12 @@ | ||
| 39 | border-bottom-right-radius: 5px; | 39 | border-bottom-right-radius: 5px; |
| 40 | // overflow: hidden; | 40 | // overflow: hidden; |
| 41 | border-bottom: 5px solid #dadada; | 41 | border-bottom: 5px solid #dadada; |
| 42 | + | ||
| 43 | + @each $category, $color in $categories { | ||
| 44 | + .#{$category} &.archived { | ||
| 45 | + border-bottom-color: map-get($categories-complementary-2, $category); | ||
| 46 | + } | ||
| 47 | + } | ||
| 42 | } | 48 | } |
| 43 | 49 | ||
| 44 | &--theme { | 50 | &--theme { |
| @@ -60,7 +66,8 @@ | @@ -60,7 +66,8 @@ | ||
| 60 | .contraste & { background-color: #000 !important; outline: 1px solid #eee; } | 66 | .contraste & { background-color: #000 !important; outline: 1px solid #eee; } |
| 61 | } | 67 | } |
| 62 | 68 | ||
| 63 | - &--ranking { | 69 | + &--ranking, |
| 70 | + &--archived { | ||
| 64 | font-weight: bold; | 71 | font-weight: bold; |
| 65 | padding: 10px 0; | 72 | padding: 10px 0; |
| 66 | background-color: #dadada; | 73 | background-color: #dadada; |
| @@ -68,6 +75,14 @@ | @@ -68,6 +75,14 @@ | ||
| 68 | .contraste & { background-color: #111 !important; outline: 1px solid #eee; } | 75 | .contraste & { background-color: #111 !important; outline: 1px solid #eee; } |
| 69 | } | 76 | } |
| 70 | 77 | ||
| 78 | + &--archived { | ||
| 79 | + text-transform: uppercase; | ||
| 80 | + font-size: 12px; | ||
| 81 | + line-height: 23px; | ||
| 82 | + | ||
| 83 | + a { color: #fff; } | ||
| 84 | + } | ||
| 85 | + | ||
| 71 | .action-label { | 86 | .action-label { |
| 72 | margin-top: 10px; | 87 | margin-top: 10px; |
| 73 | } | 88 | } |