aboutsummaryrefslogtreecommitdiff
path: root/views/default/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/tasks')
-rw-r--r--views/default/tasks/css.php26
-rw-r--r--views/default/tasks/group_module.php50
-rw-r--r--views/default/tasks/js.php35
-rw-r--r--views/default/tasks/page/elements/comments.php43
-rw-r--r--views/default/tasks/participant_count.php42
-rw-r--r--views/default/tasks/sidebar.php14
-rw-r--r--views/default/tasks/sidebar/navigation.php60
-rw-r--r--views/default/tasks/tasklist_graph.php65
8 files changed, 0 insertions, 335 deletions
diff --git a/views/default/tasks/css.php b/views/default/tasks/css.php
deleted file mode 100644
index fc1b670a7..000000000
--- a/views/default/tasks/css.php
+++ /dev/null
@@ -1,26 +0,0 @@
-.tasklist-graph {
- height: 10px;
- line-height: 10px;
- border: 2px solid #CCCCCC;
-}
-
-.tasklist-graph div {
- background: #4690D6;
-}
-
-.elgg-input-radios label {
- font-weight: normal;
-}
-
-.elgg-menu-extras .elgg-icon-checkmark {
- background-position: 0 -126px;
-}
-
-#tasks-inline-form {
- padding: 10px
-}
-
-.elgg-tasks-participants {
- position: absolute;
- width: 345px;
-} \ No newline at end of file
diff --git a/views/default/tasks/group_module.php b/views/default/tasks/group_module.php
deleted file mode 100644
index 8f2c424b8..000000000
--- a/views/default/tasks/group_module.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Group tasks module
- */
-
-elgg_load_library('elgg:tasks');
-
-$group = elgg_get_page_owner_entity();
-
-if ($group->tasks_enable == "no") {
- return true;
-}
-
-$all_link = elgg_view('output/url', array(
- 'href' => "tasks/group/$group->guid/all",
- 'text' => elgg_echo('link:view:all'),
- 'is_trusted' => true,
-));
-
-elgg_push_context('widgets');
-$entities = tasks_get_entities(array(
- 'type' => 'object',
- 'subtype' => 'task',
- 'container_guid' => elgg_get_page_owner_guid(),
- 'limit' => 6,
- 'list_guid' => 0,
-));
-
-$content = elgg_view_entity_list($entities, array(
- 'full_view' => false,
- 'pagination' => false,
-));
-elgg_pop_context();
-
-if (!$content) {
- $content = '<p>' . elgg_echo('tasks:none') . '</p>';
-}
-
-$new_link = elgg_view('output/url', array(
- 'href' => "tasks/add/$group->guid",
- 'text' => elgg_echo('tasks:add'),
- 'is_trusted' => true,
-));
-
-echo elgg_view('groups/profile/module', array(
- 'title' => elgg_echo('tasks:group'),
- 'content' => $content,
- 'all_link' => $all_link,
- 'add_link' => $new_link,
-));
diff --git a/views/default/tasks/js.php b/views/default/tasks/js.php
deleted file mode 100644
index 985e95e0a..000000000
--- a/views/default/tasks/js.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/*
- *
- */
-?>
-
-elgg.provide('elgg.ui.getSelection');
-
-elgg.ui.getSelection = function () {
- if (window.getSelection) {
- return window.getSelection().toString();
- }
- else if (document.getSelection) {
- return document.getSelection();
- }
- else if (document.selection) {
- // this is specifically for IE
- return document.selection.createRange().text;
- }
-}
-
-$(function() {
- $('.elgg-menu-extras .elgg-menu-item-task a').click(function() {
- var title = encodeURIComponent(elgg.ui.getSelection());
- if (!title) {
- title = encodeURIComponent($('h2.elgg-heading-main').text());
- }
- referer_guid = $('.elgg-form-comments-add input[name="entity_guid"]').val();
- var href = $(this).attr('href') + "&title=" + title;
- if (referer_guid) {
- href += "&referer_guid=" + referer_guid;
- }
- $(this).attr('href', href);
- });
-}); \ No newline at end of file
diff --git a/views/default/tasks/page/elements/comments.php b/views/default/tasks/page/elements/comments.php
deleted file mode 100644
index ef1737a63..000000000
--- a/views/default/tasks/page/elements/comments.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * List comments with optional add form
- *
- * @uses $vars['entity'] ElggEntity
- * @uses $vars['show_add_form'] Display add form or not
- * @uses $vars['id'] Optional id for the div
- * @uses $vars['class'] Optional additional class for the div
- */
-
-$show_add_form = elgg_extract('show_add_form', $vars, true);
-
-$id = '';
-if (isset($vars['id'])) {
- $id = "id =\"{$vars['id']}\"";
-}
-
-$class = 'elgg-comments';
-if (isset($vars['class'])) {
- $class = "$class {$vars['class']}";
-}
-
-// work around for deprecation code in elgg_view()
-unset($vars['internalid']);
-
-echo "<div $id class=\"$class\">";
-
-$options = array(
- 'guid' => $vars['entity']->getGUID(),
- 'annotation_names' => array('generic_comment', 'task_state_changed'),
-);
-$html = elgg_list_annotations($options);
-if ($html) {
- echo '<h3>' . elgg_echo('tasks:changehistory') . '</h3>';
- echo $html;
-}
-
-if ($show_add_form) {
- $form_vars = array('name' => 'elgg_add_comment');
- echo elgg_view_form('tasks/comments/add', $form_vars, $vars);
-}
-
-echo '</div>';
diff --git a/views/default/tasks/participant_count.php b/views/default/tasks/participant_count.php
deleted file mode 100644
index 781588693..000000000
--- a/views/default/tasks/participant_count.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * Count of who is participating in a task
- *
- * @uses $vars['entity']
- */
-
-$guid = $vars['entity']->getGUID();
-
-$list = '';
-$num_of_participants = elgg_get_entities_from_relationship(array(
- 'relationship' => 'subscribes',
- 'relationship_guid' => $guid,
- 'inverse_relationship' => true,
- 'count' => true,
-));
-//var_dump($num_of_participants);
-if ($num_of_participants) {
- // display the number of participants
- if ($num_of_participants == 1) {
- $participants_string = elgg_echo('tasks:participant', array($num_of_participants));
- } else {
- $participants_string = elgg_echo('tasks:participants', array($num_of_participants));
- }
- $params = array(
- 'text' => $participants_string,
- 'title' => elgg_echo('tasks:participants:see'),
- 'rel' => 'popup',
- 'href' => "#tasks-participants-$guid"
- );
- $list = elgg_view('output/url', $params);
- $list .= "<div class='elgg-module elgg-module-popup elgg-tasks-participants hidden clearfix' id='tasks-participants-$guid'>";
- $list .= elgg_list_entities_from_relationship(array(
- 'relationship' => 'subscribes',
- 'relationship_guid' => $guid,
- 'inverse_relationship' => true,
- 'limit' => 99,
- 'list_class' => 'elgg-list-tasks-participants',
- ));
- $list .= "</div>";
- echo $list;
-}
diff --git a/views/default/tasks/sidebar.php b/views/default/tasks/sidebar.php
deleted file mode 100644
index 141965b92..000000000
--- a/views/default/tasks/sidebar.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/**
- * File sidebar
- */
-
-echo elgg_view('page/elements/comments_block', array(
- 'subtypes' => 'task',
- 'owner_guid' => elgg_get_page_owner_guid(),
-));
-
-echo elgg_view('page/elements/tagcloud_block', array(
- 'subtypes' => 'task',
- 'owner_guid' => elgg_get_page_owner_guid(),
-));
diff --git a/views/default/tasks/sidebar/navigation.php b/views/default/tasks/sidebar/navigation.php
deleted file mode 100644
index 389f4fb8a..000000000
--- a/views/default/tasks/sidebar/navigation.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * Navigation menu for a user's or a group's pages
- *
- * @uses $vars['page'] Page object if manually setting selected item
- */
-
-// add the jquery treeview files for navigation
-elgg_load_js('jquery-treeview');
-elgg_load_css('jquery-treeview');
-
-
-$entity = elgg_extract('entity', $vars, false);
-if (elgg_instanceof($entity, 'object', 'task') && ($list = get_entity($entity->list_guid))) {
- $url = $list->getURL();
-} elseif ($entity) {
- $url = $entity->getURL();
-}
-
-$title = elgg_echo('tasks:navigation');
-
-tasks_register_navigation_tree(elgg_get_page_owner_entity());
-
-$content = elgg_view_menu('tasks_nav', array('class' => 'tasks-nav'));
-if (!$content) {
- $content = '<p>' . elgg_echo('tasks:none') . '</p>';
-}
-
-echo elgg_view_module('aside', $title, $content);
-
-?><?php //@todo JS 1.8: no ?>
-<script type="text/javascript">
-$(document).ready(function() {
- $(".tasks-nav").treeview({
- persist: "location",
- collapsed: true,
- unique: true
- });
-
-<?php
-if ($entity) {
- // if on a history page, we need to manually select the correct menu item
- // code taken from the jquery.treeview library
-?>
- var current = $(".tasks-nav a[href='<?php echo $url; ?>']");
- var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
- var CLASSES = $.treeview.classes;
- items.filter("li")
- .swapClass( CLASSES.collapsable, CLASSES.expandable )
- .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
- .find(">.hitarea")
- .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
- .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
-<?php
-}
-?>
-
-});
-
-</script>
diff --git a/views/default/tasks/tasklist_graph.php b/views/default/tasks/tasklist_graph.php
deleted file mode 100644
index f46066a8a..000000000
--- a/views/default/tasks/tasklist_graph.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-elgg_load_library('elgg:tasks');
-
-$entity = $vars['entity'];
-
-$total = tasks_get_entities(array(
- 'list_guid' => $vars['entity']->guid,
- 'count' => true,
-));
-$closed = tasks_get_entities(array(
- 'list_guid' => $vars['entity']->guid,
- 'status' => 'closed',
- 'count' => true,
-));
-$total_link = $entity->getURL()."#all";
-// Closed tasks aren't contabilized in graph.
-$total -= $closed;
-
-$done = tasks_get_entities(array(
- 'list_guid' => $vars['entity']->guid,
- 'status' => 'done',
- 'count' => true,
-));
-
-$remaining = $total - $done;
-$remaining_link = $entity->getURL()."#remaining";
-
-$assigned = tasks_get_entities(array(
- 'list_guid' => $vars['entity']->guid,
- 'status' => array('assigned', 'active'),
- 'count' => true,
-));
-$assigned_link = $entity->getURL()."#assigned";
-
-$active = tasks_get_entities(array(
- 'list_guid' => $vars['entity']->guid,
- 'status' => 'active',
- 'count' => true,
-));
-$active_link = $entity->getURL()."#active";
-
-if ($total == 0) {
- $percent = 0;
-} else {
- $percent = $done / $total * 100;
-}
-
-?>
-
-<div>
-<div class="tasklist-graph">
- <div style="width:<?php echo $percent.'%'; ?>">&nbsp;</div>
-</div>
-
-<?php
-
-echo '<a href="'.$total_link.'">' . elgg_echo('tasks:lists:graph:total', array($total)) . '</a>, ';
-echo '<a href="'.$remaining_link.'">' . elgg_echo('tasks:lists:graph:remaining', array($remaining)) . '</a>, ';
-echo '<a href="'.$assigned_link.'">' . elgg_echo('tasks:lists:graph:assigned', array($assigned)) . '</a>, ';
-echo '<a href="'.$active_link.'">' . elgg_echo('tasks:lists:graph:active', array($active)) . '</a>';
-
-?>
-
-</div>