From: Fabio Comuni Date: Wed, 15 Feb 2012 11:47:50 +0000 (+0100) Subject: enable ajax calendar with $a->config['experimentals']['new_calendar']=1 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=73bee08ac2ce4e89ab365d23f431f5e0c465abd6;p=friendica.git enable ajax calendar with $a->config['experimentals']['new_calendar']=1 --- diff --git a/mod/events.php b/mod/events.php index e10f508dd6..0906d16c2e 100755 --- a/mod/events.php +++ b/mod/events.php @@ -284,7 +284,11 @@ function events_content(&$a) { if (x($_GET,'id')){ $tpl = get_markup_template("event.tpl"); } else { - $tpl = get_markup_template("events.tpl"); + if (get_config('experimentals','new_calendar')==1){ + $tpl = get_markup_template("events-js.tpl"); + } else { + $tpl = get_markup_template("events.tpl"); + } } $o = replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), diff --git a/mod/settings.php b/mod/settings.php index b4cd2e608a..57a4e6db03 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -734,8 +734,11 @@ function settings_content(&$a) { if($files) { foreach($files as $file) { $f = basename($file); - $theme_name = ((file_exists($file . '/experimental')) ? sprintf("%s - \x28Experimental\x29", $f) : $f); - $themes[$f]=$theme_name; + $is_experimental = file_exists($file . '/experimental'); + if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){ + $theme_name = (($is_experimental) ? sprintf("%s - \x28Experimental\x29", $f) : $f); + $themes[$f]=$theme_name; + } } } $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); diff --git a/view/events-js.tpl b/view/events-js.tpl new file mode 100644 index 0000000000..b0e182c56d --- /dev/null +++ b/view/events-js.tpl @@ -0,0 +1,6 @@ +$tabs +

$title

+ + + +
diff --git a/view/events.tpl b/view/events.tpl index b0e182c56d..5a9787de36 100644 --- a/view/events.tpl +++ b/view/events.tpl @@ -3,4 +3,22 @@ $tabs -
+
+ + $calendar + +
+
+ + +{{ for $events as $event }} +
+ {{ if $event.is_first }}
$event.d
{{ endif }} + {{ if $event.item.author-name }}$event.item.author-name{{ endif }} + $event.html + {{ if $event.item.plink }}{{ endif }} + {{ if $event.edit }}{{ endif }} +
+
+ +{{ endfor }}