Revize 5257d326
Přidáno uživatelem Filip Jani před asi 6 roky(ů)
app/AdminModule/component/Transliteration/TransliterationGrid.php | ||
---|---|---|
88 | 88 |
BookRepository::TABLE_NAME, |
89 | 89 |
BookRepository::COLUMN_ID, |
90 | 90 |
BookRepository::COLUMN_BOOK_ABREV, |
91 |
TransliterationRepository::COLUMN_BOOK_ID |
|
91 |
TransliterationRepository::COLUMN_BOOK_ID, |
|
92 |
'Book:edit' |
|
92 | 93 |
); |
93 | 94 |
}); |
94 | 95 |
$this->addColumnNumber(TransliterationRepository::COLUMN_CHAPTER, 'Chapter'); |
... | ... | |
100 | 101 |
MuseumRepository::TABLE_NAME, |
101 | 102 |
MuseumRepository::COLUMN_ID, |
102 | 103 |
MuseumRepository::COLUMN_NAME, |
103 |
TransliterationRepository::COLUMN_MUSEUM_ID |
|
104 |
TransliterationRepository::COLUMN_MUSEUM_ID, |
|
105 |
'Museum:edit' |
|
104 | 106 |
); |
105 | 107 |
}); |
106 | 108 |
$this->addColumnText(TransliterationRepository::COLUMN_MUSEUM_NO, 'Museum No'); |
... | ... | |
112 | 114 |
OriginRepository::TABLE_NAME, |
113 | 115 |
OriginRepository::COLUMN_ID, |
114 | 116 |
OriginRepository::COLUMN_ORIGIN, |
115 |
TransliterationRepository::COLUMN_ORIGIN_ID |
|
117 |
TransliterationRepository::COLUMN_ORIGIN_ID, |
|
118 |
'Origin:edit' |
|
116 | 119 |
); |
117 | 120 |
}); |
118 | 121 |
$this->addColumnLink(TransliterationRepository::COLUMN_BOOK_TYPE_ID, 'Book Type') |
... | ... | |
123 | 126 |
BookTypeRepository::TABLE_NAME, |
124 | 127 |
BookTypeRepository::COLUMN_ID, |
125 | 128 |
BookTypeRepository::COLUMN_BOOK_TYPE, |
126 |
TransliterationRepository::COLUMN_BOOK_TYPE_ID |
|
129 |
TransliterationRepository::COLUMN_BOOK_TYPE_ID, |
|
130 |
'BookType:edit' |
|
127 | 131 |
); |
128 | 132 |
}); |
129 | 133 |
$this->addColumnText(TransliterationRepository::COLUMN_REG_NO, 'Reg No'); |
... | ... | |
202 | 206 |
* @param string $throughColumn |
203 | 207 |
* @param string $titleColumn |
204 | 208 |
* @param string $idColumn |
209 |
* @param string $destination |
|
205 | 210 |
* @return string |
206 | 211 |
* @throws \Nette\Application\UI\InvalidLinkException |
207 | 212 |
*/ |
208 |
private function getRenderer(ActiveRow $activeRow, string $key, string $throughColumn, string $titleColumn, string $idColumn) |
|
213 |
private function getRenderer(ActiveRow $activeRow, string $key, string $throughColumn, string $titleColumn, string $idColumn, string $destination)
|
|
209 | 214 |
{ |
210 | 215 |
$ref = $activeRow->ref($key, $throughColumn); |
211 | 216 |
|
212 | 217 |
if ($ref) |
213 | 218 |
{ |
214 | 219 |
$title = $ref->{$titleColumn}; |
215 |
return $this->getRendererWithLink($activeRow, $title, 'Book:edit', $activeRow->{$idColumn});
|
|
220 |
return $this->getRendererWithLink($activeRow, $title, $destination, $activeRow->{$idColumn});
|
|
216 | 221 |
} else |
217 | 222 |
{ |
218 | 223 |
return ""; |
Také k dispozici: Unified diff
Re 7333 oprava odkazů