]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added remaining files to last commit.
authorSem <sembrestels@riseup.net>
Mon, 24 Sep 2012 13:33:16 +0000 (15:33 +0200)
committerSem <sembrestels@riseup.net>
Mon, 24 Sep 2012 13:33:16 +0000 (15:33 +0200)
graphics/openid_icon.png [new file with mode: 0644]
views/default/core/account/login_box.php [new file with mode: 0644]
views/default/core/account/login_dropdown.php [new file with mode: 0644]
views/default/openid_client/icon.php [new file with mode: 0644]

diff --git a/graphics/openid_icon.png b/graphics/openid_icon.png
new file mode 100644 (file)
index 0000000..97d4714
Binary files /dev/null and b/graphics/openid_icon.png differ
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php
new file mode 100644 (file)
index 0000000..1fe452e
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Elgg login box
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['module'] The module name. Default: aside
+ */
+
+$module = elgg_extract('module', $vars, 'aside');
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+       $login_url = str_replace("http:", "https:", $login_url);
+}
+
+$title = elgg_echo('login');
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"));
+$body .= elgg_view_form('openid_client/login', array('class' => 'elgg-form-login hidden'), array());
+$body .= elgg_view('openid_client/icon');
+
+echo elgg_view_module($module, $title, $body);
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
new file mode 100644 (file)
index 0000000..7882fde
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Elgg drop-down login form
+ */
+
+if (elgg_is_logged_in()) {
+       return true;
+}
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+       $login_url = str_replace("http:", "https:", elgg_get_site_url());
+}
+
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
+$body .= elgg_view_form('openid_client/login', array('class' => 'elgg-form-login hidden'), array());
+$body .= elgg_view('openid_client/icon');
+?>
+<div id="login-dropdown">
+       <?php 
+               echo elgg_view('output/url', array(
+                       'href' => 'login#login-dropdown-box',
+                       'rel' => 'popup',
+                       'class' => 'elgg-button elgg-button-dropdown',
+                       'text' => elgg_echo('login'),
+               )); 
+               echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box')); 
+       ?>
+</div>
diff --git a/views/default/openid_client/icon.php b/views/default/openid_client/icon.php
new file mode 100644 (file)
index 0000000..3a9a9d9
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+echo elgg_view('output/url', array(
+       'text' => elgg_view_icon('openid') . elgg_echo('openid_client:login'),
+       'href' => '',
+       'title' => elgg_echo('openid_client'),
+       'class' => "openid-login-icon",
+));
\ No newline at end of file