summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_node_language.inc37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_node_language.inc26
10 files changed, 106 insertions, 3 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc
index 1525560..7ced836 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_locale_group.
+ */
+
+/**
* Argument handler to accept a language.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc
index 8d4f38c..316d4b1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_locale_language.
+ */
+
+/**
* Argument handler to accept a language.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc
index 22339e8..393a948 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_locale_group.
+ */
+
+/**
* Field handler to translate a group into its readable form.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
index 0ff36a8..8038e2b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_locale_language.
+ */
+
+/**
* Field handler to translate a language into its readable form.
*
* @ingroup views_field_handlers
@@ -8,7 +13,7 @@
class views_handler_field_locale_language extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['native_language'] = array('default' => FALSE);
+ $options['native_language'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -24,8 +29,8 @@ class views_handler_field_locale_language extends views_handler_field {
}
function render($values) {
- $languages = locale_language_list(empty($this->$options['native_language']) ? 'name' : 'native');
+ $languages = locale_language_list(empty($this->options['native_language']) ? 'name' : 'native');
$value = $this->get_value($values);
- return isset($languages[$value]) ? $languages[$value]->name : '';
+ return isset($languages[$value]) ? $languages[$value] : '';
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc
index 6c8f8f4..3789355 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_locale_link_edit.
+ */
+
+/**
* Field handler to present a link to edit a translation.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_node_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_node_language.inc
new file mode 100644
index 0000000..467605b
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_node_language.inc
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_node_language.
+ */
+
+/**
+ * Field handler to translate a language into its readable form.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_node_language extends views_handler_field_node {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['native_language'] = array('default' => FALSE, 'bool' => TRUE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['native_language'] = array(
+ '#title' => t('Native language'),
+ '#type' => 'checkbox',
+ '#default_value' => $this->options['native_language'],
+ '#description' => t('If enabled, the native name of the language will be displayed'),
+ );
+ }
+
+ function render($values) {
+ $languages = views_language_list(empty($this->options['native_language']) ? 'name' : 'native');
+ $value = $this->get_value($values);
+ $value = isset($languages[$value]) ? $languages[$value] : '';
+ return $this->render_link($value, $values);
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc
index 1941549..5ec1e92 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_locale_group.
+ */
+
+/**
* Filter by locale group.
*
* @ingroup views_filter_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc
index 9c7ba90..eee12a6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_locale_language.
+ */
+
+/**
* Filter by language.
*
* @ingroup views_filter_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc
index d828b2c..7170860 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_locale_version.
+ */
+
+/**
* Filter by version.
*
* @ingroup views_filter_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_node_language.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_node_language.inc
new file mode 100644
index 0000000..7592577
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_node_language.inc
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_node_language.
+ */
+
+/**
+ * Filter by language.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_node_language extends views_handler_filter_in_operator {
+ function get_value_options() {
+ if (!isset($this->value_options)) {
+ $this->value_title = t('Language');
+ $languages = array(
+ '***CURRENT_LANGUAGE***' => t("Current user's language"),
+ '***DEFAULT_LANGUAGE***' => t("Default site language"),
+ LANGUAGE_NONE => t('No language')
+ );
+ $languages = array_merge($languages, views_language_list());
+ $this->value_options = $languages;
+ }
+ }
+}