Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Яков
idivbanu
Commits
48680c56
Commit
48680c56
authored
May 29, 2018
by
Яков
Browse files
first
parents
Changes
359
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
359 of 359+
files are displayed.
Plain diff
Email patch
apps/arm/modules/cat/templates/_parent_id.php
0 → 100644
View file @
48680c56
<?php
$breadcrumbs
=
$cat
->
getBreadcrumbs
();
if
(
$breadcrumbs
)
{
echo
'<nobr>'
;
$counter
=
0
;
$count
=
count
(
$breadcrumbs
);
foreach
(
$breadcrumbs
as
$crumb
)
{
echo
$crumb
->
getTitle
();
$counter
++
;
if
(
$count
!=
$counter
)
{
echo
' > '
;
}
}
echo
'</nobr>'
;
}
//
//if($cat->getParentId())
//{
// echo $cat->getParent()->getTitle();
//}
\ No newline at end of file
apps/arm/modules/cat/templates/_struct.php
0 → 100644
View file @
48680c56
<div
id=
"a_struct__root"
class=
"a_overflow_hidden"
>
<div
id=
"a_struct__root__ct"
>
<div
class=
"a_struct__block"
data-parent_id=
"
<?php
echo
$sf_request
->
getParameter
(
'parentId'
);
?>
"
>
<div
class=
"a_struct__block__add"
onclick=
"$(this).toggleClass('a_struct__block__add__open');"
>
<span></span>
<div
class=
"a_struct__block__add__menu"
>
<?php
if
(
isset
(
$results
[
'cat'
])){
echo
(
isset
(
$results
[
'product'
])
&&
count
(
$results
[
'product'
])
>
0
?
''
:
'<div class="a_struct__block__add__menu__item" data-module="Struct" onclick="aStruct.events.blank(0, 0, \''
.
$sf_request
->
getParameter
(
'parentId'
)
.
'\', $(this))">Категория</div>'
);
}
if
(
isset
(
$results
[
'product'
])){
echo
(
isset
(
$results
[
'cat'
])
&&
count
(
$results
[
'cat'
])
>
0
?
''
:
'<div class="a_struct__block__add__menu__item" data-module="Struct" onclick="aStruct.events.blank(1, 0, \''
.
$sf_request
->
getParameter
(
'parentId'
)
.
'\', $(this))">Товар</div>'
);
}
if
(
isset
(
$results
[
'offer'
])
&&
(
count
(
$results
[
'offer'
])
==
0
||
$is_detail
)){
echo
'<div class="a_struct__block__add__menu__item" data-module="Struct" onclick="aStruct.events.blank(3, 0, \''
.
$sf_request
->
getParameter
(
'parentId'
)
.
'\', $(this))">Товарное предложение</div>'
;
}
?>
</div>
</div>
<div
class=
"a_struct__block__scroll"
>
<?php
if
(
count
(
$results
)
>
0
){
foreach
(
$results
as
$key
=>
$result
){
if
(
count
(
$result
)
>
0
){
foreach
(
$result
as
$r
){
echo
'<div data-id="'
.
$key
.
'_'
.
$r
[
'id'
]
.
'" data-module="Struct" class="a_struct__block__item a_struct__block__item__type_'
.
(
$key
==
'cat'
?
'0'
:
(
$key
==
'product'
?
'1'
:
'3'
))
.
'" style="" onclick="aStruct.events.'
.
(
$key
!=
'offer'
?
'open($(this), \'\')'
:
'blank(false, 0, \''
.
$sf_request
->
getParameter
(
'parentId'
)
.
'\', $(this))'
)
.
';">'
;
echo
$r
[
'Translation'
][
'ru'
][
'title'
];
if
(
$key
!=
'offer'
){
echo
'<span class="a_struct__block__item__props" onclick="aStruct.events.blank(false, 0, \''
.
$sf_request
->
getParameter
(
'parentId'
)
.
'\', $(this))"></span>'
;
}
echo
'</div>'
;
}
}
}
}
?>
</div>
</div>
<?php
if
(
isset
(
$props
)){
echo
'<div class="a_struct__props"></div>'
;
}
?>
</div>
</div>
\ No newline at end of file
apps/arm/modules/cat/templates/_struct_form.php
0 → 100644
View file @
48680c56
<?php
echo
'<form method="post" action="'
.
$link
.
'">'
;
if
(
!
$form
->
getObject
()
->
isNew
()){
echo
'<input name="sf_method" value="put" type="hidden" />'
;
}
echo
'<input id="form_parentId" type="hidden" name="parentId" value="'
.
$parent_id
.
'"/>'
;
echo
'<table width="100%" cellpadding="0" cellspacing="0">'
;
echo
'<tr>'
;
echo
'<td style="border-bottom: 1px solid rgba(0, 0, 0, .15);"><div class="a_list__batch_actions"><button onclick="checkTranslate();" style="margin: 10px !important;" type="submit">Сохранить</button></div></td>'
;
echo
'<td style="border-bottom: 1px solid rgba(0, 0, 0, .15);padding-right: 10px;" width="1">'
;
if
(
!
$form
->
getObject
()
->
isNew
()){
echo
'<a style="border:none;" onclick="if (confirm(\'Вы уверены что хотите удалить объект?\')) {aStruct.delete(this);};return false;" href="'
.
$link
.
'" data-csrf="'
.
$form
->
getCSRFToken
()
.
'" data-parent_id="'
.
$parent_id
.
'"><img src="/i/arm/icon-delete.png" width="16" height="16"></a>'
;
}
echo
'</td></tr>'
;
$product_detail_class
=
(
$form
->
getName
()
==
'product'
&&
(
$form
->
isNew
()
||
$form
->
getObject
()
->
getIsDetail
())
?
' a_form_product_is_detail'
:
''
);
echo
'<tr><td colspan="2" valign="top"><div class="a_form a_form_'
.
$form
->
getName
()
.
$product_detail_class
.
'">'
;
echo
$form
->
renderHiddenFields
();
echo
$form
->
renderGlobalErrors
();
foreach
(
$form
as
$name
=>
$field
){
if
(
!
$field
->
isHidden
()){
echo
'<div class="sf_admin_form_row sf_admin_form_field_'
.
$name
.
' a_form__'
.
$name
.
'">'
;
$opts
=
$field
->
getWidget
()
->
getOptions
();
if
(
isset
(
$opts
[
'type'
])
&&
$opts
[
'type'
]
==
'checkbox'
){
$attributes
=
$field
->
getWidget
()
->
getAttributes
();
$attributes
=
(
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
);
echo
'<div class="content"><label>'
.
$field
->
render
(
$attributes
)
.
$opts
[
'label'
]
.
'</label></div>'
;
}
else
{
echo
'<span class="inline-label">'
.
$field
->
renderLabel
()
.
'</span>'
;
echo
'<div class="content">'
;
echo
$field
->
render
()
.
$field
->
renderError
();
echo
'</div>'
;
}
echo
'</div>'
;
}
}
if
(
$form
->
getName
()
==
'product'
){
echo
'<div class="sf_admin_form_row a_form__product_props">'
;
include_partial
(
'product/props'
,
array
(
'form'
=>
$form
));
echo
'</div>'
;
}
echo
'</div></td></tr>'
;
echo
'</table>'
;
echo
'</form>'
;
?>
\ No newline at end of file
apps/arm/modules/cat/templates/_title.php
0 → 100644
View file @
48680c56
<?php
include_partial
(
'main/title'
,
array
(
'elem'
=>
$cat
));
?>
\ No newline at end of file
apps/arm/modules/cat/templates/_title_en.php
0 → 100644
View file @
48680c56
<?php
$available
=
$cat
->
getTranslation
()
->
en
->
available
;
if
(
$available
)
{
echo
$cat
->
getTranslation
()
->
en
->
title
;
}
else
{
echo
'<div class="notActive">Не активно</div>'
;
}
\ No newline at end of file
apps/arm/modules/cat/templates/_title_ru.php
0 → 100644
View file @
48680c56
<?php
$available
=
$cat
->
getTranslation
()
->
ru
->
available
;
if
(
$available
)
{
echo
$cat
->
getTranslation
()
->
ru
->
title
;
}
else
{
echo
'<div class="notActive">Не активно</div>'
;
}
\ No newline at end of file
apps/arm/modules/cat/templates/_view_type.php
0 → 100644
View file @
48680c56
<?php
$view_type
=
$cat
->
getViewType
();
switch
(
$view_type
)
{
case
'Simple'
:
echo
'Простой'
;
break
;
case
'Standart'
:
echo
'Стандартный'
;
break
;
case
'BigStandart'
:
echo
'Большие картинки'
;
break
;
}
\ No newline at end of file
apps/arm/modules/cat/templates/indexSuccess.php
0 → 100644
View file @
48680c56
<?php
use_helper
(
'I18N'
,
'Date'
)
?>
<?php
if
(
!
$sf_request
->
isXmlHttpRequest
())
:
?>
<?php
include_partial
(
'cat/assets'
)
?>
<span
class=
"lui__h1"
>
<?php
echo
__
(
'Каталог'
,
array
(),
'messages'
)
?>
</span><sup
class=
"lui__list_count"
>
<?php
echo
(
$sf_request
->
getParameter
(
'q'
)
?
'найдено: '
:
''
);
?><?php
echo
isset
(
$pager
)
?
$pager
->
getNbResults
()
:
''
;
?>
</sup>
<?php
include_partial
(
'cat/flashes'
)
?>
<script
type=
"text/javascript"
>
var
offerQuantityType
=
{
change
:
function
(
select
)
{
var
offerAllType
=
$
(
'
.offer_all_lang_quantity_type
'
);
if
(
select
.
value
==
''
){
offerAllType
.
show
();
}
else
{
offerAllType
.
hide
();
}
$
(
'
.offer_quantity_type_select
'
).
val
(
select
.
value
);
offerAllType
.
val
(
select
.
value
);
},
init
:
function
()
{
if
(
$
(
'
.offer_quantity_type_select
'
).
eq
(
0
).
val
()
!=
''
){
$
(
'
.offer_all_lang_quantity_type
'
).
hide
();
}
}
};
</script>
<style
type=
"text/css"
>
.a_overflow_hidden
{
overflow
:
hidden
!important
;
}
#a_layout_work__ct
{
height
:
100%
;
border-top
:
1px
solid
rgba
(
0
,
0
,
0
,
0.15
);
}
#a_layout_work__ct
.a_form
{
padding
:
10px
;
}
.error_list
{
position
:
relative
!important
;
color
:
#FF0000
;
margin
:
0
;
padding
:
0
;
font-size
:
11px
;
}
.a_form__supplier_id
,
.a_form__supplier_price
{
display
:
inline-block
;
}
.a_form__supplier_id
{
margin-right
:
5px
;
}
.a_form__cats_list
{
display
:
none
;
}
.lui_tab_links__item__current
{
background
:
transparent
;
border-bottom-color
:
#f7f7f7
;
border-top-color
:
#22292B
!important
;
}
.lui_tab_links__item
{
border-top-color
:
#f7f7f7
;
}
.a_form_product
.a_form__certificate
,
.a_form_product
.a_form__is_main
,
.a_form_product
.a_form__tags_list
,
.a_form_product
.a_form__product_props
{
display
:
none
;
}
.a_form_product_is_detail
.a_form__certificate
,
.a_form_product_is_detail
.a_form__tags_list
,
.a_form_product_is_detail
.a_form__is_main
,
.a_form_product_is_detail
.a_form__product_props
{
display
:
block
;
}
</style>
<span
class=
"br15"
></span>
<?php
endif
;
?>
<?php
if
(
isset
(
$pager
))
:
?>
<div
id=
"a_layout_work__ct"
>
<?php
include_partial
(
'struct'
,
array
(
'results'
=>
array
(
'cat'
=>
$pager
->
getResults
()),
'props'
=>
true
));
?>
</div>
<script
type=
"text/javascript"
>
var
pathPrefix
=
sf_prefix
+
'
/
'
+
'
<?php
echo
$this
->
getModuleName
()
?>
/
'
;
$
(
document
).
ready
(
function
()
{
aStruct
.
init
();
});
</script>
<?php
endif
;
?>
<?php
if
(
!
$sf_request
->
isXmlHttpRequest
())
:
?>
<?php
endif
;
?>
<?php
if
(
isset
(
$replace_content
)
&&
$replace_content
!==
false
)
:
?>
<?php
echo
htmlspecialchars_decode
(
$replace_content
);
?>
<?php
endif
;
?>
\ No newline at end of file
apps/arm/modules/discount/actions/actions.class.php
0 → 100644
View file @
48680c56
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/discountGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/discountGeneratorHelper.class.php'
;
/**
* discount actions.
*
* @package sf
* @subpackage discount
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discountActions
extends
autoDiscountActions
{
}
apps/arm/modules/discount/config/generator.yml
0 → 100644
View file @
48680c56
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
Discount
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
discount
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
45
config
:
tabs
:
0
:
{
label
:
'
Скидки'
}
1
:
{
label
:
'
Телефоны'
,
url_for
:
'
discount_phone/index?tab=1'
}
actions
:
~
fields
:
id
:
{
label
:
'
id'
}
title
:
{
label
:
Название
}
utm
:
{
label
:
'
UTM'
}
comment
:
{
label
:
'
Комментарий'
}
url
:
{
label
:
'
Ссылка'
,
help
:
'
Для
автоматической
генерации
оставьте
поле
пустым'
}
created_at
:
{
label
:
'
Дата
создания'
}
updated_at
:
{
label
:
'
Дата
изменения'
}
phones
:
{
label
:
'
'
}
list
:
layout
:
~
title
:
'
Скидки'
display
:
[
title
,
utm
,
comment
,
url
,
_phones
,
created_at
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
false
export
:
false
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование скидки
new
:
title
:
Добавление скидки
\ No newline at end of file
apps/arm/modules/discount/lib/discountGeneratorConfiguration.class.php
0 → 100644
View file @
48680c56
<?php
/**
* discount module configuration.
*
* @package sf
* @subpackage discount
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discountGeneratorConfiguration
extends
BaseDiscountGeneratorConfiguration
{
public
function
getFormActions
()
{
return
array
(
'_list'
=>
NULL
,
'_save'
=>
NULL
,
'_save_and_add'
=>
NULL
,
'_save_and_list'
=>
NULL
,);
}
public
function
getListObjectActions
()
{
return
array
(
'_edit'
=>
NULL
,);
}
public
function
getListBatchActions
()
{
return
array
();
}
}
apps/arm/modules/discount/lib/discountGeneratorHelper.class.php
0 → 100644
View file @
48680c56
<?php
/**
* discount module helper.
*
* @package sf
* @subpackage discount
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discountGeneratorHelper
extends
BaseDiscountGeneratorHelper
{
}
apps/arm/modules/discount/templates/_form_field.php
0 → 100644
View file @
48680c56
<?php
if
(
$field
->
isPartial
())
:
?>
<?php
include_partial
(
'discount_phone/'
.
$name
,
array
(
'form'
=>
$form
,
'attributes'
=>
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
))
?>
<?php
elseif
(
$field
->
isComponent
())
:
?>
<?php
include_component
(
'discount_phone'
,
$name
,
array
(
'form'
=>
$form
,
'attributes'
=>
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
))
?>
<?php
else
:
?>
<div
class=
"
<?php
echo
$class
?><?php
$form
[
$name
]
->
hasError
()
and
print
' errors'
?>
"
>
<div>
<?php
$opts
=
$form
[
$name
]
->
getWidget
()
->
getOptions
();
?>
<?php
if
(
key_exists
(
'type'
,
$opts
)
&&
$opts
[
'type'
]
==
'checkbox'
)
:
?>
<div
class=
"content"
><label>
<?php
echo
$form
[
$name
]
->
render
(
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
);
?><?php
echo
$label
;
?>
</label></div>
<?php
else
:
?>
<span
class=
"inline-label"
>
<?php
echo
$form
[
$name
]
->
renderLabel
(
$label
)
?>
</span>
<div
class=
"content"
>
<?php
echo
$name
==
'url'
?
'http://'
.
$this
->
context
->
getRequest
()
->
getHost
()
.
'/ru/discount/'
:
''
;
?>
<?php
echo
$form
[
$name
]
->
render
(
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
)
?><?php
echo
(
$name
==
'url'
?
'/ '
:
''
)
?>
<?php
echo
(
$name
==
'url'
&&
!
$form
->
isNew
()
?
'<div style="margin-left: 10px !important;" class="pseudo_button lui_pseudo pseudo_button_file_wrapper only_root_button" >Скопировать в буфер обмена</div>'
:
''
);
?>
<?php
echo
$form
[
$name
]
->
renderError
()
?>
<?php
if
(
$help
)
:
?>
<span
class=
"help"
>
<?php
echo
__
(
$help
,
array
(),
'messages'
)
?>
</span>
<?php
elseif
(
$help
=
$form
[
$name
]
->
renderHelp
())
:
?>
<span
class=
"help"
>
<?php
echo
strip_tags
(
$help
,
'<a><i>'
)
?>
</span>
<?php
endif
;
?>
</div>
<?php
endif
;
?>
</div>
</div>
<?php
endif
;
?>
<?php
if
(
$name
==
'url'
)
{
?>
<script>
$
(
'
.pseudo_button
'
).
on
(
'
click
'
,
function
(
e
)
{
try
{
}
document
.
execCommand
(
'
copy
'
);
}
catch
(
err
)
{
console
.
log
(
'
Can`t copy
'
);
})
</script>
<?php
}
?>
\ No newline at end of file
apps/arm/modules/discount/templates/_phones.php
0 → 100644
View file @
48680c56
<?php
echo
link_to
(
'Перейти к телефонам'
,
'discount_phone/filter?discount_phone_filters[discount_id]='
.
$discount
->
getId
(),
array
(
"class"
=>
"lui_pseudo"
,
"onclick"
=>
"event.stopPropagation();"
));
?>
\ No newline at end of file
apps/arm/modules/discount_phone/actions/actions.class.php
0 → 100644
View file @
48680c56
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/discount_phoneGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/discount_phoneGeneratorHelper.class.php'
;
/**
* discount_phone actions.
*
* @package sf
* @subpackage discount_phone
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discount_phoneActions
extends
autoDiscount_phoneActions
{
}
apps/arm/modules/discount_phone/config/generator.yml
0 → 100644
View file @
48680c56
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
DiscountPhone
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
discount_phone
with_doctrine_route
:
true
actions_base_class
:
sfActions
skip
:
true
config
:
tabs
:
0
:
{
label
:
'
Скидки'
,
url_for
:
'
discount/index?tab=0'
}
1
:
{
label
:
'
Телефоны'
}
actions
:
~
fields
:
id
:
{
label
:
'
id'
}
phone
:
{
label
:
'
Телефон'
}
discount_id
:
{
label
:
'
Скидка'
}
active_discount
:
{
label
:
'
Текущая
скидка'
}
order_id
:
{
label
:
'
№
заказа'
}
created_at
:
{
label
:
'
Создана'
}
updated_at
:
{
label
:
'
Активирована'
}
discount
:
{
label
:
'
Скидка'
}
list
:
layout
:
~
title
:
'
Скидки'
display
:
[
phone
,
_discount
,
created_at
,
_updated_at
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
false
export
:
false
filter
:
display
:
[
discount_id
]
form
:
~
edit
:
title
:
Редактирование телефона
new
:
title
:
Добавление телефона
\ No newline at end of file
apps/arm/modules/discount_phone/lib/discount_phoneGeneratorConfiguration.class.php
0 → 100644
View file @
48680c56
<?php
/**
* discount_phone module configuration.
*
* @package sf
* @subpackage discount_phone
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discount_phoneGeneratorConfiguration
extends
BaseDiscount_phoneGeneratorConfiguration
{
public
function
getListBatchActions
()
{
return
array
();
}
public
function
getListActions
()
{
return
array
();
}
}
apps/arm/modules/discount_phone/lib/discount_phoneGeneratorHelper.class.php
0 → 100644
View file @
48680c56
<?php
/**
* discount_phone module helper.
*
* @package sf
* @subpackage discount_phone
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
discount_phoneGeneratorHelper
extends
BaseDiscount_phoneGeneratorHelper
{
}
apps/arm/modules/discount_phone/templates/_discount.php
0 → 100644
View file @
48680c56
<?php
echo
$discount_phone
->
getDiscountId
()
?
$discount_phone
->
getDiscount
()
->
getTitle
()
:
''
;
?>
\ No newline at end of file
apps/arm/modules/discount_phone/templates/_updated_at.php
0 → 100644
View file @
48680c56
<?php
echo
$discount_phone
->
getOrderId
()
?
$discount_phone
->
getUpdatedAt
()
:
''
;
?>
\ No newline at end of file
Prev
1
2
3
4
5
6
7
…
18
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment