Commits

caedes committed 018286b Draft

add a migration banner that ppl can't miss.

  • Participants
  • Parent commits 8d84ea2

Comments (0)

Files changed (9)

File elgg/mod/migration_banner/actions/banner.php

+<?php
+/**
+ * Close or open spotlight.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+gatekeeper();
+
+$closed = get_input('closed','true');
+if ($closed != 'true') {
+	$closed = false;
+} else {
+	$closed = true;
+}
+
+get_loggedin_user()->migrationbanner_closed = $closed;
+// exit as this action is called through Ajax
+exit;

File elgg/mod/migration_banner/languages/ca.php

+<?php
+$catalan = array(
+        "migration_banner:title" => "Migració imminent!",
+        "migration_banner:content" => "Aquesta red serà migrada a una nova versió del software l'1 de novembre. <br />El nou software representa més d'un any de treball per part de les fades de lorea, i porta molts canvis en quant a funcionalitat i usabilitat, així com un nou mòdul d'assamblees. <br/>Pots fer-li una ullada a l'aspecte de la nova versió (només per provar, les dades es sincronitzaran al migrar)<ul><li>n-1: <a href='https://beta.n-1.cc'>beta.n-1.cc</a></li><li>cooperativa: <a href='https://cooperativa.lorea.org'>cooperativa.lorea.org</a></li></ul>Si vols deixar algún comentari pots fer-ho en el grup de <a href='https://n-1.cc/pg/groups/929536/testers-elgg-18/'>testers de 1.8 en n-1</a> o escriu un correu a <a href='mailto:migration@lorea.org'>migration@lorea.org</a><br /><br /><a href='https://dev3.lorea.org/pages/view/1870/versio-lorea-foxglove'>Mas info</a>",
+);
+
+
+
+
+add_translation("ca",$catalan);
+

File elgg/mod/migration_banner/languages/en.php

+<?php
+$english = array(
+	"migration_banner:title" => "Migration inminent!",
+	"migration_banner:content" => "This network will be migrated to a new version of the software on the 1st of november. <br />The new software represents more than one year of coding from the lorea faeries and brings many changes in functionality and usability, as well as a brand new assembly module. <br />You can check what the new version looks like (just for testing! data will be reset on migration): <ul><li>n-1: <a href='https://beta.n-1.cc'>beta.n-1.cc</a></li><li>cooperativa: <a href='https://cooperativa.lorea.org'>cooperativa.lorea.org</a></li></ul>If you want to leave feedback or comments you can do it at the <a href='https://n-1.cc/pg/groups/929536/testers-elgg-18/'>1.8 testers group on n-1</a> or write an email to <a href='mailto:migration@lorea.org'>migration@lorea.org</a><br /><br /><a href='https://dev3.lorea.org/pages/view/1085/lorea-foxglove-release'>More info about the release</a>",
+);
+
+add_translation("en",$english);

File elgg/mod/migration_banner/languages/es.php

+<?php
+$spanish = array(
+        "migration_banner:title" => "Migración inminente!",
+        "migration_banner:content" => "Esta red va a ser migrada a una nueva versión del software el 1 de noviembre. <br />El nuevo software representa más de un año de trabajo por parte de las hadas de lorea, y trae muchos cambios en funcionalidad y usabilidad, asi como un nuevo módulo de asambleas. <br  
+/>Puedes echar un vistazo al aspecto de la nueva versión (solo para prueba,  los datos se sincronizarán al migrar): <ul><li>n-1: <a href='https://beta.n-1.cc'>beta.n-1.cc</a></li><li>cooperativa: <a href='https://cooperativa.lorea.org'>cooperativa.lorea.org</a></li></ul>Si quieres dejar algún comentario puedes hacerlo en el grupo de <a href='https://n-1.cc/pg/groups/929536/testers-elgg-18/'>testers de 1.8 en n-1</a> o escribe un correo a <a href='mailto:migration@lorea.org'>migration@lorea.org</a><br /><br /><a href='https://dev3.lorea.org/pages/view/1866/version-lorea-foxglove'>Más información</a>",
+);
+
+add_translation("es",$spanish);
+

File elgg/mod/migration_banner/manifest.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+        <field key="author" value="Lorea Dev" />
+        <field key="version" value="1.5" />
+        <field key="description" value="Migration banner" />
+        <field key="copyright" value="(C) lorea 2012" />
+        <field key="licence" value="GNU Public License version 2" />
+        <field key="elgg_version" value="2009030702" />
+</plugin_manifest>

File elgg/mod/migration_banner/migration_banner.png

Added
New image

File elgg/mod/migration_banner/start.php

+<?php
+
+function migration_banner_init() {
+	global $CONFIG;
+	register_translations($CONFIG->pluginspath . "migration_banner/languages/");
+	extend_view("page_elements/header_contents", "migration_banner/banner");
+	register_action("migration_banner/banner",false,$CONFIG->pluginspath . "migration_banner/actions/banner.php");
+	elgg_extend_view('css','migration_banner/css');
+#extend_view("page_elements/elgg_topbar", "migration_banner/banner");
+}
+
+register_elgg_event_handler('init','system','migration_banner_init');

File elgg/mod/migration_banner/views/default/migration_banner/banner.php

+<?php
+?>
+<div id='layout_spotlight' class="migration_banner">
+<div id='wrapper_spotlight'>
+  <div class="collapsable_box">
+	<div class="collapsable_box_header">
+<?php
+
+	$closed = false;
+	if (get_loggedin_user() instanceof ElggUser) {
+		if (get_loggedin_user()->migrationbanner_closed) {
+			$closed = true;
+		}
+	}
+	if ($closed) {
+?>
+		<a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo elgg_add_action_tokens_to_url("{$vars['url']}action/migration_banner/banner?closed=false"); ?>')">+</a>
+<?php
+		} else {
+?>
+		<a href="javascript:void(0);" class="toggle_box_contents" onClick="$.post('<?php echo elgg_add_action_tokens_to_url("{$vars['url']}action/migration_banner/banner?closed=true"); ?>')">-</a>
+<?php
+
+		}
+
+?>
+	<h1><? echo elgg_echo("migration_banner:title"); ?></h1>
+	</div>
+
+    <div class="collapsable_box_content" <?php if ($closed) echo "style=\"display:none\"" ?>>
+	<div><? echo elgg_echo("migration_banner:content"); ?></div>
+    </div>
+  </div>
+</div>
+</div>
+<div>
+</div>

File elgg/mod/migration_banner/views/default/migration_banner/css.php

+<?php
+
+	/**
+	 * Elgg blog CSS extender
+	 * 
+	 * @package ElggBlog
+	 */
+
+?>
+.migration_banner {
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	border-radius: 5px;
+	background: white url(<?php echo $CONFIG->wwwroot; ?>mod/migration_banner/migration_banner.png) no-repeat !important;
+}
+
+