diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index 3d1d3e02d..bfb4f3bef 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -10,7 +10,7 @@ jQuery.noConflict(); // Entwine's 'fromWindow::onresize' does not trigger on IE8. Use synthetic event. var cb = function() {$('.cms-container').trigger('windowresize');}; - // Workaround to avoid IE8 infinite loops when elements are resized as a result of this event + // Workaround to avoid IE8 infinite loops when elements are resized as a result of this event if($.browser.msie && parseInt($.browser.version, 10) < 9) { var newWindowWidth = $(window).width(), newWindowHeight = $(window).height(); if(newWindowWidth != windowWidth || newWindowHeight != windowHeight) { @@ -26,7 +26,7 @@ jQuery.noConflict(); // setup jquery.entwine $.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE; $.entwine('ss', function($) { - + /* * Handle messages sent via nested iframes * Messages should be raised via postMessage with an object with the 'type' parameter given. @@ -35,20 +35,20 @@ jQuery.noConflict(); * type should be one of: * - 'event' - Will trigger the given event (specified by 'event') on the target * - 'callback' - Will call the given method (specified by 'callback') on the target - */ + */ $(window).on("message", function(e) { var target, event = e.originalEvent, data = JSON.parse(event.data); - + // Reject messages outside of the same origin if($.path.parseUrl(window.location.href).domain !== $.path.parseUrl(event.origin).domain) return; - + // Get target of this action target = typeof(data.target) === 'undefined' ? $(window) : $(data.target); - + // Determine action switch(data.type) { case 'event': @@ -59,18 +59,18 @@ jQuery.noConflict(); break; } }); - + /** * Position the loading spinner animation below the ss logo - */ + */ var positionLoadingSpinner = function() { var offset = 120; // offset from the ss logo - var spinner = $('.ss-loading-screen .loading-animation'); + var spinner = $('.ss-loading-screen .loading-animation'); var top = ($(window).height() - spinner.height()) / 2; spinner.css('top', top + offset); spinner.show(); }; - + // apply an select element only when it is ready, ie. when it is rendered into a template // with css applied and got a width value. var applyChosen = function(el) { @@ -89,13 +89,13 @@ jQuery.noConflict(); setTimeout(function() { // Make sure it's visible before applying the ui el.show(); - applyChosen(el); }, + applyChosen(el); }, 500); } }; /** - * Compare URLs, but normalize trailing slashes in + * Compare URLs, but normalize trailing slashes in * URL to work around routing weirdnesses in SS_HTTPRequest. * Also normalizes relative URLs by prefixing them with the . */ @@ -105,11 +105,11 @@ jQuery.noConflict(); url2 = $.path.isAbsoluteUrl(url2) ? url2 : $.path.makeUrlAbsolute(url2, baseUrl); var url1parts = $.path.parseUrl(url1), url2parts = $.path.parseUrl(url2); return ( - url1parts.pathname.replace(/\/*$/, '') == url2parts.pathname.replace(/\/*$/, '') && + url1parts.pathname.replace(/\/*$/, '') == url2parts.pathname.replace(/\/*$/, '') && url1parts.search == url2parts.search ); }; - + $(window).bind('resize', positionLoadingSpinner).trigger('resize'); // global ajax handlers @@ -142,7 +142,7 @@ jQuery.noConflict(); reathenticate = xhr.getResponseHeader('X-Reauthenticate'), msgType = (xhr.status < 200 || xhr.status > 399) ? 'bad' : 'good', ignoredMessages = ['OK']; - + // Enable reauthenticate dialog if requested if(reathenticate) { $('.cms-container').showLoginDialog(); @@ -158,14 +158,14 @@ jQuery.noConflict(); /** * Main LeftAndMain interface with some control panel and an edit form. - * + * * Events: * ajaxsubmit - ... * validate - ... * aftersubmitform - ... */ $('.cms-container').entwine({ - + /** * Tracks current panel request. */ @@ -177,7 +177,7 @@ jQuery.noConflict(); FragmentXHR: {}, StateChangeCount: 0, - + /** * Options for the threeColumnCompressor layout algorithm. * @@ -198,7 +198,7 @@ jQuery.noConflict(); // Browser detection if($.browser.msie && parseInt($.browser.version, 10) < 8) { $('.ss-loading-screen').append( - '

' + + '

' + 'Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.' + '

