Commit ec194b708841b77c69c0c3e4e6946e6395c222d0

Authored by Alex Savenko
1 parent e992e0be

status

src/app/backend/controllers/DiscountController.php
... ... @@ -212,6 +212,11 @@ class DiscountController extends Controller
212 212  
213 213 }
214 214  
  215 + /**
  216 + * Switch status indicator
  217 + * @param $id
  218 + * @return \Phalcon\Http\ResponseInterface
  219 + */
215 220 public function switchAction($id) {
216 221  
217 222 if( !$this->session->get('isAdminAuth') ) {
... ...
src/app/backend/views/discount/index.php
... ... @@ -32,11 +32,17 @@
32 32  
33 33 foreach( $info as $p )
34 34 {
  35 + if ($p['status'] == '1') {
  36 + $status_class = 'one_page_status_on_ico';
  37 + } else {
  38 + $status_class = 'one_page_status_off_ico';
  39 + }
  40 +
35 41 $data_pages .=
36 42 '<div class="one_page_edit header_gradient clearfix">'.
37 43 '<div class="one_page_edit_check float"></div>'.
38 44 '<div class="one_page_edit_name float"><a href="/discount_update/'.$p['id'].'" title="">'.$p['name'].'</a></div>'.
39   - '<div class="one_page_status_ico float_right"><a href="/discount_switch/'.$p['id'].'" title="Изменить статус" onclick="return confirm(Вы действительно хотите изменить статус?)"></a></div>'.
  45 + '<div class="'.$status_class.' float_right"><a href="/discount_switch/'.$p['id'].'" title="Изменить статус" onclick="return confirm(Вы действительно хотите изменить статус?)"></a></div>'.
40 46 '<div class="one_page_delete_ico float_right"><a href="/discount_delete/'.$p['id'].'" title="Удалить" onclick="return confirm(\'Вы действительно хотите удалить информацию?\')"></a></div>'.
41 47 '<div class="one_page_edit_ico float_right"><a href="/discount_update/'.$p['id'].'" title="Редактировать"></a></div>'.
42 48 '</div>';
... ...
www-backend/css/main.css
... ... @@ -917,8 +917,8 @@ label.error {
917 917 .one_page_edit:hover .one_page_delete_ico a{background: url(../images/del_hover.png) 0% 0% no-repeat; width: 16px; height: 16px}
918 918 .one_page_edit .one_page_edit_ico a{background: url(../images/pencil.png) 0% 0% no-repeat; width: 16px; height: 16px}
919 919 .one_page_edit:hover .one_page_edit_ico a{background: url(../images/pencil_hover.png) 0% 0% no-repeat; width: 16px; height: 16px}
920   -.one_page_edit .one_page_status_ico a{background: url(../images/up-arrow.png) 0% 0% no-repeat; width: 16px; height: 16px}
921   -.one_page_edit:hover .one_page_status_ico a{background: url(../images/up-arrow.png) 0% 0% no-repeat; width: 16px; height: 16px}
  920 +.one_page_edit .one_page_status_on_ico a{background: url(../images/order_ico1.png) 0% 0% no-repeat; width: 16px; height: 16px}
  921 +.one_page_edit .one_page_status_off_ico a{background: url(../images/order_ico3.png) 0% 0% no-repeat; width: 16px; height: 16px}
922 922  
923 923  
924 924  
... ...