mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Added a basic show part info with new design. Not finished yet...
This commit is contained in:
parent
f8bd1458d3
commit
f0bea8ff4d
22 changed files with 7883 additions and 25 deletions
|
@ -69,14 +69,11 @@ abstract class NamedDBElement extends DBElement
|
|||
|
||||
/**
|
||||
* Returns the last time when the element was modified.
|
||||
* @param $formatted bool When true, the date gets formatted with the locale and timezone settings.
|
||||
* When false, the raw value from the DB is returned.
|
||||
* @return string The time of the last edit.
|
||||
*/
|
||||
public function getLastModified(bool $formatted = true) : string
|
||||
public function getLastModified() : \DateTime
|
||||
{
|
||||
//TODO
|
||||
return "TODO";
|
||||
return $this->lastModified;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,10 +82,10 @@ abstract class NamedDBElement extends DBElement
|
|||
* When false, the raw value from the DB is returned.
|
||||
* @return string The creation time of the part.
|
||||
*/
|
||||
public function getDatetimeAdded(bool $formatted = true) : string
|
||||
public function getDatetimeAdded() : \DateTime
|
||||
{
|
||||
//TODO
|
||||
return "TODO";
|
||||
return $this->addedDate;
|
||||
}
|
||||
|
||||
/********************************************************************************
|
||||
|
|
|
@ -15,7 +15,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
* Class Orderdetail
|
||||
* @package App\Entity
|
||||
*
|
||||
* @ORM\Table("oderdetails")
|
||||
* @ORM\Table("orderdetails")
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class Orderdetail extends DBElement
|
||||
|
|
|
@ -219,7 +219,7 @@ class Part extends AttachmentContainingDBElement
|
|||
* @param boolean|int $bbcode_parsing_level Should BBCode converted to HTML, before returning
|
||||
* @return string the comment
|
||||
*/
|
||||
public function getComment($bbcode_parsing_level = BBCodeParsingLevel::PARSE) : string
|
||||
public function getComment($bbcode_parsing_level = true /*= BBCodeParsingLevel::PARSE*/) : string
|
||||
{
|
||||
|
||||
$val = htmlspecialchars($this->comment);
|
||||
|
|
|
@ -187,13 +187,13 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
|
|||
if (! \is_array($this->full_path_strings)) {
|
||||
$this->full_path_strings = array();
|
||||
$this->full_path_strings[] = $this->getName();
|
||||
$parent_id = $this->getParentID();
|
||||
while ($parent_id > 0) {
|
||||
/** @var StructuralDBElement $element */
|
||||
$element = static::getInstance($this->database, $this->current_user, $this->log, $parent_id);
|
||||
$parent_id = $element->getParentID();
|
||||
$element = $this;
|
||||
|
||||
while ($element->parent != null) {
|
||||
$element = $element->parent;
|
||||
$this->full_path_strings[] = $element->getName();
|
||||
}
|
||||
|
||||
$this->full_path_strings = array_reverse($this->full_path_strings);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue