Merge remote-tracking branch 'origin/3.1'

This commit is contained in:
Ingo Schommer 2013-08-16 13:37:49 +02:00
commit 7ad9712f05
38 changed files with 176 additions and 146 deletions

View File

@ -41,8 +41,7 @@ class CMSSettingsController extends LeftAndMain {
$this, 'EditForm', $fields, $actions
)->setHTMLID('Form_EditForm');
$form->setResponseNegotiator($this->getResponseNegotiator());
$form->addExtraClass('root-form');
$form->addExtraClass('cms-edit-form cms-panel-padded center');
$form->addExtraClass('cms-add-form cms-content center cms-edit-form');
// don't add data-pjax-fragment=CurrentForm, its added in the content template instead
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');

View File

@ -163,6 +163,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
private static $extensions = array(
"Hierarchy",
"Versioned('Stage', 'Live')",
"SiteTreeLinkTracking"
);
private static $searchable_fields = array(
@ -1469,28 +1470,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
public function syncLinkTracking() {
// Build a list of HTMLText fields
$allFields = $this->db();
$htmlFields = array();
foreach($allFields as $field => $fieldSpec) {
if(preg_match('/([^(]+)/', $fieldSpec, $matches)) {
$class = $matches[0];
if(class_exists($class)){
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
}
}
}
$linkedPages = array();
$linkedFiles = array();
$this->HasBrokenLink = false;
$this->HasBrokenFile = false;
foreach($htmlFields as $field) {
$formField = new HTMLEditorField($field);
$formField->setValue($this->$field);
$formField->saveInto($this);
}
$this->extend('augmentSyncLinkTracking');
}

View File

@ -0,0 +1,127 @@
<?php
/**
* Adds tracking of links in any HTMLText fields which reference SiteTree or File items
*
* Attaching this to any DataObject will add four fields which contain all links to SiteTree and File items
* referenced in any HTMLText fields, and two booleans to indicate if there are any broken links
*
* Call augmentSyncLinkTracking to update those fields with any changes to those fields
*/
class SiteTreeLinkTracking extends DataExtension {
private static $db = array(
"HasBrokenFile" => "Boolean",
"HasBrokenLink" => "Boolean"
);
private static $many_many = array(
"LinkTracking" => "SiteTree",
"ImageTracking" => "File"
);
private static $many_many_extraFields = array(
"LinkTracking" => array("FieldName" => "Varchar"),
"ImageTracking" => array("FieldName" => "Varchar")
);
function trackLinksInField($field) {
$record = $this->owner;
$linkedPages = array();
$linkedFiles = array();
$htmlValue = Injector::inst()->create('HTMLValue', $record->$field);
// Populate link tracking for internal links & links to asset files.
if($links = $htmlValue->getElementsByTagName('a')) foreach($links as $link) {
$href = Director::makeRelative($link->getAttribute('href'));
if($href) {
if(preg_match('/\[sitetree_link,id=([0-9]+)\]/i', $href, $matches)) {
$ID = $matches[1];
// clear out any broken link classes
if($class = $link->getAttribute('class')) {
$link->setAttribute('class',
preg_replace('/(^ss-broken|ss-broken$| ss-broken )/', null, $class));
}
$linkedPages[] = $ID;
if(!DataObject::get_by_id('SiteTree', $ID)) $record->HasBrokenLink = true;
} else if(substr($href, 0, strlen(ASSETS_DIR) + 1) == ASSETS_DIR.'/') {
$candidateFile = File::find(Convert::raw2sql(urldecode($href)));
if($candidateFile) {
$linkedFiles[] = $candidateFile->ID;
} else {
$record->HasBrokenFile = true;
}
} else if($href == '' || $href[0] == '/') {
$record->HasBrokenLink = true;
}
}
}
// Add file tracking for image references
if($images = $htmlValue->getElementsByTagName('img')) foreach($images as $img) {
if($image = File::find($path = urldecode(Director::makeRelative($img->getAttribute('src'))))) {
$linkedFiles[] = $image->ID;
}
else {
if(substr($path, 0, strlen(ASSETS_DIR) + 1) == ASSETS_DIR . '/') {
$record->HasBrokenFile = true;
}
}
}
// Update the "LinkTracking" many_many
if($record->ID && $record->many_many('LinkTracking') && $tracker = $record->LinkTracking()) {
$tracker->removeByFilter(sprintf(
'"FieldName" = \'%s\' AND "%s" = %d',
$field,
$tracker->getForeignKey(),
$record->ID
));
if($linkedPages) foreach($linkedPages as $item) {
$tracker->add($item, array('FieldName' => $field));
}
}
// Update the "ImageTracking" many_many
if($record->ID && $record->many_many('ImageTracking') && $tracker = $record->ImageTracking()) {
$tracker->removeByFilter(sprintf(
'"FieldName" = \'%s\' AND "%s" = %d',
$field,
$tracker->getForeignKey(),
$record->ID
));
if($linkedFiles) foreach($linkedFiles as $item) {
$tracker->add($item, array('FieldName' => $field));
}
}
}
function augmentSyncLinkTracking() {
// Reset boolean broken flags
$this->owner->HasBrokenLink = false;
$this->owner->HasBrokenFile = false;
// Build a list of HTMLText fields
$allFields = $this->owner->db();
$htmlFields = array();
foreach($allFields as $field => $fieldSpec) {
if(preg_match('/([^(]+)/', $fieldSpec, $matches)) {
$class = $matches[0];
if(class_exists($class)){
if($class == 'HTMLText' || is_subclass_of($class, 'HTMLText')) $htmlFields[] = $field;
}
}
}
foreach($htmlFields as $field) $this->trackLinksInField($field);
}
}

View File

@ -29,7 +29,6 @@ af:
OtherGroupTitle: Ander
ParameterLiveCheckbox: 'Kies lewendige werf'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
ShareLink: 'Deel skakel'
SilverStripeNavigatorLinkl:
CloseLink: Maak toe

View File

@ -60,7 +60,6 @@ ar:
ARCHIVEDSITEFROM: 'موقع تمت أرشفته منذ'
CMS: نظام إدارة المحتوى
DRAFTSITE: 'موقع في المسودة'
DRAFT_SITE_ACCESS_RESTRICTION: 'بجب تسجيل الدخول ببيانات نظام إدارة المحتوى للتمكن من مشاهدة المسودات أو محتوى الأرشيف. <a href="%s">اضغط هنا للرجوع إلى الموقع المنشور.</a>'
LOGGEDINAS: 'الدخول كـ'
LOGIN: الدخول
LOGOUT: 'الخروج'
@ -129,7 +128,6 @@ ar:
OtherGroupTitle: أخرى
ParameterLiveCheckbox: 'التأكد من حيوية الموقع'
SilverStripeNavigatorLink:
ShareInstructions: 'لمشاركة هذا إلى هذه النسخة، انسخ وإلصق الرابط أدناه....'
ShareLink: 'رابط مشترك'
SilverStripeNavigatorLinkl:
CloseLink: إغلاق

View File

@ -14,8 +14,6 @@ ast:
DEFAULTSERVERERRORPAGETITLE: 'Error del servidor'
LeftAndMain:
SearchResults: 'Resultaos de la busca'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SilverStripeNavigatorLinkl:
CloseLink: Zarrar
SiteTree:

View File

@ -42,7 +42,6 @@ az:
SEARCH: Axtar
SearchResults: 'Axtarış nəticələri'
SilverStripeNavigatorLink:
ShareInstructions: 'Bu səhifəni paylaşmaq üçün , keçidi copy paste edin.'
ShareLink: 'Linki Paylaş'
SilverStripeNavigatorLinkl:
CloseLink: Bağla

View File

@ -13,8 +13,6 @@ bs:
REMOVEDPAGEFROMDRAFT: 'Uklonjeno ''%s'' sa privremenog nacrta stranice'
ROLLBACK: 'Vrati na ovo izdanje'
SAVE: Snimi
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Morate se prijaviti sa Vašom CMS šifrom kako biste pregledali privremeni ili arhivirani sadržaj. <a href="%s">Kliknite ovdje da biste se vratili na objavljenu stranicu.</a>'
ErrorPage:
400: '400 - Pogrešan zahtjev'
401: '401 - Neovlašteno'
@ -60,8 +58,6 @@ bs:
SideReport:
EMPTYPAGES: 'Prazne stranice'
LAST2WEEKS: 'Izmjenjene stranice u posljednje 2 sedmice'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Svi korisnici
ACCESSHEADER: 'Ko može pregledati ovu stavku na mojoj stranici?'

View File

@ -15,8 +15,6 @@ ca:
RESTORE: Restaura
ROLLBACK: 'Torna a aquesta versió'
SAVE: Desa
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Heu d''entrar amb la vostra contrasenya per a veure l''esborrany o contingut arxivat. <a href="%s">Premeu aquí per a tornar al lloc publicat.</a>'
ErrorPage:
400: '400 - Mala petició'
401: '401 - Sense autorització'
@ -62,8 +60,6 @@ ca:
SideReport:
EMPTYPAGES: 'Pàgines buides'
LAST2WEEKS: 'Pàgines editades les dues darreres setmanes'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Qualsevol
ACCESSHEADER: 'Qui pot veure aquesta pàgina al meu lloc web?'

View File

@ -1,7 +1,5 @@
el:
CMSMain:
SAVE: Αποθήκευση
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
ViewArchivedEmail_ss:
HAVEASKED: 'Επιθυμείται να εμφανιστεί το περιεχόμενο του ιστοχώρου σας την '

View File

@ -4,7 +4,6 @@ en_GB:
DELETEFP: Delete from the published site
PUBALLFUN2: "Pressing this button will do the equivalent of going to every page and pressing \"publish\". It's intended to be used after there have been massive edits of the content, such as when the site was\nfirst built.\n"
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'You must log in with your CMS password in order to view the draft or archived content. <a href="%s">Click here to go back to the published site.</a>'
UnableDeleteInstall: 'Unable to delete installation files. Please delete the files below manually.'
ErrorPage:
401: '401 - Unauthorised'
@ -13,8 +12,6 @@ en_GB:
RedirectorPage:
DESCRIPTION: 'Redirects to another page'
PLURALNAME: 'Redirector Pages'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a link to this page, copy and paste the link below.'
SiteTree:
DEFAULTHOMECONTENT: '<p>Welcome to SilverStripe! This is the default home page. You can edit this page by opening <a href="admin/">the CMS</a>. You can now access the <a href="http://doc.silverstripe.org">developer documentation</a>, or begin <a href="http://doc.silverstripe.org/doku.php?id=tutorials">the tutorials.</a></p>'
DEPENDENT_NOTE: 'The following pages depend on this page. This includes virtual pages, redirector pages and pages with content links.'

View File

@ -47,7 +47,6 @@ es_AR:
NOTEWONTBESHOWN: 'Nota: este mensage no se mostrará a sus visitantes'
ContentController:
DRAFTSITE: 'Sitio borrador'
DRAFT_SITE_ACCESS_RESTRICTION: 'Debes iniciar sesión con tu contraseña CMS para poder ver el contenido del borrador archivado . <a href="%s">Haz click aquí para regresar al sitio publicado.</a>'
LOGGEDINAS: 'Conectado como'
LOGIN: Iniciar sesión
LOGOUT: 'Desconectarse'
@ -116,7 +115,6 @@ es_AR:
OtherGroupTitle: Otro
ParameterLiveCheckbox: 'Verificar el sitio en vivo'
SilverStripeNavigatorLink:
ShareInstructions: 'Para compartir esta página, copiar y pegar el enlace inferior.'
ShareLink: 'Compartir enlace'
SilverStripeNavigatorLinkl:
CloseLink: Cerrar

View File

@ -48,7 +48,6 @@ es_MX:
ContentController:
ARCHIVEDSITEFROM: 'Sito archivado de'
DRAFTSITE: 'Proyecto del Sitio'
DRAFT_SITE_ACCESS_RESTRICTION: 'Usted debe iniciar sesión con su contraseña CMS para poder ver el contenido del boceto archivado. <a href="%s">Haga clic aquí para regresar al sitio publicado.</a>'
LOGGEDINAS: 'Conectado cómo'
LOGIN: Iniciar sesión
LOGOUT: 'Cerrar sesión'
@ -117,7 +116,6 @@ es_MX:
OtherGroupTitle: Otro
ParameterLiveCheckbox: 'Comprobar el sitio vivo'
SilverStripeNavigatorLink:
ShareInstructions: 'Para compartir ésto a esta página, copie y pegue el enlace de abajo.'
ShareLink: 'Compartir enlace'
SilverStripeNavigatorLinkl:
CloseLink: Cerrar

View File

@ -49,8 +49,6 @@ fa_IR:
EMPTYPAGES: 'صفحات بدون مطلب'
OtherGroupTitle: سایر
ParameterLiveCheckbox: 'بررسی سایت به صورت زنده'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteConfig:
DEFAULTTHEME: '(استفاده از پوسته پیشفرض)'
EDITHEADER: 'چه کسی میتواند صفحات را در این سایت ویرایش کند؟'

View File

@ -33,8 +33,6 @@ fo:
SideReport:
EMPTYPAGES: 'Tómar síður'
LAST2WEEKS: 'Síður broyttar seinastu 2 vikurnar'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Øll
ACCESSHEADER: 'Hvør skal kunna síggja hesa síðuna?'

View File

@ -10,8 +10,6 @@ hr:
PUBALLFUN2: "Ovaj gumb radi isto što i klikanje na \"objavi\" gumbe za svaku stranicu posebno. Koristi se nakon velikih promjena u sadržaju, kao npr. kod prve objave stranice."
ROLLBACK: 'Vrati na ovu verziju'
SAVE: Snimi
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Morate biti prijavljeni sa vašom CMS zaporkom kako bi ste mogli vidjeti privremeni ili arhivirani sadržaj. <a href="%s">Kliknite kako bi ste se vratili na objavljen dio stranice</a>'
RedirectorPage:
HASBEENSETUP: 'Stranica za preusjeravanje nema postavljenog preusmjeravanja'
HEADER: 'Ova stranica preusmjeriti će korisnike na drugu stranicu'
@ -23,8 +21,6 @@ hr:
SideReport:
EMPTYPAGES: 'Prazne stranice'
LAST2WEEKS: 'Stranice mijenjane u zadnja 2 tjedna'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Svi
ACCESSHEADER: 'Tko može pregledavati ovu stranicu?'

View File

@ -1,3 +1 @@
hy_AM:
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
hy_AM: {}

View File

@ -4,8 +4,6 @@ id:
DELETEFP: Hapus dari situs yang telah diterbitkan
RESTORE: Pulihkan
SAVE: Simpan
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Anda harus masuk dengan password CMS Anda untuk melihat konten draft atau terarsip. <a href="%s">Klik di sini untuk kembali ke situs yang dipublikasi</a>'
ErrorPage:
400: '400 - Permintaan buruk'
401: '401 - Tidak ada otorisasi'
@ -48,8 +46,6 @@ id:
GO: Pergi
SEARCH: Cari
SearchResults: 'Hasil Pencarian'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SilverStripeNavigatorLinkl:
CloseLink: Tutup
SiteConfig:

View File

@ -5,7 +5,6 @@ is:
RESTORE: Endurheimta
SAVE: Vista
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Þú verður að innskrá þig með lykilorðinu þínu til að geta séð drög eða innihald skjalasafns. <a href="%s">Smelltu hér til að fara til baka á útgefnu síðuna.</a>'
LOGGEDINAS: 'Innskráður sem'
LOGIN: Innskrá
LOGOUT: 'Útskrá'
@ -31,8 +30,6 @@ is:
GO: Framkvæma
SEARCH: Leita
SearchResults: 'Leitar niðurstaða'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SilverStripeNavigatorLinkl:
CloseLink: Loka
SiteConfig:

View File

@ -1,8 +1,4 @@
km:
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'ដើម្បីមើលទំព័រប្រៀងសូម ចូលកាន់ប្រព័ន្ធគ្រប់គ្រងដោយប្រើយឈ្មោះ និងពាក្យសំងាត់របស់អ្នក សូមចុចត្រនេះ <a href="%s"> ដើម្បីត្រលប់ទៅ កាន់ទំព័ររួចរាល់។</a>'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
Content: មាតិការ
HTMLEDITORTITLE: អត្ថបទ

View File

@ -1,3 +1 @@
ko:
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
ko: {}

View File

@ -9,7 +9,6 @@ lv:
ContentController:
ARCHIVEDSITEFROM: 'Arhivēta vietne no'
DRAFTSITE: 'Melnrakstu vietne'
DRAFT_SITE_ACCESS_RESTRICTION: 'Lai aplūkotu melnrakstu vai arhivētu saturu, Jums ir jāpieslēdzas ar Jūsu CMS paroli. <a href="%s">Lai dotos atpakaļu uz publisko lapu, klikšķiniet šeit.</a>'
LOGGEDINAS: 'Pieslēdzies kā'
LOGIN: Pieslēgties
LOGOUT: 'Atslēgties'
@ -63,7 +62,6 @@ lv:
SEARCH: Meklēt
SearchResults: 'Meklēšanas rezultāti'
SilverStripeNavigatorLink:
ShareInstructions: 'Lai to koplietotu ar šo lapu, nokopējiet un ievietojoiet zemāk redzamo saiti.'
ShareLink: 'Koplietot saiti'
SilverStripeNavigatorLinkl:
CloseLink: Aizvērt

View File

@ -1,6 +1,4 @@
ms:
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Anda pertu mendaftar masuk dengan kata aluan CMS anda untuk melihat draf atau kandungan diarkib. <a href="%s">Klik sini untuk kembali ke tapak tertebit.</a>'
ErrorPage:
417: '417 - kegagalan expectation'
CODE: 'Kod kesilapan'
@ -18,8 +16,6 @@ ms:
REDIRECTTOEXTERNAL: 'Laman web lain'
REDIRECTTOPAGE: 'Tambah halaman ke laman anda'
YOURPAGE: 'Halaman di laman anda'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Sesiapa sahaja
ACCESSHEADER: 'Siapa yang boleh melihat mukasurat ini?'

View File

@ -1,3 +1 @@
my:
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
my: {}

View File

@ -1,6 +1,4 @@
ne:
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'यदि तपाईं draft अथवा archived सामाग्री हेर्न चाहानुहुन्छ भन्ने आफ्नो CMSको पासओडले भित्र जानुपर्छ । <a href="%s">प्रकाशित साईटमा जान यहाँ थिचु्नुहोस् । </a>'
ErrorPage:
CODE: 'त्रुटी सङ्केत '
RedirectorPage:
@ -11,8 +9,6 @@ ne:
REDIRECTTOEXTERNAL: 'अर्को वेबसाईट'
REDIRECTTOPAGE: 'तपाईंको वेबसाईटमा एउटा पेज'
YOURPAGE: 'तपाईंको वेबसाईटमा एउटा पेज'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: जोकोहिले
ACCESSHEADER: 'मेरो सईटमा कसले यो पजे हेर्न सक्छ ? '

View File

@ -1,17 +1,9 @@
pa:
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'ਕੱਚੀ ਜਾਂ ਪੁਰਾਣੀ ਸਾਈਟ ਦੇਖਣ ਲਈ ਤੁਹਾਨੰੂ ਜ਼ਰੂਰ ਆਪਣੇ CMS ਪਾਸਵਰਡ ਨਾਲ ਲੋਿਗਨ ਕਰਨੀ ਪਵੇਗੀ।
<a href="%s">ਛਾਪੀ ਹੋਈ ਸਾਈਟ ਤੇ ਜਾਨ ਲਈ ਇੱਥੇ ਕਿਲੱਕ ਕਰੋ।</a>
'
RedirectorPage:
OTHERURL: 'ਹੋਰ ਵੈੱਬ-ਸਾਈਟ URL'
REDIRECTTOEXTERNAL: 'ਦੂਸਰੀ ਵੈੱਬ-ਸਾਈਟ '
REDIRECTTOPAGE: 'ਇੱਕ ਪੰਨਾ ਤੁਹਾਡੀ ਵੈੱਬ-ਸਾਈਟ ਤੇ '
YOURPAGE: 'ਇੱਕ ਪੰਨਾ ਤੁਹਾਡੀ ਵੈੱਬ-ਸਾਈਟ ਤੇ '
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: "ਕੋਈ ਵੀ\t"
ACCESSHEADER: 'Who can view this page on my site?'

View File

@ -15,8 +15,6 @@ pt_BR:
RESTORE: Restaurar
ROLLBACK: 'Reverter para esta versão'
SAVE: Salvar
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Você precisa entrar com sua senha do CMS para ver os rascunhos ou o conteúdo arquivado. <a href="%s">Clique aqui para voltar para o site publicado.</a>'
ErrorPage:
400: '400 - Requisição Invalida'
401: '401 - Não autorizado'
@ -62,8 +60,6 @@ pt_BR:
SideReport:
EMPTYPAGES: 'Páginas em branco'
LAST2WEEKS: 'Páginas editadas nas últimas 2 semanas'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Qualquer pessoa
ACCESSHEADER: 'Quem pode ver esta página?'

View File

@ -25,8 +25,6 @@ ro:
VersionUnknown: Неизвестно
RedirectorPage:
OTHERURL: 'Адрес другого сайта'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Oricine
ACCESSHEADER: 'Cine poate vizualiza această pagină pe site-ul meu?'

View File

@ -39,8 +39,6 @@ si:
SideReport:
EMPTYPAGES: 'හිස් පිටු'
LAST2WEEKS: 'අවසාන සති 2 තුල වෙනස් කරන ලද පිටු'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: සියලු දෙනා
ACCESSHEADER: 'මෙම පිටුව බැලිය හැකි අය'

View File

@ -34,8 +34,6 @@ sr:
Title: 'Sve stranice'
ContentControl:
NOTEWONTBESHOWN: 'Primedba: ova poruka neće biti prikazana vašim posetiocima'
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Морате да се пријавите својом лозинком на CMS да бисте приступили нацртима или архивираном садржају. <a href="%s">Кликните овде да бисте се вратили на завршен сајт.</a>'
ErrorPage:
400: '400 - Лош захтев'
403: '403 - Забрањено'
@ -69,7 +67,6 @@ sr:
EMPTYPAGES: 'Празне стране'
LAST2WEEKS: 'Стране мењане у задње две недеље'
SilverStripeNavigatorLink:
ShareInstructions: 'Da bi ste podelili link ka ovoj stranici, kopirajte i dodajte link ispod.'
ShareLink: 'Podeliti link'
SilverStripeNavigatorLinkl:
CloseLink: Zatvoriti

View File

@ -1,3 +1 @@
tl:
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
tl: {}

View File

@ -5,5 +5,3 @@ uz:
PUBALLFUN: '"Hammasi chop etish" funktsiyasi'
PUBALLFUN2: "Bu tugmani bosish bilan siz saytda bor bo'lgan hamma sahifalar chop etgan bo'lasiz."
SAVE: Saqlash
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'

View File

@ -2,8 +2,6 @@ vi_VN:
CMSMain:
PAGENOTEXISTS: 'Không tìm thấy trang này.'
SAVE: Lưu
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: 'Bạn phải đăng nhập để xem trang nháp hoặc trang lưu trữ. <a href="%s">Trở lại trang cũ.</a>'
ErrorPage:
CODE: 'Mã lỗi'
DEFAULTERRORPAGECONTENT: '<p>Bạn truy cập vào một trang không tồn tại</p>
@ -20,8 +18,6 @@ vi_VN:
REDIRECTTOEXTERNAL: 'Website khác'
REDIRECTTOPAGE: 'Một trang trên website'
YOURPAGE: 'Trang'
SilverStripeNavigatorLink:
ShareInstructions: 'To share a this to this page, copy and paste the link below.'
SiteTree:
ACCESSANYONE: Bất cứ ai
ACCESSHEADER: 'Ai có thể xem trang này ?'

View File

@ -15,8 +15,6 @@ zh_CN:
SAVE: 保存
CMSSiteTreeFilter_DeletedPages:
Title: '所有页面(包含已删除)'
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: '您必需用您的CMS密码来登录才可浏览预备发布或已归档内容。<a href="%s">点击这里可回到正式发布站<a>'
ErrorPage:
CODE: '错误代码'
Folder:
@ -38,7 +36,6 @@ zh_CN:
EMPTYPAGES: '空白页'
LAST2WEEKS: '在过去2周内编辑过的网页'
SilverStripeNavigatorLink:
ShareInstructions: '分享此页,请复制粘贴下面的链接'
ShareLink: '分享链接'
SilverStripeNavigatorLinkl:
CloseLink: 关闭

View File

@ -45,8 +45,6 @@ zh_TW:
Title: '所有網頁'
ContentControl:
NOTEWONTBESHOWN: '備註: 此訊息將不會顯示給您的訪客看'
ContentController:
DRAFT_SITE_ACCESS_RESTRICTION: '你必須先登入才能瀏覽草稿或歸檔內容。<a href="%s">回到正式發布站</a>'
ErrorPage:
CODE: '錯誤代碼'
DEFAULTERRORPAGECONTENT: '<p>抱歉, 看來您正再嘗試存取一個不存在的網頁</p><p>請檢查您正在嘗試存取網址的拼寫並再試一次.</p>'
@ -72,7 +70,6 @@ zh_TW:
EMPTYPAGES: '空頁'
LAST2WEEKS: '網頁在過去兩個禮拜有被更改過'
SilverStripeNavigatorLink:
ShareInstructions: '分享一個由此到此的網頁, 複製與貼上下面的鏈結.'
ShareLink: '分享鏈結'
SilverStripeNavigatorLinkl:
CloseLink: 關閉

View File

@ -1,4 +1,4 @@
<div id="settings-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content CurrentForm">
<div id="settings-controller-cms-content" class="cms-content cms-edit-form center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content CurrentForm">
<div class="cms-content-header north">
<% with $EditForm %>
@ -7,9 +7,10 @@
<% include CMSBreadcrumbs %>
<% end_with %>
</div>
<% if $Fields.hasTabset %>
<% with $Fields.fieldByName('Root') %>
<div class="cms-content-header-tabs">
<div class="cms-content-header-tabs cms-tabset-nav-primary ss-ui-tabs-nav">
<ul class="cms-tabset-nav-primary">
<% loop $Tabs %>
<li<% if $extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
@ -27,4 +28,4 @@
</div>
</div>
</div>

View File

@ -1,29 +1,33 @@
<form $FormAttributes>
<form $FormAttributes data-layout-type="border">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<div class="cms-content-fields center">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
</div>
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>
$Field
<% end_loop %>
<% if $Controller.LinkPreview %>
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
</a>
<div class="cms-content-actions cms-content-controls south">
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>
$Field
<% end_loop %>
<% if $Controller.LinkPreview %>
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
</a>
<% end_if %>
</div>
<% end_if %>
</div>
<% end_if %>
</form>
</form>

View File

@ -13,12 +13,14 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue("<a href=\"[sitetree_link,id=$aboutID]\">Example Link</a>");
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals(array($aboutID => $aboutID), $sitetree->LinkTracking()->getIdList(), 'Basic link tracking works.');
$editor->setValue (
"<a href=\"[sitetree_link,id=$aboutID]\"></a><a href=\"[sitetree_link,id=$contactID]\"></a>"
);
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals (
array($aboutID => $aboutID, $contactID => $contactID),
$sitetree->LinkTracking()->getIdList(),
@ -27,6 +29,7 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue(null);
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals(array(), $sitetree->LinkTracking()->getIdList(), 'Link tracking is removed when links are.');
}
@ -37,12 +40,14 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('<a href="assets/example.pdf">Example File</a>');
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals (
array($fileID => $fileID), $sitetree->ImageTracking()->getIDList(), 'Links to assets are tracked.'
);
$editor->setValue(null);
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals(array(), $sitetree->ImageTracking()->getIdList(), 'Asset tracking is removed with links.');
}
@ -52,6 +57,7 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('<img src="assets/example.jpg" />');
$editor->saveInto($sitetree);
$sitetree->write();
$parser = new CSSContentParser($sitetree->Content);
$xml = $parser->getByXpath('//img');
@ -60,6 +66,7 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('<img src="assets/example.jpg" alt="foo" title="bar" />');
$editor->saveInto($sitetree);
$sitetree->write();
$parser = new CSSContentParser($sitetree->Content);
$xml = $parser->getByXpath('//img');
@ -74,12 +81,14 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('<img src="assets/example.jpg" />');
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals (
array($fileID => $fileID), $sitetree->ImageTracking()->getIDList(), 'Inserted images are tracked.'
);
$editor->setValue(null);
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertEquals (
array(), $sitetree->ImageTracking()->getIDList(), 'Tracked images are deleted when removed.'
);
@ -93,6 +102,7 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('<p><a href="[sitetree_link,id=0]">Broken Link</a></p>');
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertTrue($sitetree->HasBrokenLink);
@ -102,6 +112,7 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
));
$sitetree->HasBrokenLink = false;
$editor->saveInto($sitetree);
$sitetree->write();
$this->assertFalse((bool) $sitetree->HasBrokenLink);
}