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
c8fd5491
Commit
c8fd5491
authored
May 29, 2018
by
Яков
Browse files
two
parent
48680c56
Changes
98
Show whitespace changes
Inline
Side-by-side
apps/._.DS_Store
deleted
100644 → 0
View file @
48680c56
File deleted
apps/arm/config/routing.yml
View file @
c8fd5491
discount_phone
:
class
:
sfDoctrineRouteCollection
options
:
model
:
DiscountPhone
module
:
discount_phone
prefix_path
:
/discount_phone
column
:
id
with_wildcard_routes
:
true
discount
:
class
:
sfDoctrineRouteCollection
options
:
model
:
Discount
module
:
discount
prefix_path
:
/discount
column
:
id
with_wildcard_routes
:
true
notification_emails
:
class
:
sfDoctrineRouteCollection
options
:
...
...
apps/arm/modules/basket_order/templates/_form_fieldset_footer.php
View file @
c8fd5491
<?php
if
(
!
$form
->
isNew
())
{
$discount
=
Doctrine
::
getTable
(
'DiscountPhone'
)
->
findOneByOrderId
(
$form
->
getObject
()
->
getId
());
$offers
=
$form
->
getObject
()
->
getOffers
();
if
(
count
(
$offers
)
>
0
)
{
?>
<div
class=
"advanced_custom"
>
<?php
if
(
$discount
)
{
?>
<div>
Использована скидка
<?php
echo
$discount
->
getDiscount
()
->
getTitle
()
.
' с '
.
$discount
->
getActiveDiscount
()
.
'%'
?>
</div>
<?php
}
?>
<div
class=
"advanced_custom__h"
>
Товарные предложения
<sup>
<?php
echo
count
(
$offers
);
?>
</sup></div>
<div
class=
"content"
>
<table
width=
"100%"
cellspacing=
"0"
cellpadding=
"0"
>
...
...
@@ -25,7 +17,7 @@ if (!$form->isNew()) {
<?php
$total
=
0
;
foreach
(
$offers
as
$offer
)
{
echo
'<tr align="right"><td align="left">'
.
$offer
[
'Offer'
][
'Translation'
][
'ru'
][
'title'
]
.
'</td><td>'
.
$offer
[
'amount'
]
.
'</td><td>'
.
number_format
(
$offer
[
'
price'
]
/
$offer
[
'amount
'
],
0
,
','
,
' '
)
.
' ₽</td><td><nobr>'
.
number_format
(
$offer
[
'price'
],
0
,
','
,
' '
)
.
' ₽</nobr></td></tr>'
;
echo
'<tr align="right"><td align="left">'
.
$offer
[
'Offer'
][
'Translation'
][
'ru'
][
'title'
]
.
'</td><td>'
.
$offer
[
'amount'
]
.
'</td><td>'
.
number_format
(
$offer
[
'
Offer'
][
'price
'
],
0
,
','
,
' '
)
.
' ₽</td><td><nobr>'
.
number_format
(
$offer
[
'price'
],
0
,
','
,
' '
)
.
' ₽</nobr></td></tr>'
;
$total
+=
$offer
[
'price'
];
}
echo
'<tr class="advanced_custom__tr_divider_top"><td align="right" colspan="4"><nobr><b>Итого: </b>'
.
number_format
(
$total
,
0
,
','
,
' '
)
.
' ₽</nobr></td></tr>'
;
...
...
apps/arm/modules/discount/actions/actions.class.php
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
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
deleted
100644 → 0
View file @
48680c56
<?php
echo
$discount_phone
->
getOrderId
()
?
$discount_phone
->
getUpdatedAt
()
:
''
;
?>
\ No newline at end of file
apps/www/._.DS_Store
deleted
100644 → 0
View file @
48680c56
File deleted
apps/www/config/factories.yml
View file @
c8fd5491
...
...
@@ -21,7 +21,6 @@ all:
class
:
sfSessionStorage
param
:
session_name
:
om
session_cookie_lifetime
:
2592000
routing
:
class
:
sfPatternRouting
param
:
...
...
apps/www/config/routing.yml
View file @
c8fd5491
...
...
@@ -8,10 +8,6 @@ homepage:
requirements
:
sf_culture
:
(?:ru|en)
homepage_discount
:
url
:
/:sf_culture/discount/:url/
param
:
{
module
:
main
,
action
:
index
}
search
:
url
:
/:sf_culture/search/
param
:
{
module
:
search
,
action
:
search
}
...
...
@@ -28,10 +24,6 @@ review:
url
:
/:sf_culture/review/
param
:
{
module
:
review
,
action
:
index
}
discount
:
url
:
/:sf_culture/discount/
param
:
{
module
:
discount
,
action
:
index
}
catalog
:
url
:
/:sf_culture/catalog/
param
:
{
module
:
catalog
,
action
:
index
}
...
...
@@ -56,10 +48,6 @@ basket_complete:
url
:
/:sf_culture/basket/complete/
param
:
{
module
:
basket
,
action
:
complete
}
basket_check_discount
:
url
:
/:sf_culture/basket/check_discount/
param
:
{
module
:
discount
,
action
:
check_discount
}
catalog_show_cat
:
url
:
/catalog/:alias/
param
:
{
module
:
catalog
,
action
:
show_cat
}
...
...
@@ -96,10 +84,6 @@ uploader:
url
:
/uploader/
param
:
{
module
:
main
,
action
:
uploader
}
check_discount_term
:
url
:
/check_discount_term/
param
:
{
module
:
discount
,
action
:
check_discount_term
}
page_show
:
url
:
/:sf_culture/:alias/
class
:
sfDoctrineRoute
...
...
apps/www/config/settings.yml
View file @
c8fd5491
...
...
@@ -6,7 +6,7 @@ prod:
dev
:
.settings
:
error_reporting
:
<?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug
:
tru
e
web_debug
:
fals
e
cache
:
true
etag
:
false
logging_enabled
:
false
...
...
apps/www/config/view.yml
View file @
c8fd5491
...
...
@@ -4,18 +4,18 @@ default:
metas
:
robots
:
'
index,
follow'
stylesheets
:
-
'
fonts.css?deploy=1519103
092
'
-
'
g.css?deploy=1519103
094
'
-
'
p.css?deploy=1519103
095
'
-
'
a.css?deploy=15191030
9
2'
-
'
fonts.css?deploy=1519103
100
'
-
'
g.css?deploy=1519103
101
'
-
'
p.css?deploy=1519103
104
'
-
'
a.css?deploy=1519103
1
02'
-
'
nouislider.css?deploy=1519103100'
javascripts
:
-
'
jquery-2.1.4.min.js?deploy=1519103
092
'
-
'
jquery.plugins.js?deploy=1519103
092
'
-
'
jquery.cycle2.min.js?deploy=1519103
092
'
-
'
jquery.cycle2.swipe.js?deploy=1519103
092
'
-
'
jquery.cycle2.carousel.min.js'
-
'
nouislider.js?deploy=1519103
092
'
-
'
init.d.js?deploy=1519103
092
'
-
'
jquery-2.1.4.min.js?deploy=1519103
100
'
-
'
jquery.plugins.js?deploy=1519103
100
'
-
'
jquery.cycle2.min.js?deploy=1519103
100
'
-
'
jquery.cycle2.swipe.js?deploy=1519103
100
'
-
'
jquery.cycle2.carousel.min.js
?deploy=1519103100
'
-
'
nouislider.js?deploy=1519103
100
'
-
'
init.d.js?deploy=1519103
100
'
has_layout
:
true
layout
:
layout
Prev
1
2
3
4
5
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