moved some ezc functions from templates/item.cpp to Item and ItemContent
removed: templates/item.cpp updated: some html templates which use [item] or [item_tab] removed some old html templates: item_info.html and itam_tab_info.html
This commit is contained in:
@@ -90,6 +90,7 @@ void ItemContent::fields()
|
||||
field(L"privileges_octal", &ItemContent::privileges_octal);
|
||||
field(L"has_user", &ItemContent::has_user);
|
||||
field(L"has_group", &ItemContent::has_group);
|
||||
field(L"item_users_different", &ItemContent::item_users_different);
|
||||
field(L"user", &ItemContent::user);
|
||||
field(L"group", &ItemContent::group);
|
||||
field(L"type_is", &ItemContent::type_is);
|
||||
@@ -106,6 +107,12 @@ void ItemContent::fields()
|
||||
field(L"is_meta_object", &ItemContent::is_meta_object);
|
||||
field(L"is_admin_meta_object", &ItemContent::is_admin_meta_object);
|
||||
|
||||
field(L"are_dates_equal", &ItemContent::are_dates_equal);
|
||||
field(L"can_content_be_html_filtered", &ItemContent::CanContentBeHtmlFiltered);
|
||||
|
||||
field(L"is_link_to", &ItemContent::is_link_to);
|
||||
field(L"is_link_redirect", &ItemContent::is_link_redirect);
|
||||
|
||||
// IMPROVEME prepare a setter functions which tests whether content_raw_type_helper and content_parsed_type_helper are correct values
|
||||
content_raw_type = static_cast<ContentType>(content_raw_type_helper);
|
||||
content_parsed_type = static_cast<ContentType>(content_parsed_type_helper);
|
||||
@@ -450,6 +457,13 @@ bool ItemContent::has_group() const
|
||||
return group_id != -1;
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::item_users_different()
|
||||
{
|
||||
return user_id != modification_user_id;
|
||||
}
|
||||
|
||||
|
||||
void ItemContent::user(morm::Wrapper & wrapper)
|
||||
{
|
||||
Users * users = get_users();
|
||||
@@ -600,17 +614,36 @@ void ItemContent::display_user_name(EzcEnv & env)
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::is_meta_object()
|
||||
bool ItemContent::is_meta_object() const
|
||||
{
|
||||
return meta.is_object();
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::is_admin_meta_object()
|
||||
bool ItemContent::is_admin_meta_object() const
|
||||
{
|
||||
return admin_meta.is_object();
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::are_dates_equal() const
|
||||
{
|
||||
return date_creation == date_modification;
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::is_link_to() const
|
||||
{
|
||||
return !link_to.empty();
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::is_link_redirect() const
|
||||
{
|
||||
return link_redirect == 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Winix
|
||||
|
||||
|
Reference in New Issue
Block a user