| @@ 203-211 (lines=9) @@ | ||
| 200 | } |
|
| 201 | $fields->addFieldToTab("Root.Products", $productField); |
|
| 202 | if (!$this->ApplyToAllProducts) { |
|
| 203 | foreach ($this->Products() as $product) { |
|
| 204 | $fields->addFieldToTab( |
|
| 205 | "Root.Products", |
|
| 206 | new LiteralField( |
|
| 207 | "Product".$product->ID, |
|
| 208 | "<h5><a href=\"".$product->CMSEditLink()."\">"._t("ProductQuestion.BACK_TO", "Edit ")." ".$product->Title."</a></h5>" |
|
| 209 | ) |
|
| 210 | ); |
|
| 211 | } |
|
| 212 | } |
|
| 213 | if ($this->HasImages) { |
|
| 214 | $folders = Folder::get(); |
|
| @@ 32-40 (lines=9) @@ | ||
| 29 | ); |
|
| 30 | } |
|
| 31 | $fields->addFieldToTab("Root.Questions", new LiteralField("EditProductQuestions", "<h2><a href=\"/admin/product-config/ProductQuestion/\">"._t("ProductQuestion.EDIT_PRODUCT_QUESTIONS", "Edit Product Questions")."</a></h2>")); |
|
| 32 | foreach ($this->owner->ApplicableProductQuestions() as $productQuestion) { |
|
| 33 | $fields->addFieldToTab( |
|
| 34 | "Root.Questions", |
|
| 35 | new LiteralField( |
|
| 36 | "EditProductQuestion".$productQuestion->ID, |
|
| 37 | "<h5><a href=\"".$productQuestion->CMSEditLink()."\">"._t("ProductQuestion.EDIT", "Edit")." ".$productQuestion->Title."</a></h5>" |
|
| 38 | ) |
|
| 39 | ); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| 43 | public function ProductQuestionsAnswerFormLink($id = 0) |
|