Commit d8fe604b authored by Laurent's avatar Laurent
Browse files

dev #65267 update trailer link is a button

parent f41c2600
......@@ -47,8 +47,11 @@ class ZendAfi_View_Helper_Biographie extends ZendAfi_View_Helper_BaseHelper {
'action' => 'biography',
'id' => $notice->getId()]);
return $this->_tag('a', $this->_('Modifier la biographie'),
['href' => $url, 'data-popup' => 'true']);
return $this->view->tag('button',
$this->_('Modifier la biographie'),
['class' => 'admin-button',
'data-url' => $url,
'data-popup' => 'true']);
}
......
......@@ -36,8 +36,9 @@ class ZendAfi_View_Helper_Trailer extends ZendAfi_View_Helper_BaseHelper {
protected function _renderTrailer($notice, $width) {
return
$this->_renderPlayer($notice, $width)
. $this->_renderEditLink($notice);
$this->_renderEditLink($notice)
.
$this->_renderPlayer($notice, $width);
}
......@@ -66,8 +67,10 @@ class ZendAfi_View_Helper_Trailer extends ZendAfi_View_Helper_BaseHelper {
'action' => 'trailer',
'id' => $notice->getId()]);
return $this->view->tag('a',
return $this->view->tag('button',
$this->_('Modifier la bande-annonce'),
['href' => $url, 'data-popup' => 'true']);
['class' => 'admin-button',
'data-url' => $url,
'data-popup' => 'true']);
}
}
......@@ -427,7 +427,7 @@ class RecordsControllerTrailerPostTest extends RecordsControllerTestCase {
->beStrict();
$this->postDispatch('/admin/records/trailer/id/12345',
['url_trailer' => 'http://youtu.be/BEPO2']);
['url_trailer' => 'https://youtu.be/BEPO2']);
$this->assertFlashMessengerContentContains('La bande-annonce a bien été mise à jour');
}
......
......@@ -506,7 +506,7 @@ class NoticeAjaxControllerBandeAnnonceTest extends AbstractControllerTestCase {
'id_bib' => 3])->beAbonneSIGB());
$this->dispatch('noticeajax/bandeannonce/id/2', true);
$this->assertNotXPath('//a[contains(@href, "record")]');
$this->assertNotXPath('//button');
}
......@@ -520,7 +520,7 @@ class NoticeAjaxControllerBandeAnnonceTest extends AbstractControllerTestCase {
'id_bib' => 3])->beModoBib());
$this->dispatch('noticeajax/bandeannonce/id/2', true);
$this->assertXPath('//a[@data-popup="true"][contains(@href, "records/trailer/id/2")]');
$this->assertXPath('//button[@data-popup="true"][contains(@data-url, "records/trailer/id/2")]');
}
......@@ -1981,7 +1981,7 @@ class NoticeAjaxControllerBiographieTest extends NoticeAjaxControllerBiographieT
/** @test */
public function linkModifierLaBiographieShouldBeVisible() {
$this->assertXPathContentContains('//a', 'Modifier la biographie');
$this->assertXPathContentContains('//button', 'Modifier la biographie');
}
......@@ -2005,7 +2005,7 @@ class NoticeAjaxControllerBiographieTest extends NoticeAjaxControllerBiographieT
Zend_Auth::getInstance()->logUser($abon);
$this->dispatch('/opac/noticeajax/biographie/id_notice/23', true);
$this->assertNotXPathContentContains('//a', 'Modifier la biographie');
$this->assertNotXPathContentContains('//button', 'Modifier la biographie');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment