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/product/templates/_supplier_id.php
0 → 100644
View file @
48680c56
<?php
if
(
$product
->
getSupplierId
()
!=
''
)
{
echo
$product
->
getSuppliers
()
->
getOrg
();
}
\ No newline at end of file
apps/arm/modules/product/templates/_title.php
0 → 100644
View file @
48680c56
<?php
include_partial
(
'main/title'
,
array
(
'elem'
=>
$product
));
?>
\ No newline at end of file
apps/arm/modules/product/templates/_title_en.php
0 → 100644
View file @
48680c56
<?php
$available
=
$product
->
getTranslation
()
->
en
->
available
;
if
(
$available
)
{
echo
$product
->
getTranslation
()
->
en
->
title
;
}
else
{
echo
'<div class="notActive">Не активно</div>'
;
}
\ No newline at end of file
apps/arm/modules/product/templates/_title_ru.php
0 → 100644
View file @
48680c56
<?php
$available
=
$product
->
getTranslation
()
->
ru
->
available
;
if
(
$available
)
{
echo
$product
->
getTranslation
()
->
ru
->
title
;
}
else
{
echo
'<div class="notActive">Не активно</div>'
;
}
\ No newline at end of file
apps/arm/modules/product_prop/actions/actions.class.php
0 → 100644
View file @
48680c56
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/product_propGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/product_propGeneratorHelper.class.php'
;
/**
* product_prop actions.
*
* @package sf
* @subpackage product_prop
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_propActions
extends
autoProduct_propActions
{
protected
function
buildQuery
()
{
$query
=
parent
::
buildQuery
();
$query
->
leftJoin
(
"r.Translation t"
);
return
$query
;
}
public
function
executeAjax_delete
(
sfWebRequest
$request
)
{
if
(
$request
->
hasParameter
(
'id'
))
{
$id
=
$request
->
getParameter
(
'id'
);
$elem
=
Doctrine
::
getTable
(
"ProductPropList"
)
->
find
(
$id
);
if
(
$elem
)
{
$elem
->
delete
();
$response
[
'status'
]
=
'success'
;
}
else
{
$response
[
'status'
]
=
'error'
;
$response
[
'errorText'
]
=
'Не удалось удалить обьект'
;
}
}
else
{
$response
[
'status'
]
=
'error'
;
$response
[
'errorText'
]
=
'Не переданы необходимые параметры'
;
}
echo
json_encode
(
$response
);
return
sfView
::
NONE
;
}
}
apps/arm/modules/product_prop/config/generator.yml
0 → 100644
View file @
48680c56
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
ProductProp
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
product_prop
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
20
config
:
actions
:
~
fields
:
title
:
{
label
:
'
Название'
}
title_ru
:
{
label
:
'
Название
RU'
}
title_en
:
{
label
:
'
Название
EN'
}
isList
:
{
label
:
'
Значения
справочника'
}
created_at
:
{
label
:
Дата создания
}
list
:
layout
:
~
title
:
'
Характеристики
товара'
display
:
[
_title
,
isList
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
[
title
]
export
:
false
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование параметра
new
:
title
:
Добавление параметра
\ No newline at end of file
apps/arm/modules/product_prop/lib/product_propGeneratorConfiguration.class.php
0 → 100644
View file @
48680c56
<?php
/**
* product_prop module configuration.
*
* @package sf
* @subpackage product_prop
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_propGeneratorConfiguration
extends
BaseProduct_propGeneratorConfiguration
{
}
apps/arm/modules/product_prop/lib/product_propGeneratorHelper.class.php
0 → 100644
View file @
48680c56
<?php
/**
* product_prop module helper.
*
* @package sf
* @subpackage product_prop
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_propGeneratorHelper
extends
BaseProduct_propGeneratorHelper
{
}
apps/arm/modules/product_prop/templates/__form_field.php
0 → 100644
View file @
48680c56
<?php
if
(
$prop
->
getIsList
()
&&
count
(
$prop
->
getProductPropList
())
>
0
)
{
?>
<?php
$strValue
=
$value
->
getTranslation
()
->
ru
->
value
;
$list
=
$prop
->
getProductPropList
();
?>
<select
name=
"
<?php
echo
$baseFieldName
.
'['
.
$prop
[
'id'
]
.
']'
;
?>
"
>
<?php
$selected
=
(
$strValue
==
0
)
?
' selected="selected"'
:
''
?>
<option
value=
"0"
<?php
echo
$selected
;
?>
>
—
</option>
<?php
foreach
(
$list
as
$list_elem
)
{
?>
<?php
$selected
=
(
$strValue
==
$list_elem
->
getId
())
?
' selected="selected"'
:
''
?>
<option
value=
"
<?php
echo
$list_elem
->
getId
()
?>
"
<?php
echo
$selected
?>
>
<?php
echo
$list_elem
->
getTranslation
()
->
ru
->
variant
;
?>
</option>
<?php
}
?>
</select>
<?php
}
else
{
?>
<table
cellpadding=
"0"
cellspacing=
"0"
width=
"100"
class=
"noStyleTable"
>
<tr>
<td>
РУ
</td>
<td>
<?php
echo
'<input size="8" maxlength="8" name="'
.
$baseFieldName
.
'['
.
$prop
[
"id"
]
.
'][ru]" value="'
.
$value
->
getTranslation
()
->
ru
->
value
.
'" type="text"><i class="br5"></i>'
;
?>
</td>
</tr>
<tr>
<td>
EN
</td>
<td>
<?php
echo
'<input size="8" maxlength="8" name="'
.
$baseFieldName
.
'['
.
$prop
[
"id"
]
.
'][en]" value="'
.
$value
->
getTranslation
()
->
en
->
value
.
'" type="text"><i class="br5"></i>'
;
?>
</td>
</tr>
</table>
<?php
}
?>
apps/arm/modules/product_prop/templates/_form_fieldset_footer.php
0 → 100644
View file @
48680c56
<?php
$obj
=
$form
->
getObject
();
if
(
!
$form
->
isNew
())
{
$list
=
$obj
->
getProductPropList
();
?>
<div
class=
"list"
>
<?php
if
(
count
(
$list
)
>
0
)
{
echo
'<table cellspacing="0" cellpadding="0" class="adminTable">'
;
echo
'<tr><th>Значения</th><th></th></tr>'
;
foreach
(
$list
as
$list_elem
)
{
?>
<tr>
<td>
<?php
$arr
=
array
();
foreach
(
$list_elem
->
getTranslation
()
as
$t
)
{
$html
=
'<div class="ru_en_title">'
;
if
(
!
isset
(
$t
[
'available'
])
||
$t
[
'available'
])
{
$html
.
=
'<span class="small_gray">'
.
mb_strtoupper
(
$t
[
'lang'
])
.
':</span>'
.
$t
[
'variant'
]
.
'</div>'
;
if
(
$t
[
'lang'
]
==
'ru'
)
{
array_unshift
(
$arr
,
$html
);
}
else
{
$arr
[]
=
$html
;
}
}
}
echo
implode
(
'<i class="br5"></i>'
,
$arr
);
?>
</td>
<td>
<a
class=
"custom_button custom_button_edit"
href=
"
<?php
echo
url_for
(
'@product_prop_list_edit?id='
.
$list_elem
->
getId
())
?>
"
></a>
<a
class=
"custom_button custom_button_delete"
onclick=
"propList.delete($(this) ,'
<?php
echo
$list_elem
->
getId
()
?>
')"
></a>
</td>
</tr>
<?php
}
echo
'</table><i class="br15"></i>'
;
}
?>
<a
class=
'green_btn'
href=
'
<?php
echo
url_for
(
'@product_prop_list_new'
)
.
"?prop_id="
.
$obj
->
getId
()
?>
'
>
Добавить значение
</a>
</div>
<script
type=
"text/javascript"
>
function
listSwicher
()
{
if
(
$
(
"
input[name='product_prop[isList]']
"
).
prop
(
'
checked
'
))
{
$
(
'
.list
'
).
show
();
}
else
{
$
(
'
.list
'
).
hide
();
}
}
$
(
"
input[name='product_prop[isList]']
"
).
change
(
listSwicher
);
$
(
document
).
ready
(
listSwicher
)
</script>
<?php
}
?>
\ No newline at end of file
apps/arm/modules/product_prop/templates/_title.php
0 → 100644
View file @
48680c56
<?php
echo
$product_prop
->
getTranslation
()
->
ru
->
title
;
?>
\ No newline at end of file
apps/arm/modules/product_prop/templates/_title_en.php
0 → 100644
View file @
48680c56
<?php
echo
$product_prop
->
getTranslation
()
->
en
->
title
;
apps/arm/modules/product_prop/templates/_title_ru.php
0 → 100644
View file @
48680c56
<?php
echo
$product_prop
->
getTranslation
()
->
ru
->
title
;
apps/arm/modules/product_prop_list/actions/actions.class.php
0 → 100644
View file @
48680c56
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/product_prop_listGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/product_prop_listGeneratorHelper.class.php'
;
/**
* product_prop_list actions.
*
* @package sf
* @subpackage product_prop_list
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_prop_listActions
extends
autoProduct_prop_listActions
{
public
function
executeNew
(
sfWebRequest
$request
)
{
$this
->
form
=
$this
->
configuration
->
getForm
();
$this
->
product_prop_list
=
$this
->
form
->
getObject
();
if
(
is_numeric
(
$request
->
getParameter
(
'prop_id'
)))
{
$this
->
form
->
setDefault
(
'product_prop_id'
,
$request
->
getParameter
(
'prop_id'
));
}
}
}
apps/arm/modules/product_prop_list/config/generator.yml
0 → 100644
View file @
48680c56
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
ProductPropList
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
product_prop_list
with_doctrine_route
:
true
actions_base_class
:
sfActions
skip
:
true
order
:
30
config
:
actions
:
~
fields
:
id
:
{
label
:
'
'
}
inner_id
:
{
label
:
'
inner_id'
}
title
:
{
label
:
'
Значение'
}
variant
:
{
label
:
'
Значение'
}
ProductProp
:
{
label
:
'
Параметр
товара'
}
product_prop_id
:
{
label
:
'
Параметр
товара'
}
created_at
:
{
label
:
'
Дата
создания'
}
updated_at
:
{
label
:
'
Дата
изменения'
}
list
:
layout
:
~
title
:
'
Значения
справочника'
display
:
[
_title
,
ProductProp
]
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/product_prop_list/lib/product_prop_listGeneratorConfiguration.class.php
0 → 100644
View file @
48680c56
<?php
/**
* product_prop_list module configuration.
*
* @package sf
* @subpackage product_prop_list
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_prop_listGeneratorConfiguration
extends
BaseProduct_prop_listGeneratorConfiguration
{
}
apps/arm/modules/product_prop_list/lib/product_prop_listGeneratorHelper.class.php
0 → 100644
View file @
48680c56
<?php
/**
* product_prop_list module helper.
*
* @package sf
* @subpackage product_prop_list
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_prop_listGeneratorHelper
extends
BaseProduct_prop_listGeneratorHelper
{
}
apps/arm/modules/product_prop_list/templates/_title.php
0 → 100644
View file @
48680c56
<?php
include_partial
(
'main/title'
,
array
(
'elem'
=>
$product_prop_list
));
?>
\ No newline at end of file
apps/arm/modules/product_prop_value/actions/actions.class.php
0 → 100644
View file @
48680c56
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/product_prop_valueGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/product_prop_valueGeneratorHelper.class.php'
;
/**
* product_prop_value actions.
*
* @package sf
* @subpackage product_prop_value
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
product_prop_valueActions
extends
autoProduct_prop_valueActions
{
}
apps/arm/modules/product_prop_value/config/generator.yml
0 → 100644
View file @
48680c56
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
ProductPropValue
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
product_prop_value
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
40
hr
:
true
skip
:
true
config
:
actions
:
~
fields
:
id
:
{
label
:
'
'
}
Product
:
{
label
:
'
Товар'
}
product_id
:
{
label
:
'
Товар'
}
ProductProp
:
{
label
:
'
Характеристика'
}
prop_id
:
{
label
:
'
Характеристика'
}
Offer
:
{
label
:
'
Предложение'
}
offer_id
:
{
label
:
'
Предложение'
}
created_at
:
{
label
:
'
'
}
updated_at
:
{
label
:
'
'
}
list
:
layout
:
~
title
:
'
Значения'
display
:
[
Product
,
Offer
,
ProductProp
]
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
Prev
1
2
3
4
5
6
7
8
9
10
…
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