' ).css('z-index', $('.ss-loading-screen').css('z-index')+1); @@ -207,7 +207,7 @@ jQuery.noConflict(); this._super(); return; } - + // Initialize layouts this.redraw(); @@ -216,7 +216,7 @@ jQuery.noConflict(); $('body').removeClass('loading'); $(window).unbind('resize', positionLoadingSpinner); this.restoreTabState(); - + this._super(); }, @@ -326,9 +326,9 @@ jQuery.noConflict(); * Proxy around History.pushState() which handles non-HTML5 fallbacks, * as well as global change tracking. Change tracking needs to be synchronous rather than event/callback * based because the user needs to be able to abort the action completely. - * + * * See handleStateChange() for more details. - * + * * Parameters: * - {String} url * - {String} title New window title @@ -343,20 +343,20 @@ jQuery.noConflict(); // Check change tracking (can't use events as we need a way to cancel the current state change) var contentEls = this._findFragments(data.pjax ? data.pjax.split(',') : ['Content']); var trackedEls = contentEls.find(':data(changetracker)').add(contentEls.filter(':data(changetracker)')); - + if(trackedEls.length) { var abort = false; - + trackedEls.each(function() { if(!$(this).confirmUnsavedChanges()) abort = true; }); - + if(abort) return; } // Save tab selections so we can restore them later this.saveTabState(); - + if(window.History.enabled) { $.extend(data, {__forceReferer: forceReferer}); // Active menu item is set based on X-Controller ajax header, @@ -382,31 +382,31 @@ jQuery.noConflict(); /** * Function: submitForm - * + * * Parameters: * {DOMElement} form - The form to be submitted. Needs to be passed * in to avoid entwine methods/context being removed through replacing the node itself. * {DOMElement} button - The pressed button (optional) * {Function} callback - Called in complete() handler of jQuery.ajax() * {Object} ajaxOptions - Object literal to merge into $.ajax() call - * + * * Returns: * (boolean) */ submitForm: function(form, button, callback, ajaxOptions) { var self = this; - + // look for save button if(!button) button = this.find('.Actions :submit[name=action_save]'); // default to first button if none given - simulates browser behaviour if(!button) button = this.find('.Actions :submit:first'); - + form.trigger('beforesubmitform'); this.trigger('submitform', {form: form, button: button}); - + // set button to "submitting" state $(button).addClass('loading'); - + // validate if required var validationResult = form.validate(); if(typeof validationResult!=='undefined' && !validationResult) { @@ -417,12 +417,12 @@ jQuery.noConflict(); return false; } - + // get all data from the form var formData = form.serializeArray(); // add button action formData.push({name: $(button).attr('name'), value:'1'}); - // Artificial HTTP referer, IE doesn't submit them via ajax. + // Artificial HTTP referer, IE doesn't submit them via ajax. // Also rewrites anchors to their page counterparts, which is important // as automatic browser ajax response redirects seem to discard the hash/fragment. // TODO Replaces trailing slashes added by History after locale (e.g. admin/?locale=en/) @@ -437,7 +437,7 @@ jQuery.noConflict(); // sending back different `X-Pjax` headers and content jQuery.ajax(jQuery.extend({ headers: {"X-Pjax" : "CurrentForm,Breadcrumbs"}, - url: form.attr('action'), + url: form.attr('action'), data: formData, type: 'POST', complete: function() { @@ -453,7 +453,7 @@ jQuery.noConflict(); newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formData}); } }, ajaxOptions)); - + return false; }, @@ -462,21 +462,21 @@ jQuery.noConflict(); * To trigger loading, pass a new URL to window.History.pushState(). * Use loadPanel() as a pushState() wrapper as it provides some additional functionality * like global changetracking and user aborts. - * + * * Due to the nature of history management, no callbacks are allowed. * Use the 'beforestatechange' and 'afterstatechange' events instead, - * or overwrite the beforeLoad() and afterLoad() methods on the + * or overwrite the beforeLoad() and afterLoad() methods on the * DOM element you're loading the new content into. - * Although you can pass data into pushState(), it shouldn't contain + * Although you can pass data into pushState(), it shouldn't contain * DOM elements or callback closures. - * + * * The passed URL should allow reconstructing important interface state * without additional parameters, in the following use cases: * - Explicit loading through History.pushState() * - Implicit loading through browser navigation event triggered by the user (forward or back) * - Full window refresh without ajax * For example, a ModelAdmin search event should contain the search terms - * as URL parameters, and the result display should automatically appear + * as URL parameters, and the result display should automatically appear * if the URL is loaded without ajax. */ handleStateChange: function() { @@ -502,22 +502,22 @@ jQuery.noConflict(); // that can be reloaded without reloading the whole window. if(contentEls.length < fragmentsArr.length) { fragments = 'Content', fragmentsArr = ['Content']; - contentEls = this._findFragments(fragmentsArr); + contentEls = this._findFragments(fragmentsArr); } - + this.trigger('beforestatechange', {state: state, element: contentEls}); // Set Pjax headers, which can declare a preference for the returned view. // The actually returned view isn't always decided upon when the request // is fired, so the server might decide to change it based on its own logic. headers['X-Pjax'] = fragments; - + // Set 'fake' referer - we call pushState() before making the AJAX request, so we have to // set our own referer here if (typeof state.data.__forceReferer !== 'undefined') { // Ensure query string is properly encoded if present var url = state.data.__forceReferer; - + try { // Prevent double-encoding by attempting to decode url = decodeURI(url); @@ -528,7 +528,7 @@ jQuery.noConflict(); headers['X-Backurl'] = encodeURI(url); } } - + contentEls.addClass('loading'); var xhr = $.ajax({ headers: headers, @@ -543,7 +543,7 @@ jQuery.noConflict(); self.trigger('afterstatechange', {data: data, status: status, xhr: xhr, element: els, state: state}); } }); - + this.setStateChangeXHR(xhr); }, @@ -633,7 +633,7 @@ jQuery.noConflict(); // Support a full reload if(xhr.getResponseHeader('X-Reload') && xhr.getResponseHeader('X-ControllerURL')) { - document.location.href = $('base').attr('href').replace(/\/*$/, '') + document.location.href = $('base').attr('href').replace(/\/*$/, '') + '/' + xhr.getResponseHeader('X-ControllerURL'); return; } @@ -651,7 +651,7 @@ jQuery.noConflict(); if(xhr.getResponseHeader('Content-Type').match(/^((text)|(application))\/json[ \t]*;?/i)) { newFragments = data; } else { - + // Fall back to replacing the content fragment if HTML is returned var fragment = document.createDocumentFragment(); jQuery.clean( [ data ], document, fragment, [] ); @@ -732,9 +732,9 @@ jQuery.noConflict(); }, /** - * - * - * Parameters: + * + * + * Parameters: * - fragments {Array} * Returns: jQuery collection */ @@ -751,14 +751,14 @@ jQuery.noConflict(); /** * Function: refresh - * + * * Updates the container based on the current url * * Returns: void */ refresh: function() { $(window).trigger('statechange'); - + $(this).redraw(); }, @@ -787,7 +787,7 @@ jQuery.noConflict(); window.sessionStorage.setItem(tabsUrl, JSON.stringify(selectedTabs)); } catch(err) { if (err.code === DOMException.QUOTA_EXCEEDED_ERR && window.sessionStorage.length === 0) { - // If this fails we ignore the error as the only issue is that it + // If this fails we ignore the error as the only issue is that it // does not remember the tab state. // This is a Safari bug which happens when private browsing is enabled. return; @@ -856,7 +856,7 @@ jQuery.noConflict(); var s = window.sessionStorage; if(url) { - s.removeItem('tabs-' + url); + s.removeItem('tabs-' + url); } else { for(var i=0;i'); @@ -900,12 +900,12 @@ jQuery.noConflict(); $('body').append(dialog); } }); - + // Login dialog page $('.leftandmain-logindialog').entwine({ onmatch: function() { this._super(); - + // Create jQuery dialog this.ssdialog({ iframeUrl: this.data('url'), @@ -921,7 +921,7 @@ jQuery.noConflict(); }, close: function() { $('.ui-widget-overlay').removeClass('leftandmain-logindialog-overlay'); - } + } }); }, onunmatch: function() { @@ -952,7 +952,7 @@ jQuery.noConflict(); this.close(); } }); - + /** * Add loading overlay to selected regions in the CMS automatically. * Not applied to all "*.loading" elements to avoid secondary regions @@ -997,7 +997,7 @@ jQuery.noConflict(); return; } - var href = this.attr('href'), + var href = this.attr('href'), url = (href && !href.match(/^#/)) ? href : this.data('href'), data = {pjax: this.data('pjaxTarget')}; @@ -1015,17 +1015,17 @@ jQuery.noConflict(); onclick: function(e) { $(this).removeClass('ui-button-text-only'); $(this).addClass('ss-ui-button-loading ui-button-text-icons'); - + var loading = $(this).find(".ss-ui-loading-icon"); - + if(loading.length < 1) { loading = $("").addClass('ss-ui-loading-icon ui-button-icon-primary ui-icon'); - + $(this).prepend(loading); } - + loading.show(); - + var href = this.attr('href'), url = href ? href : this.data('href'); jQuery.ajax({ @@ -1033,16 +1033,16 @@ jQuery.noConflict(); // Ensure that form view is loaded (rather than whole "Content" template) complete: function(xmlhttp, status) { var msg = (xmlhttp.getResponseHeader('X-Status')) ? xmlhttp.getResponseHeader('X-Status') : xmlhttp.responseText; - + try { if (typeof msg != "undefined" && msg !== null) eval(msg); } catch(e) {} - + loading.hide(); - + $(".cms-container").refresh(); - + $(this).removeClass('ss-ui-button-loading ui-button-text-icons'); $(this).addClass('ui-button-text-only'); }, @@ -1073,14 +1073,14 @@ jQuery.noConflict(); dialog = $('
'); $('body').append(dialog); } - + var extraClass = this.data('popupclass')?this.data('popupclass'):''; - + dialog.ssdialog({iframeUrl: this.attr('href'), autoOpen: true, dialogExtraClass: extraClass}); return false; } }); - + /** * Add styling to all contained buttons, and create buttonsets if required. */ @@ -1110,20 +1110,20 @@ jQuery.noConflict(); if(window.debug) console.log('redraw', this.attr('class'), this.get(0)); // Remove whitespace to avoid gaps with inline elements - this.contents().filter(function() { - return (this.nodeType == 3 && !/\S/.test(this.nodeValue)); + this.contents().filter(function() { + return (this.nodeType == 3 && !/\S/.test(this.nodeValue)); }).remove(); // Init buttons if required this.find('.ss-ui-button').each(function() { if(!$(this).data('button')) $(this).button(); }); - + // Mark up buttonsets this.find('.ss-ui-buttonset').buttonset(); } }); - + /** * Duplicates functionality in DateField.js, but due to using entwine we can match * the DOM element on creation, rather than onclick - which allows us to decorate @@ -1145,23 +1145,23 @@ jQuery.noConflict(); $(this).datepicker(config); // // Unfortunately jQuery UI only allows configuration of icon images, not sprites // this.next('button').button('option', 'icons', {primary : 'ui-icon-calendar'}); - + this._super(); }, onunmatch: function() { this._super(); } }); - + /** * Styled dropdown select fields via chosen. Allows things like search and optgroup - * selection support. Rather than manually adding classes to selects we want + * selection support. Rather than manually adding classes to selects we want * styled, we style everything but the ones we tell it not to. * - * For the CMS we also need to tell the parent div that his has a select so + * For the CMS we also need to tell the parent div that it has a select so * we can fix the height cropping. */ - + $('.cms .field.dropdown select, .cms .field select[multiple], .fieldholder-small select.dropdown').entwine({ onmatch: function() { if(this.is('.no-chzn')) { @@ -1178,20 +1178,20 @@ jQuery.noConflict(); // Apply Chosen applyChosen(this); - + this._super(); }, onunmatch: function() { this._super(); } }); - + $(".cms-panel-layout").entwine({ redraw: function() { if(window.debug) console.log('redraw', this.attr('class'), this.get(0)); } }); - + /** * Overload the default GridField behaviour (open a new URL in the browser) * with the CMS-specific ajax loading. @@ -1209,7 +1209,7 @@ jQuery.noConflict(); /** * Generic search form in the CMS, often hooked up to a GridField results display. - */ + */ $('.cms-search-form').entwine({ onsubmit: function(e) { // Remove empty elements and make the URL prettier @@ -1267,7 +1267,7 @@ jQuery.noConflict(); }, onremove: function() { if(window.debug) console.log('saving', this.data('url'), this); - + // Save the HTML state at the last possible moment. // Don't store the DOM to avoid memory leaks. if(!this.data('deferredNoCache')) window._panelDeferredCache[this.data('url')] = this.html(); @@ -1326,7 +1326,7 @@ jQuery.noConflict(); if(!this.data('uiTabs')) this.tabs({ active: (activeTab.index() != -1) ? activeTab.index() : 0, beforeLoad: function(e, ui) { - // Disable automatic ajax loading of tabs without matching DOM elements, + // Disable automatic ajax loading of tabs without matching DOM elements, // determining if the current URL differs from the tab URL is too error prone. return false; }, @@ -1347,7 +1347,7 @@ jQuery.noConflict(); } }); }, - + /** * Ensure hash links are prefixed with the current page URL, * otherwise jQuery interprets them as being external. @@ -1362,7 +1362,7 @@ jQuery.noConflict(); } }); }); - + }(jQuery)); var statusMessage = function(text, type) { diff --git a/admin/javascript/lang/eo.js b/admin/javascript/lang/eo.js new file mode 100644 index 000000000..dc2980101 --- /dev/null +++ b/admin/javascript/lang/eo.js @@ -0,0 +1,16 @@ +// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/eo.js. +// See https://github.com/silverstripe/silverstripe-buildtools for details +if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { + if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); +} else { + ss.i18n.addDictionary('eo', { + "LeftAndMain.CONFIRMUNSAVED": "Ĉu vi vere volas navigi for de ĉi tiu paĝo?\n\nAVERTO: Viaj ŝanĝoj ne estas konservitaj.\n\nPremu je Akcepti por daŭrigi, aŭ Nuligi por resti ĉe la aktuala paĝo.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "AVERTO: Viaj ŝanĝoj ne estas konservitaj.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Ĉu vi vere volas forigi %s grupojn?", + "ModelAdmin.SAVED": "Konservita", + "ModelAdmin.REALLYDELETE": "Ĉi vi vere volas forigi?", + "ModelAdmin.DELETED": "Forigita", + "ModelAdmin.VALIDATIONERROR": "Validiga eraro", + "LeftAndMain.PAGEWASDELETED": "Ĉi tiu paĝo estas forigita. Por redakti paĝon, elektu ĝin maldekstre." +}); +} \ No newline at end of file diff --git a/admin/javascript/lang/lt.js b/admin/javascript/lang/lt.js new file mode 100644 index 000000000..be99bfb45 --- /dev/null +++ b/admin/javascript/lang/lt.js @@ -0,0 +1,16 @@ +// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/lt.js. +// See https://github.com/silverstripe/silverstripe-buildtools for details +if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { + if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); +} else { + ss.i18n.addDictionary('lt', { + "LeftAndMain.CONFIRMUNSAVED": "Ar tikrai norite išeiti iš šio puslapio?\n\nDĖMESIO: Jūsų pakeitimai neišsaugoti.\n\nNorėdami tęsti, spauskite OK, jeigu norite likti, spauskite Cancel.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "DĖMESIO: Jūsų pakeitimai neišsaugoti.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Ar tikrai norite ištrinti %s grupes?", + "ModelAdmin.SAVED": "Išsaugota", + "ModelAdmin.REALLYDELETE": "Ar tikrai norite ištrinti?", + "ModelAdmin.DELETED": "Ištrinta", + "ModelAdmin.VALIDATIONERROR": "Tikrinimo klaida", + "LeftAndMain.PAGEWASDELETED": "Šis puslapis ištrintas. Norėdami redaguoti puslapį, pasirinkite jį kairėje." +}); +} \ No newline at end of file diff --git a/admin/javascript/lang/nb.js b/admin/javascript/lang/nb.js new file mode 100644 index 000000000..2ba99d685 --- /dev/null +++ b/admin/javascript/lang/nb.js @@ -0,0 +1,16 @@ +// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/nb.js. +// See https://github.com/silverstripe/silverstripe-buildtools for details +if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { + if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); +} else { + ss.i18n.addDictionary('nb', { + "LeftAndMain.CONFIRMUNSAVED": "Er du sikker på at du vil forlate denne siden?\n\nADVARSEL: Endringene din har ikke blitt lagret.\n\nTrykk OK for å fortsette eller Avbryt for å holde deg på samme side.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "ADVARSEL: Endringene dine har ikke blitt lagret.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Vil du virkelig slette %s grupper?", + "ModelAdmin.SAVED": "Lagret", + "ModelAdmin.REALLYDELETE": "Vil du virkelig slette?", + "ModelAdmin.DELETED": "Slettet", + "ModelAdmin.VALIDATIONERROR": "Valideringsfeil", + "LeftAndMain.PAGEWASDELETED": "Denne siden ble slettet. For å redigere en side, velg den fra listen til venstre." +}); +} \ No newline at end of file diff --git a/admin/javascript/lang/nl.js b/admin/javascript/lang/nl.js index 19967b7d2..f29b411cf 100644 --- a/admin/javascript/lang/nl.js +++ b/admin/javascript/lang/nl.js @@ -10,7 +10,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { "ModelAdmin.SAVED": "Opgeslagen", "ModelAdmin.REALLYDELETE": "Weet u zeker dat u wilt verwijderen?", "ModelAdmin.DELETED": "Verwijderd", - "ModelAdmin.VALIDATIONERROR": "Validatie fout", - "LeftAndMain.PAGEWASDELETED": "Deze pagina is verwijderd. Om een pagina aan te passen, selecteer pagina aan de linkerkant." + "ModelAdmin.VALIDATIONERROR": "Validatiefout", + "LeftAndMain.PAGEWASDELETED": "Deze pagina is verwijderd. Om een pagina aan te passen, selecteer deze aan de linkerkant." }); } \ No newline at end of file diff --git a/admin/javascript/lang/sl.js b/admin/javascript/lang/sl.js new file mode 100644 index 000000000..bf519448a --- /dev/null +++ b/admin/javascript/lang/sl.js @@ -0,0 +1,16 @@ +// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/sl.js. +// See https://github.com/silverstripe/silverstripe-buildtools for details +if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { + if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); +} else { + ss.i18n.addDictionary('sl', { + "LeftAndMain.CONFIRMUNSAVED": "Res želite zapusitit stran?\n\nOPOZORILO: spremembe niso bile shranjene\n\nKliknite OK za nadaljevanje ali Prekliči, da ostanete na trenutni strani.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "OPOZORILO: spremembe niso bile shranjene.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Izbrišem %s skupin?", + "ModelAdmin.SAVED": "Shranjeno", + "ModelAdmin.REALLYDELETE": "Izbrišem?", + "ModelAdmin.DELETED": "Izbrisano", + "ModelAdmin.VALIDATIONERROR": "Napaka pri preverjanju", + "LeftAndMain.PAGEWASDELETED": "Stran je bila izbrisana. Za urejanje izberite stran na levi." +}); +} \ No newline at end of file diff --git a/admin/javascript/lang/src/sv.js b/admin/javascript/lang/src/sv.js new file mode 100644 index 000000000..9ae79d583 --- /dev/null +++ b/admin/javascript/lang/src/sv.js @@ -0,0 +1,10 @@ +{ + "LeftAndMain.CONFIRMUNSAVED": "Är du säker på att du vill lämna denna sida?\n\nVARNING: Dina ändringar har inte sparats.\n\nTryck OK för att lämna sidan eller Avbryt för att stanna på aktuell sida.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "WARNING: Your changes have not been saved.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Vill du verkligen radera %s grupper?", + "ModelAdmin.SAVED": "Sparad", + "ModelAdmin.REALLYDELETE": "Vill du verkligen radera?", + "ModelAdmin.DELETED": "Raderad", + "ModelAdmin.VALIDATIONERROR": "Valideringsfel", + "LeftAndMain.PAGEWASDELETED": "Sidan raderades. För att redigera en sida, välj den från menyn till vänster." +} \ No newline at end of file diff --git a/admin/javascript/lang/sv.js b/admin/javascript/lang/sv.js new file mode 100644 index 000000000..20a1034e0 --- /dev/null +++ b/admin/javascript/lang/sv.js @@ -0,0 +1,16 @@ +// This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/sv.js. +// See https://github.com/silverstripe/silverstripe-buildtools for details +if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { + if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); +} else { + ss.i18n.addDictionary('sv', { + "LeftAndMain.CONFIRMUNSAVED": "Är du säker på att du vill lämna denna sida?\n\nVARNING: Dina ändringar har inte sparats.\n\nTryck OK för att lämna sidan eller Avbryt för att stanna på aktuell sida.", + "LeftAndMain.CONFIRMUNSAVEDSHORT": "WARNING: Your changes have not been saved.", + "SecurityAdmin.BATCHACTIONSDELETECONFIRM": "Vill du verkligen radera %s grupper?", + "ModelAdmin.SAVED": "Sparad", + "ModelAdmin.REALLYDELETE": "Vill du verkligen radera?", + "ModelAdmin.DELETED": "Raderad", + "ModelAdmin.VALIDATIONERROR": "Valideringsfel", + "LeftAndMain.PAGEWASDELETED": "Sidan raderades. För att redigera en sida, välj den från menyn till vänster." +}); +} \ No newline at end of file diff --git a/core/Core.php b/core/Core.php index 6048b1a0b..e55706d86 100644 --- a/core/Core.php +++ b/core/Core.php @@ -85,8 +85,6 @@ require_once 'control/injector/Injector.php'; // Initialise the dependency injector as soon as possible, as it is // subsequently used by some of the following code $injector = new Injector(array('locator' => 'SilverStripeServiceConfigurationLocator')); -$injector->registerService(Config::inst()); - Injector::set_inst($injector); /////////////////////////////////////////////////////////////////////////////// diff --git a/css/GridField.css b/css/GridField.css index cca02d398..1da9ca33e 100644 --- a/css/GridField.css +++ b/css/GridField.css @@ -113,7 +113,7 @@ Used in side panels and action tabs .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:-ms-input-placeholder { font-style: italic; color: #ced5d7; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:placeholder { font-style: italic; color: #ced5d7; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:focus { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } -.cms table.ss-gridfield-table tr th span.non-sortable { display: block; } +.cms table.ss-gridfield-table tr th span.non-sortable { display: block; padding: 6px 8px; } .cms table.ss-gridfield-table tr td { border-right: 1px solid rgba(0, 0, 0, 0.1); padding: 8px 8px; color: #666; } .cms table.ss-gridfield-table tr td.bottom-all { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzk4YWFiNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #98aab6)); background-image: -moz-linear-gradient(#b0bec7, #98aab6); background-image: -webkit-linear-gradient(#b0bec7, #98aab6); background-image: linear-gradient(#b0bec7, #98aab6); padding: 4px 12px; } .cms table.ss-gridfield-table tr td.bottom-all .datagrid-footer-message { text-align: center; padding-top: 6px; color: white; } diff --git a/css/UploadField.css b/css/UploadField.css index 811105996..f8adb7825 100644 --- a/css/UploadField.css +++ b/css/UploadField.css @@ -11,6 +11,7 @@ Used in side panels and action tabs */ .ss-uploadfield .clear { clear: both; } +.ss-uploadfield .description { margin-left: 0; } .ss-uploadfield .middleColumn { min-width: 510px; max-width: 600px; width: 100%; margin-left: 0; clear: both; padding: 0; background: #fff; border: 1px solid #b3b3b3; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIvPjxzdG9wIG9mZnNldD0iMTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI5MCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZmVmZWYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #efefef), color-stop(10%, #ffffff), color-stop(90%, #ffffff), color-stop(100%, #efefef)); background-image: -moz-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: -webkit-linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); background-image: linear-gradient(#efefef, #ffffff 10%, #ffffff 90%, #efefef); } .ss-uploadfield .ss-uploadfield-item { margin: 0; padding: 15px; overflow: auto; } .ss-uploadfield .ss-uploadfield-item .ss-uploadfield-item-preview { height: 60px; line-height: 60px; width: 80px; text-align: center; font-weight: bold; float: left; overflow: hidden; } diff --git a/dev/FunctionalTest.php b/dev/FunctionalTest.php index 885f5d425..1ad9471bb 100644 --- a/dev/FunctionalTest.php +++ b/dev/FunctionalTest.php @@ -12,7 +12,7 @@ * $this->get("your/url"); * * // Submit a form on the page that you get in response - * $this->submitForm("MyForm_ID", array("Email" => "invalid email ^&*&^")); + * $this->submitForm("MyForm_ID", "action_dologin", array("Email" => "invalid email ^&*&^")); * * // Validate the content that is returned * $this->assertExactMatchBySelector("#MyForm_ID p.error", array("That email address is invalid.")); diff --git a/docs/en/00_Getting_Started/00_Server_Requirements.md b/docs/en/00_Getting_Started/00_Server_Requirements.md index 41b26d3cc..a45bff786 100644 --- a/docs/en/00_Getting_Started/00_Server_Requirements.md +++ b/docs/en/00_Getting_Started/00_Server_Requirements.md @@ -4,7 +4,7 @@ SilverStripe CMS needs to be installed on a web server. Content authors and webs to access a web-based GUI to do their day-to-day work. Website designers and developers require access to the files on the server to update templates, website logic, and perform upgrades or maintenance. -Our web-based [PHP installer](/installation) can check if you meet the requirements listed below. +Our web-based [PHP installer](installation/) can check if you meet the requirements listed below. ## Web server software requirements diff --git a/docs/en/00_Getting_Started/01_Installation/01_Linux_Unix.md b/docs/en/00_Getting_Started/01_Installation/01_Linux_Unix.md index 60f84dbc7..69a60ebc0 100644 --- a/docs/en/00_Getting_Started/01_Installation/01_Linux_Unix.md +++ b/docs/en/00_Getting_Started/01_Installation/01_Linux_Unix.md @@ -2,7 +2,7 @@ SilverStripe should be able to be installed on any Linux, Unix or *nix like OS as long as the correct server software is installed and configured (referred to a *nix in this document from herein). It is common that web hosting that you may use for your production SilverStripe application will be *nix based, here you may also want to use *nix locally to ensure how you develop locally mimics closely your production environment. -Is important to ensure you check the [Server Requirements](/Getting_Started/Installation/Server_Requirements) list before acquiring and installing SilverStripe on your *nix server (locally or otherwise). +Is important to ensure you check the [Server Requirements](/getting_started/server_requirements) list before acquiring and installing SilverStripe on your *nix server (locally or otherwise). At a high level you will need a: * Web server e.g. Apache, Nginx @@ -12,7 +12,7 @@ At a high level you will need a: ##*nix installation guides on the web There are a number of good step by step guides covering server setups and installing of SilverStripe on the various flavours of *nix systems. -Note: Many of the following guides simply download SilverStripe as a zipped file. We recommend the use of [Composer](/Getting_Started/Composer/) once you get to the point of installing SilverStripe (though the choice is up to you). Always ensure you get the latest version if you are starting a new project. +Note: Many of the following guides simply download SilverStripe as a zipped file. We recommend the use of [Composer](/getting_started/composer/) once you get to the point of installing SilverStripe (though the choice is up to you). Always ensure you get the latest version if you are starting a new project. ###Known (but not exhaustive) list * [How To Install Silverstripe on Your VPS](https://www.digitalocean.com/community/tutorials/how-to-install-silverstripe-on-your-vps) diff --git a/docs/en/00_Getting_Started/01_Installation/03_Windows.md b/docs/en/00_Getting_Started/01_Installation/03_Windows.md index 5eaa68884..1ea528641 100644 --- a/docs/en/00_Getting_Started/01_Installation/03_Windows.md +++ b/docs/en/00_Getting_Started/01_Installation/03_Windows.md @@ -5,7 +5,7 @@ done through [WampServer](http://www.wampserver.com/en/). This can be useful if want a Microsoft Windows machine with a very similar environment. Note: Installing on Microsoft's IIS webserver through Microsoft WebPI is likely to be easier, see -[installation-on-windows-pi](windows-pi). +[Windows with Web Platform Installer](other_installation_options/windows_platform_installer). ## Install WAMP diff --git a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md index ebfed3a73..4a1735640 100644 --- a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md +++ b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md @@ -73,11 +73,11 @@ every page on the site, if that's easier. Please make sure all code inside `*.php` files is wrapped in classes. Due to the way `[api:ManifestBuilder]` includes all files with this extension, any **procedural code will be executed on every call**. The most common error here -is putting a test.php/phpinfo.php file in the document root. See [datamodel](/topics/datamodel) and [controllers](/topics/controller) +is putting a test.php/phpinfo.php file in the document root. See [datamodel](/developer_guides/data_model_and_orm) and [controllers](/developer_guides/controllers) for ways how to structure your code. Also, please check that you have PHP enabled on the webserver, and you're running PHP 5.1 or later. -The web-based [SilverStripe installer](/installation) can help you with this. +The web-based [SilverStripe installer](/getting_started/installation) can help you with this. ## I've got file permission problems during installation diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md index 45ab6ee8e..f8763baa4 100644 --- a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md +++ b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md @@ -107,4 +107,4 @@ e.g. `/etc/nginx/sites-enabled/mysite`: include /etc/nginx/silverstripe.conf; } -For more information on nginx configuration, please see the [nginx installation](nginx) page. +For more information on nginx configuration, please see the [nginx installation](configure_nginx) page. diff --git a/docs/en/00_Getting_Started/01_Installation/index.md b/docs/en/00_Getting_Started/01_Installation/index.md index fb8b83df8..9b90f4122 100644 --- a/docs/en/00_Getting_Started/01_Installation/index.md +++ b/docs/en/00_Getting_Started/01_Installation/index.md @@ -3,12 +3,12 @@ These instructions show you how to install SilverStripe on any web server. The best way to install from the source code is to use [Composer](../composer). Check out our operating system specific guides for [Linux](linux_unix), -[Windows Server](windows-pi) and [Mac OSX](mac-osx). +[Windows Server](windows) and [Mac OSX](mac_osx). ## Installation Steps * [Download](http://silverstripe.org/download) the installer package -* Make sure the webserver has MySQL and PHP support. See [Server Requirements](server-requirements) for more information. +* Make sure the webserver has MySQL and PHP support. See [Server Requirements](../server_requirements) for more information. * Unpack the installer somewhere into your web-root. Usually the www folder or similar. Most downloads from SilverStripe are compressed tarballs. To extract these files you can either do them natively (Unix) or with 7-Zip (Windows) * Visit your sites domain or IP address in your web browser. @@ -18,7 +18,7 @@ name' and the default login details. Follow the questions and select the *instal ## Issues? -If the above steps don't work for any reason have a read of the [Common Problems](common-problems) section. +If the above steps don't work for any reason have a read of the [Common Problems](common_problems) section.
SilverStripe ships with default rewriting rules specific to your web server. Apart from diff --git a/docs/en/00_Getting_Started/02_Composer.md b/docs/en/00_Getting_Started/02_Composer.md index 0c02d0889..b254ca798 100644 --- a/docs/en/00_Getting_Started/02_Composer.md +++ b/docs/en/00_Getting_Started/02_Composer.md @@ -3,7 +3,7 @@ Composer is a package management tool for PHP that lets you install and upgrade SilverStripe and its modules. Although installing Composer is one extra step, it will give you much more flexibility than just downloading the file from silverstripe.org. This is our recommended way of downloading SilverStripe and managing your code. For more information about Composer, visit [its website](http://getcomposer.org/). -We also have separate instructions for [installing modules with Composer](/topics/modules). +We also have separate instructions for [installing modules with Composer](/developer_guides/extending/modules). # Basic usage @@ -36,7 +36,7 @@ If you already have composer installed you can update it by running: Composer updates regularly, so you should run this command fairly often. These instructions assume you are running the latest version. ## Installing Composer on Windows WAMP -For those that use WAMP as a development environment, [detailed information is available on installing using Composer.](/installation/windows-wamp#install-wamp) +For those that use WAMP as a development environment, [detailed information is available on installing using Composer.](/getting_started/installation/windows) ## Create a new site @@ -108,6 +108,70 @@ So, your deployment process, as it relates to Composer, should be as follows: * Deploy your project code base, using the deployment tool of your choice. * Run `composer install --no-dev -o` on your production version. +## Composer managed modules, Git and .gitignore + +Modules and themes managed by composer should not be committed with your projects source code. For more details read [Should I commit the dependencies in my vendor directory?](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md). + +Since SilverStripe modules are installed in to thier own folder, you have to manage your [.gitignore](http://git-scm.com/docs/gitignore) to ensure they are ignored from your repository. + +Here is the default SilverStripe [.gitignore](http://git-scm.com/docs/gitignore) with the forum module ignored + + assets/* + _ss_environment.php + tools/phing-metadata + silverstripe-cache + .buildpath + .project + .settings + .idea + .DS_Store + vendor/ + # Don't include the forum module, as this will be installed with composer + forum + +In large projects it can get difficult to manage your [.gitignore](http://git-scm.com/docs/gitignore) and ensure it contains all composer managed modules and themes. + +You can automate this with the [SSAutoGitIgnore](https://github.com/guru-digital/SSAutoGitIgnore/) package. +This package will maintain your [.gitignore](http://git-scm.com/docs/gitignore) and ensure it is kept up to date with your composer managed modules without affecting custom ignores. Once installed and setup, it will automatically run every time you install, remove or update modules using composer. + +### Installing and enabling the SSAutoGitIgnore package + +Include the package in your project by running this command + + composer require gdmedia/ss-auto-git-ignore + +Edit your composer.json and insert + + "scripts": { + "post-update-cmd": "GDM\\SSAutoGitIgnore\\UpdateScript::Go" + } + +This will instruct composer to run SSAutoGitIgnore after every update. SSAutoGitIgnore will then ensure composer managed models and themes are correctly added to your [.gitignore](http://git-scm.com/docs/gitignore). +For more information about SSAutoGitIgnore, see the [SSAutoGitIgnore home page](https://github.com/guru-digital/SSAutoGitIgnore/). +For more information about post-updated-cmd and scripts, read the ["Scripts" chapter of the Composer documentation](https://getcomposer.org/doc/articles/scripts.md). + +Full example of composer.json with the SSAutoGitIgnore installed and enabled + + { + "name": "silverstripe/installer", + "description": "The SilverStripe Framework Installer", + "require": { + "php": ">=5.3.2", + "silverstripe/cms": "3.0.*", + "silverstripe/framework": "3.0.*", + "silverstripe-themes/simple": "*", + "gdmedia/ss-auto-git-ignore": "*" + }, + "require-dev": { + "silverstripe/compass": "*", + "silverstripe/docsviewer": "*" + }, + "scripts": { + "post-update-cmd": "GDM\\SSAutoGitIgnore\\UpdateScript::Go" + }, + "minimum-stability": "dev" + } + # Dev Environments for Contributing Code {#contributing} So you want to contribute to SilverStripe? Fantastic! You can do this with composer too. @@ -139,7 +203,7 @@ and remove the `@stable` markers from the `silverstripe/cms` and `silverstripe/f Another `composer update --dev` call will now fetch from the development branch instead. Note that you can also convert an existing composer project with these steps. -Please read the ["Contributing Code"](/misc/contributing/code) documentation to find out how to +Please read the ["Contributing Code"](/contributing/code) documentation to find out how to create forks and send pull requests. # Advanced usage @@ -290,9 +354,9 @@ which triggers their installation into the correct path. ### How do I convert an existing project to Composer? -The easiest way is to follow the [upgrading](/installation/upgrading) instructions -and switch to a newer release. Alternatively, copy the `composer.json` file from -a newer release, and adjust the version settings in the "require" section to your needs. +Copy the `composer.json` file from a newer release, and adjust the +version settings in the "require" section to your needs. Then refer to +the [upgrading documentation](/upgrading). You'll also need to update your webserver configuration from there (`.htaccess` or `web.config` files), in order to prevent web access to the composer-generated files. diff --git a/docs/en/00_Getting_Started/03_Environment_Management.md b/docs/en/00_Getting_Started/03_Environment_Management.md index 09ea51244..5b6f2e943 100644 --- a/docs/en/00_Getting_Started/03_Environment_Management.md +++ b/docs/en/00_Getting_Started/03_Environment_Management.md @@ -93,9 +93,9 @@ This is my `_ss_environment.php` file. I have it placed in `/var`, as each of th define('SS_DEFAULT_ADMIN_USERNAME', ''); define('SS_DEFAULT_ADMIN_PASSWORD', ''); - // This causes errors to be written to the silverstripe.log file in the same directory as this file, so /var. - // Before PHP 5.3.0, you'll need to use dirname(__FILE__) instead of __DIR__ - define('SS_ERROR_LOG', __DIR__ . '/silverstripe.log'); + // This causes errors to be written to the BASE_PATH/silverstripe.log file. + // Path must be relative to BASE_PATH + define('SS_ERROR_LOG', 'silverstripe.log'); // This is used by sake to know which directory points to which URL global $_FILE_TO_URL_MAPPING; @@ -119,7 +119,7 @@ This is my `_ss_environment.php` file. I have it placed in `/var`, as each of th | `SS_ENVIRONMENT_TYPE`| The environment type: dev, test or live.| | `SS_DEFAULT_ADMIN_USERNAME`| The username of the default admin. This is a user with administrative privileges.| | `SS_DEFAULT_ADMIN_PASSWORD`| The password of the default admin. This will not be stored in the database.| -| `SS_USE_BASIC_AUTH`| Protect the site with basic auth (good for test sites).
When using CGI/FastCGI with Apache, you will have to add the `RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]` rewrite rule to your `.htaccess` file| +| `SS_USE_BASIC_AUTH`| Protect the site with basic auth (good for test sites).
When using CGI/FastCGI with Apache, you will have to add the `RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]` rewrite rule to your `.htaccess` file| | `SS_SEND_ALL_EMAILS_TO`| If you set this define, all emails will be redirected to this address.| | `SS_SEND_ALL_EMAILS_FROM`| If you set this define, all emails will be send from this address.| -| `SS_ERROR_LOG` | | +| `SS_ERROR_LOG` | Relative path to the log file | diff --git a/docs/en/00_Getting_Started/05_Coding_Conventions.md b/docs/en/00_Getting_Started/05_Coding_Conventions.md index 52825c617..5f7da481f 100644 --- a/docs/en/00_Getting_Started/05_Coding_Conventions.md +++ b/docs/en/00_Getting_Started/05_Coding_Conventions.md @@ -117,7 +117,7 @@ Example: `mysite/code/MyClass.php` To help with namespacing common class names (like Database) it is recommended to use a prefix convention `SS_ClassName` but the filename will remain `ClassName.php`. -See [directory-structure](/topics/directory-structure) for more information. +See [directory structure](directory_structure) for more information. ## Coding Style @@ -149,7 +149,7 @@ When a string is literal (contains no variable substitutions), the apostrophe or When a literal string itself contains apostrophes, it is permitted to demarcate the string with quotation marks or "double quotes". :::php - $greeting = "She said 'hello'"; + $greeting = "They said 'hello'"; This syntax is preferred over escaping apostrophes as it is much easier to read. @@ -458,5 +458,4 @@ which are licensed under BSD (see [license](http://framework.zend.com/license)). ## Related - * [Topics: CSS](/topics/css) - * [Reference: CMS Architecture](/reference/cms-archirecture) + * [Reference: CMS Architecture](/developer_guides/customising_the_admin_interface/cms_architecture) diff --git a/docs/en/01_Tutorials/02_Extending_A_Basic_Site.md b/docs/en/01_Tutorials/02_Extending_A_Basic_Site.md index 5a7fb60cd..499dea2be 100644 --- a/docs/en/01_Tutorials/02_Extending_A_Basic_Site.md +++ b/docs/en/01_Tutorials/02_Extending_A_Basic_Site.md @@ -178,7 +178,7 @@ would create a new tab called "New Tab", and a single "Author" textfield inside.
We have added two fields: A simple `[api:TextField]` and a `[api:DateField]`. -There are many more fields available in the default installation, listed in ["form field types"](/developer_guides/forms/fields/common_subclasses). +There are many more fields available in the default installation, listed in ["form field types"](/developer_guides/forms/field_types/common_subclasses). :::php return $fields; diff --git a/docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md b/docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md index 1696369ec..003a91856 100644 --- a/docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md +++ b/docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md @@ -9,7 +9,7 @@ This tutorial is deprecated, and has been replaced by Lessons 7, 8, 9, and 10 in ## Overview -This tutorial explores the relationship and management of [DataObjects](/developer_guides/model/dataobject). It builds on the [second tutorial](/tutorials/extending_a_basic_site) where we learnt how to define +This tutorial explores the relationship and management of [DataObjects](api:DataObject). It builds on the [second tutorial](/tutorials/extending_a_basic_site) where we learnt how to define additional fields on our models, and attach images to them. ## What are we working towards? @@ -65,8 +65,9 @@ Let's create the `Student` and `Project` objects. The relationships are defined through the `$has_one` and `$has_many` properties on the objects. The array keys declares the name of the relationship, -the array values contain the class name (see the ["database structure"](/developer_guides/model/database_structure) -and ["datamodel"](/developer_guides/model/data_model_and_orm) topics for more information). +the array values contain the class name +(see the ["datamodel"](/developer_guides/model/data_model_and_orm) +topic for more information). As you can see, only the `Project` model extends `Page`, while `Student` is a plain `DataObject` subclass. diff --git a/docs/en/01_Tutorials/index.md b/docs/en/01_Tutorials/index.md index c2b4be94e..845a93707 100644 --- a/docs/en/01_Tutorials/index.md +++ b/docs/en/01_Tutorials/index.md @@ -5,7 +5,7 @@ introduction: The tutorials below take a step by step look at how to build a Sil
These tutorials are deprecated, and have been replaced by the new [Lessons](http://silverstripe.org/learn/lessons) section.
-[CHIDLREN] + ## Video lessons These include video screencasts, written tutorials and code examples to get you started working with SilverStripe websites. diff --git a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md index 9854e98fc..7a6ef4224 100644 --- a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md +++ b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md @@ -13,7 +13,7 @@ information. All data tables in SilverStripe are defined as subclasses of [api:DataObject]. The [api:DataObject] class represents a single row in a database table, following the ["Active Record"](http://en.wikipedia.org/wiki/Active_record_pattern) design pattern. Database Columns are is defined as [Data Types](data_types_and_casting) in the static `$db` variable -along with any [relationships](../relations) defined as `$has_one`, `$has_many`, `$many_many` properties on the class. +along with any [relationships](relations) defined as `$has_one`, `$has_many`, `$many_many` properties on the class. Let's look at a simple example: @@ -222,7 +222,7 @@ Notice that we can step into the loop safely without having to check if `$player // do something here } -See the [Lists](../lists) documentation for more information on dealing with [api:SS_List] instances. +See the [Lists](lists) documentation for more information on dealing with [api:SS_List] instances. ## Returning a single DataObject @@ -512,7 +512,7 @@ whenever a new object is created.
Note: Alternatively you can set defaults directly in the database-schema (rather than the object-model). See -[Data Types and Casting](data-types) for details. +[Data Types and Casting](data_types_and_casting) for details.
## Subclasses diff --git a/docs/en/02_Developer_Guides/00_Model/05_Extending_DataObjects.md b/docs/en/02_Developer_Guides/00_Model/05_Extending_DataObjects.md index e10ec2267..cb30afb4f 100644 --- a/docs/en/02_Developer_Guides/00_Model/05_Extending_DataObjects.md +++ b/docs/en/02_Developer_Guides/00_Model/05_Extending_DataObjects.md @@ -54,7 +54,7 @@ Example: Disallow creation of new players if the currently logged-in player is n Triggered before executing *delete()* on an existing object. -Example: Checking for a specific [permission](/reference/permission) to delete this type of object. It checks if a +Example: Checking for a specific [permission](permissions) to delete this type of object. It checks if a member is logged in who belongs to a group containing the permission "PLAYER_DELETE". :::php diff --git a/docs/en/02_Developer_Guides/00_Model/08_SQL_Query.md b/docs/en/02_Developer_Guides/00_Model/08_SQL_Query.md index 1a92c0839..74dc687ad 100644 --- a/docs/en/02_Developer_Guides/00_Model/08_SQL_Query.md +++ b/docs/en/02_Developer_Guides/00_Model/08_SQL_Query.md @@ -103,7 +103,7 @@ Creates a map based on the first two columns of the query result. ## Related Documentation -* [Introduction to the Data Model and ORM](../data_model_and_orm) +* [Introduction to the Data Model and ORM](data_model_and_orm) ## API Documentation diff --git a/docs/en/02_Developer_Guides/00_Model/How_Tos/Grouping_DataObject_Sets.md b/docs/en/02_Developer_Guides/00_Model/How_Tos/Grouping_DataObject_Sets.md index 3b69bc8d6..246282fd2 100644 --- a/docs/en/02_Developer_Guides/00_Model/How_Tos/Grouping_DataObject_Sets.md +++ b/docs/en/02_Developer_Guides/00_Model/How_Tos/Grouping_DataObject_Sets.md @@ -2,7 +2,7 @@ The [api:SS_List] class is designed to return a flat list of records. These lists can get quite long, and hard to present on a single list. -[Pagination](/howto/pagination) is one way to solve this problem, +[Pagination](/templates/how_tos/pagination) is one way to solve this problem, by splitting up the list into multiple pages. In this howto, we present an alternative to pagination: @@ -144,4 +144,5 @@ The final step is the render this into the template using the [api:GroupedList-> ## Related - * [Howto: "Pagination"](/howto/pagination) \ No newline at end of file + * [Howto: "Pagination"](/templates/how_tos/pagination) + \ No newline at end of file diff --git a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md index 9f85c7e98..9454dcc56 100644 --- a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md +++ b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md @@ -393,7 +393,7 @@ A page will normally contain some content and potentially a form of some kind. F SilverStripe log-in form. If you are on such a page, the `$Form` variable will contain the HTML content of the form. Placing it just below `$Content` is a good default. -You can add your own forms by implementing new form instances (see the [Forms tutorial](../tutorials/forms)). +You can add your own forms by implementing new form instances (see the [Forms tutorial](/tutorials/forms)). ## Related diff --git a/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md b/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md index 1dd70c401..18bc8508b 100644 --- a/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md +++ b/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md @@ -22,7 +22,7 @@ Requiring assets from the template is restricted compared to the PHP API. ## PHP Requirements API -It is common practice to include most Requirements either in the *init()*-method of your [controller](../controller), or +It is common practice to include most Requirements either in the *init()*-method of your [controller](../controllers/), or as close to rendering as possible (e.g. in `[api:FormField]`. :::php @@ -176,17 +176,19 @@ careful when messing with the order of requirements. By default, SilverStripe includes all Javascript files at the bottom of the page body, unless there's another script already loaded, then, it's inserted before the first `