Skip to content

Commit

Permalink
Missing image in container
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 20, 2018
1 parent f455e32 commit 200de22
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions htdocs/install/mysql/migration/8.0.0-9.0.0.sql
Expand Up @@ -133,6 +133,7 @@ ALTER TABLE llx_website_page CHANGE COLUMN fk_user_create fk_user_creat integer;
ALTER TABLE llx_website ADD COLUMN maincolor varchar(16);
ALTER TABLE llx_website ADD COLUMN maincolorbis varchar(16);

ALTER TABLE llx_website_page ADD COLUMN image varchar(255);

CREATE TABLE llx_takepos_floor_tables(
rowid integer AUTO_INCREMENT PRIMARY KEY,
Expand Down
1 change: 1 addition & 0 deletions htdocs/install/mysql/tables/llx_website_page.sql
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE llx_website_page
aliasalt varchar(255),
title varchar(255),
description varchar(255),
image varchar(255),
keywords varchar(255),
lang varchar(6),
fk_page integer,
Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/other.lang
Expand Up @@ -260,5 +260,7 @@ WebsiteSetup=Setup of module website
WEBSITE_PAGEURL=URL of page
WEBSITE_TITLE=Title
WEBSITE_DESCRIPTION=Description
WEBSITE_IMAGE=Image
WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used when container is of type 'blog_post' to show a preview of a news in some pages with dynamic content of Blog Posts.
WEBSITE_KEYWORDS=Keywords
LinesToImport=Lines to import
17 changes: 14 additions & 3 deletions htdocs/website/class/websitepage.class.php
Expand Up @@ -57,14 +57,24 @@ class WebsitePage extends CommonObject
public $pageurl;
public $aliasalt;
public $type_container;
public $title;

/**
* @var string title
*/
public $title;
/**
* @var string description
*/
public $description;

/**
* @var string image
*/
public $image;
/**
* @var string keywords
*/
public $keywords;

public $htmlheader;
public $content;
public $grabbed_from;
Expand All @@ -89,7 +99,8 @@ class WebsitePage extends CommonObject
'type_container' =>array('type'=>'varchar(16)', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'index'=>0, 'position'=>12, 'comment'=>'Type of container'),
'title' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1),
'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1),
'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
'image' =>array('type'=>'varchar(255)', 'label'=>'Image', 'enabled'=>1, 'visible'=>1, 'position'=>32, 'searchall'=>0, 'help'=>'Relative path of media. Used if Type is "blog_post"'),
'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
//'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000),
'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'),
Expand Down
8 changes: 8 additions & 0 deletions htdocs/website/index.php
Expand Up @@ -2468,6 +2468,7 @@
if (GETPOST('WEBSITE_PAGENAME','alpha')) $pageurl=GETPOST('WEBSITE_PAGENAME','alpha');
if (GETPOST('WEBSITE_ALIASALT','alpha')) $pagealiasalt=GETPOST('WEBSITE_ALIASALT','alpha');
if (GETPOST('WEBSITE_DESCRIPTION','alpha')) $pagedescription=GETPOST('WEBSITE_DESCRIPTION','alpha');
if (GETPOST('WEBSITE_IMAGE','alpha')) $pageimage=GETPOST('WEBSITE_IMAGE','alpha');
if (GETPOST('WEBSITE_KEYWORDS','alpha')) $pagekeywords=GETPOST('WEBSITE_KEYWORDS','alpha');
if (GETPOST('WEBSITE_LANG','aZ09')) $pagelang=GETPOST('WEBSITE_LANG','aZ09');
if (GETPOST('htmlheader','none')) $pagehtmlheader=GETPOST('htmlheader','none');
Expand Down Expand Up @@ -2508,6 +2509,13 @@
print '<input type="text" class="flat quatrevingtpercent" name="WEBSITE_DESCRIPTION" value="'.dol_escape_htmltag($pagedescription).'">';
print '</td></tr>';

print '<tr><td>';
$htmlhelp=$langs->trans("WEBSITE_IMAGEDesc");
print $form->textwithpicto($langs->trans('WEBSITE_IMAGE'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
print '</td><td>';
print '<input type="text" class="flat quatrevingtpercent" name="WEBSITE_IMAGE" value="'.dol_escape_htmltag($pageimage).'">';
print '</td></tr>';

print '<tr><td>';
print $langs->trans('WEBSITE_KEYWORDS');
print '</td><td>';
Expand Down

0 comments on commit 200de22

Please sign in to comment.