/** * Handle user removal from ownCloud */ public static function notifyUserDeletion($args) { try { \OCP\DB::beginTransaction(); $query = \OCP\DB::prepare('SELECT `pid`, `title` FROM `*PREFIX*collaboration_project` WHERE `pid` IN (SELECT DISTINCT(`pid`) FROM `*PREFIX*collaboration_works_on` WHERE `member`=?) AND `completed`=?'); $result = $query->execute(array($args['uid'], false)); $projs = $result->fetchAll(); if (count($projs) != 0) { $projects = $projs[0]['title']; $pids = $projs[0]['pid']; for ($i = 1; $i < count($projs); $i++) { $projects .= ', ' . $projs[$i]['title']; $pids .= ' ' . $projs[$i]['pid']; } OC_Collaboration_Post::createPost('Member Removed', 'Owncloud member \'' . $args['uid'] . '\' has been removed from owncloud and hence from the project(s) ' . $projects, OC_User::getUser(), NULL, 'Member removal', OC_Collaboration_Project::getMembersWorkingOnProjects(explode(' ', $pids)), true); } OC_Collaboration_Project::deleteMemberRole(NULL, $args['uid'], NULL, OC_User::getUser(), true); OC_Collaboration_Skillset::removeSkillsOfMember($args['uid']); OC_Collaboration_Post::removePostsByMember($args['uid'], true); \OCP\DB::commit(); OC_Log::write('collaboration', 'User deletion notification posted.', OCP\Util::INFO); } catch (\Exception $e) { OC_Log::write('collaboration', __METHOD__ . ', Exception: ' . $e->getMessage(), OCP\Util::DEBUG); return false; } }
/** * @brief Send an email while creating and assigning a task * @param Title of the task * @param Task description * @param Project ID to which the task belongs * @param To whom the task is assigned * @param Deadline for completing the task */ public static function sendTaskCreationMail($title, $desc, $pid, $member, $deadline) { try { $subject = 'You are assigned a task \'' . $title . '\''; $message = 'Hello ' . $member . ','; $message .= '<br /><p style="text-indent: 50px;" >'; $message .= 'You are assigned to the task \'' . $title . '\' under the project \'' . OC_Collaboration_Project::getProjectTitle($pid) . '\'.'; $message .= '<br /><p style="text-align: justify;" ><span style="font-weight: bold;" >'; $message .= 'Description: '; $message .= '</span>' . $desc . '<br /><br /><span style="font-weight: bold;" >'; $message .= 'Deadline: '; $message .= '</span>' . $deadline . '</p><br /><br />'; $message .= 'For further details, logon to your owncloud account.'; $message .= '<br /><br />'; \OC_Mail::send(OC_Preferences::getValue($member, 'settings', 'email'), $member, $subject, $message, OC_Config::getValue('mail_smtpname', ''), 'Owncloud Collaboration App', true); } catch (\Exception $e) { OC_Log::write('collaboration', __METHOD__ . ', Exception: ' . $e->getMessage(), OCP\Util::DEBUG); return false; } }
* * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'tasks'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'tasks'); $tpl = new OCP\Template("collaboration", "tasks", "user"); $args = array('project' => NULL, 'status' => NULL, 'assigned_by' => NULL, 'assigned_to' => NULL); if (isset($_GET['project']) && $_GET['project'] != 'ALL') { if (!OC_Collaboration_Project::isMemberWorkingOnProjectByTitle(OC_User::getUser(), $_GET['project'])) { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard'))); throw new Exception(OC_User::getUser() . ' is trying to access project ' . $_GET['project']); exit; } else { $tpl->assign('project', $_GET['project']); $args['project'] = $_GET['project']; } } if (isset($_GET['status']) && $_GET['status'] != 'ALL') { $tpl->assign('status', $_GET['status']); $args['status'] = $_GET['status']; } if (!isset($_GET['assigned_by']) && !isset($_GET['assigned_to'])) { $_GET['assigned_by'] = $_GET['assigned_to'] = 'on'; }
</th> </tr> <?php } foreach ($member_role as $role => $members) { print_unescaped('<tr><td>' . $role . '</td><td>'); foreach ($members as $index => $member) { print_unescaped($member . '<br />'); } print_unescaped('</td></tr>'); } ?> </table> <?php if (OC_Collaboration_Project::isProjectCreatedByMember($_['project_details']['pid'], OC_User::getUser())) { ?> <form action="<?php print_unescaped(OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'update_project'))); ?> " method="post" > <input type="hidden" name="pid" value="<?php p($_['project_details']['pid']); ?> " /> <input type="submit" value="<?php p($l->t('Edit')); ?> " id="edit_project_btn" disabled /> </form> <?php
<?php /** * ownCloud - bookmarks plugin * * @authors Dr.J.Akilandeswari, R.Ramki, R.Sasidharan, P.Suresh * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); OCP\JSON::checkAppEnabled('collaboration'); if (isset($_POST['title'])) { OCP\JSON::success(array('pid' => OC_Collaboration_Project::getProjectId($_POST['title']))); exit; } OC_JSON::error(); exit;
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ print_unescaped($this->inc('tabs')); ?> <div id="app-content"> <div class="cb_contentcontainer"> <h1 id="title"> <?php p($l->t('Project Report')); ?> </h1> <div id="project_list_container" > <?php $projects = OC_Collaboration_Project::getProjects(OC_User::getUser()); ?> <form id="chooser_form" action="" > <select id="projects_list" name="project" class="chzen-select" > <option value="" ><?php p($l->t('Select Project')); ?> </option> <?php foreach ($projects as $pid => $ptitle) { print_unescaped('<option value="' . $pid . '">' . $ptitle . '</option>'); } ?> </select>
OC_JSON::error(); exit; } $projects = OC_Collaboration_Project::getProjectDetails(OC_User::getUser(), NULL, $_POST['start'], $_POST['count']); $text = ''; foreach ($projects as $each) { $datetime = explode(' ', $each['starting_date']); $datetime1 = explode(' ', $each['ending_date']); if (!isset($each['title']) || $each['title'] == '') { break; } $datetime = explode(' ', $each['time']); $text .= '<div class="unit"> <div class="project_title">' . $each['title'] . '</div> <div class="contents"><div class="description" >' . $each['description'] . '</div>' . (!OC_Collaboration_Project::isAdmin() ? '' : '<br /> <br /> <div class="edit" > <button class="btn_edit" id="btn_edit_' . $each['pid'] . '" >' . $l->t('Edit') . '</button> </div>') . '</div> <div class="details"> <div class="creation_details">' . $l->t('On %s at %s', array($l->l('date', $datetime[0]), $l->l('time', $datetime[1]))) . '</div> <div class="deadline_details">' . $l->t('On %s at %s', array($l->l('date', $datetime1[0]), $l->l('time', $datetime1[1]))) . '</div> </div> </div>'; } OCP\JSON::success(array('projects' => $text)); exit;
\OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'update_task'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-ui-sliderAccess'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-ui-timepicker-addon'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-te'); OCP\Util::addStyle('collaboration/3rdparty', 'jquery-te'); OCP\Util::addStyle('collaboration/3rdparty', 'jquery-ui-timepicker-addon'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'update_task'); $l = OC_L10N::get('collaboration'); $tpl = new OCP\Template('collaboration', 'update_task', 'user'); $bol = OC_Collaboration_Project::isAdmin(); if ($bol == true) { if (isset($_POST['tid'])) { $tpl->assign('title', $l->t('Update Task')); $tpl->assign('submit_btn_name', $l->t('Update')); $tpl->assign('tid', $_POST['tid']); $tpl->assign('task_details', OC_Collaboration_Task::readTask($_POST['tid'])); } else { $tpl->assign('title', $l->t('Create Task')); $tpl->assign('submit_btn_name', $l->t('Create')); $tpl->assign('projects', OC_Collaboration_Project::getProjects(OC_User::getUser())); } $tpl->printPage(); } else { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard'))); \OCP\Util::writeLog('collaboration', 'Permission denied for ' . OC_User::getUser() . ' to create task.', \OCP\Util::WARN); exit; }
<td> <?php p($l->t('Members')); ?> : </td> <td id="remove_old_member_loading_img" > </td> </tr> </table> <?php if ($pid != -1) { $member_role = OC_Collaboration_Project::getMembers($pid); print_unescaped('<span class="old_mem_list" >'); foreach ($member_role as $role => $members) { print_unescaped('<div class="old_members" data-role="' . $role . '" ><div class="old_mem_role" >' . $role . ': </div>'); if (strcasecmp($role, 'Creator') == 0) { print_unescaped('<span>' . $members[0] . '</span>'); } else { foreach ($members as $index => $member) { print_unescaped('<span>' . $member . ' <img src="' . OCP\Util::linkTo('core', 'img/actions/delete.png') . '" class="delete_old_member" data-member="' . $member . '" title="' . $l->t('Delete') . '" /><br /></span>'); } } print_unescaped('</div>'); } print_unescaped('</span>'); } ?>
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'project_details'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'project_details'); if (isset($_POST['pid']) && OC_Collaboration_Project::isMemberWorkingOnProject(OC_User::getUser(), $_POST['pid'])) { $tpl = new OCP\Template("collaboration", "project_details", "user"); $details = OC_Collaboration_Project::readProject($_POST['pid']); if (isset($details['pid'])) { $tpl->assign('project_details', $details); if (isset($_POST['msg'])) { $tpl->assign('msg', $_POST['msg']); } $tpl->printPage(); } else { goToDashboard(); } } else { goToDashboard(); } function goToDashboard() { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard')));
* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'report'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'report'); $l = OC_L10N::get('collaboration'); $bol = OC_Collaboration_Project::isAdmin(); if ($bol == true) { $tpl = new OCP\Template('collaboration', 'report', 'user'); $tpl->printPage(); } else { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard'))); \OCP\Util::writeLog('collaboration', 'Permission denied for ' . OC_User::getUser() . ' to genereate report.', \OCP\Util::WARN); exit; }
* * @authors Dr.J.Akilandeswari, R.Ramki, R.Sasidharan, P.Suresh * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); OCP\JSON::checkAppEnabled('collaboration'); if (isset($_POST['pid'])) { if (!OC_Collaboration_Project::isMemberWorkingOnProject(OC_User::getUser(), $_POST['pid'])) { \OCP\Util::writeLog('collaboration', OC_User::getUser() . ' is trying to access project with Project ID ' . $_POST['pid'], \OCP\Util::WARN); OC_JSON::error(); exit; } OCP\JSON::success(array('members' => OC_Collaboration_Project::getMembers($_POST['pid']))); exit; } OC_JSON::error(); exit;
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'display_message'); OCP\Util::addScript('collaboration', 'create_event'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'tabs'); $l = OC_L10N::get('collaboration'); $eve = new OCP\Template('collaboration', 'event_form', 'user'); if (!OC_Collaboration_Project::isMemberWorkingOnProject(OC_User::getUser(), $_POST['pid'])) { \OCP\Util::writeLog('collaboration', OC_User::getUser() . ' is trying to create task on project with Project ID ' . $_POST['pid'], \OCP\Util::WARN); $eve->assign('permission_granted', 'false'); $eve->assign('title', $_POST['title']); $eve->printPage(); } else { if (!isset($_POST['tid'])) { $tid = NULL; if (isset($_POST['status'])) { $tid = OC_Collaboration_Task::createTask($_POST['title'], $_POST['description'], OC_User::getUser(), $_POST['pid'], $_POST['priority'], $_POST['deadline_time'], 'In Progress', $_POST['member']); } else { $tid = OC_Collaboration_Task::createTask($_POST['title'], $_POST['description'], OC_User::getUser(), $_POST['pid'], $_POST['priority'], $_POST['deadline_time'], 'Unassigned', NULL); } if ($tid != false && isset($_POST['send_mail'])) { OC_Collaboration_Mail::sendTaskCreationMail($_POST['title'], $_POST['description'], $_POST['pid'], $_POST['member'], $_POST['deadline_time']); }
/** * @brief Unassign all the tasks performed by the given member * @param Member whose tasks have to be unassigned * @param Project ID * @param Member who removes the other member * @param Whether the calling method has already initiated the (database) transaction */ public static function unassignMembersTasks($member, $pid, $remover, $inTransaction) { try { if (!$inTransaction) { OCP\DB::beginTransaction(); } $query = \OCP\DB::prepare('SELECT `tstatus`.`tid`, `task`.`title` FROM `*PREFIX*collaboration_task_status` AS tstatus, `*PREFIX*collaboration_task` AS task, `*PREFIX*collaboration_project` AS project WHERE ' . (is_null($pid) ? '' : ' `project`.`pid`=? AND ') . '`project`.`completed`=false AND `tstatus`.`tid`=`task`.`tid` AND `task`.`pid`=`project`.`pid` AND (`status`=\'In Progress\' OR `status`=\'Held\') AND `member`=? AND `tstatus`.`last_updated_time`= (SELECT MAX(`last_updated_time`) FROM `*PREFIX*collaboration_task_status` WHERE `tid`=`tstatus`.`tid`)'); $args = array(); if (is_null($pid)) { $args[0] = $member; } else { $args[0] = $pid; $args[1] = $member; } $result = $query->execute($args); $reason = 'User removed from ' . (is_null($pid) ? 'owncloud' : OC_Collaboration_Project::getProjectTitle($pid)); while ($row = $result->fetchRow()) { self::changeStatus($row['tid'], $row['title'], 'Unassigned', $remover, NULL, $reason, true); } if (!$inTransaction) { OCP\DB::commit(); } } catch (\Exception $e) { OC_Log::write('collaboration', __METHOD__ . ', Exception: ' . $e->getMessage(), OCP\Util::DEBUG); return false; } }
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'skillset_details'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'skillset_details'); $tpl = new OCP\Template("collaboration", "skillset_details", "user"); if (isset($_GET['project'])) { $skills = OC_Collaboration_Task::getTasksCount($_GET['project']); if (!OC_Collaboration_Project::isMemberWorkingOnProject(OC_User::getUser(), $_GET['project']) || $skills == false) { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard'))); \OCP\Util::writeLog('collaboration', OC_User::getUser() . ' is trying to access project ' . $_GET['project'], \OCP\Util::WARN); exit; } else { $tpl->assign('project', $_GET['project']); $tpl->assign('members', $skills); } } else { header('Location: ' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'dashboard'))); exit; } $tpl->printPage();
* * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); OCP\JSON::checkAppEnabled('collaboration'); $l = OC_L10N::get('collaboration'); if (isset($_POST['member']) && isset($_POST['start']) && isset($_POST['count']) && isset($_POST['project'])) { if (strcasecmp($_POST['member'], OC_User::getUser()) != 0) { \OCP\Util::writeLog('collaboration', OC_User::getUser() . ' is trying to access posts of ' . $_POST['member'], \OCP\Util::WARN); OC_JSON::error(); exit; } if ($_POST['project'] != '' && !OC_Collaboration_Project::isMemberWorkingOnProjectByTitle(OC_User::getUser(), $_POST['project'])) { \OCP\Util::writeLog('collaboration', OC_User::getUser() . ' is trying to access project ' . $_POST['project'], \OCP\Util::WARN); OC_JSON::error(); exit; } $posts = OC_Collaboration_Post::readPosts($_POST['member'], $_POST['project'], $_POST['start'], $_POST['count']); $text = ''; foreach ($posts as $each) { if (!isset($each['title']) || $each['title'] == '') { break; } $datetime = explode(' ', $each['time']); $text .= '<div class="unit"> <div class="post_title">' . $each['title'] . '</div> <div class="contents">' . $each['content'] . '<br />
$l = OC_L10N::get('collaboration'); // Fetch member list $details = array(array()); $i = 0; foreach ($_POST as $key => $value) { if (strpos($key, 'mem_name') === 0) { $id = substr($key, 8); $details[$i]['member'] = $value; $details[$i]['role'] = $_POST['mem_role' . $id]; $details[$i]['email'] = $_POST['mem_email' . $id]; $details[$i]['mobile'] = $_POST['mem_mobile' . $id]; $i++; } } $tpl = new OCP\Template('collaboration', 'display_message', 'user'); $tpl->assign('title', $l->t('Loading...')); $tpl->assign('msg', $l->t('Updating project \'%s\'. Please be patient.', array($_POST['title']))); $tpl->printPage(); $redirect = ''; $post_id = false; if (!isset($_POST['pid'])) { $post_id = OC_Collaboration_Project::createProject($_POST['title'], $_POST['description'], OC_User::getUser(), $_POST['deadline'], $details); $redirect = 'submit_new_project'; } else { $post_id = OC_Collaboration_Project::updateProject($_POST['pid'], $_POST['title'], $_POST['description'], $_POST['deadline'], $details, OC_User::getUser(), isset($_POST['project_completed'])); $redirect = 'submit_change_project'; } if ($post_id != false && isset($_POST['send_mail'])) { OC_Collaboration_Mail::sendProjectAssignmentMail($_POST['title'], $details); } print_unescaped('<META HTTP-EQUIV="Refresh" Content="0; URL=' . \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => $redirect)) . '?post=' . $post_id . '&title=' . $_POST['title'] . '">');
<div class="comment" > <form class="view_details" action="<?php p(\OCP\Util::linkToRoute('collaboration_route', array('rel_path' => 'project_details'))); ?> " method="post" > <input type="hidden" name="pid" value="<?php p($each['pid']); ?> " /> <input type="submit" value="<?php p($l->t('View details')); ?> " /> </form> <?php if (OC_Collaboration_Project::isAdmin()) { ?> <div class="edit" > <button class="btn_edit" id="<?php p('btn_edit_' . $each['pid']); ?> " > <?php p($l->t('Edit')); ?> </button> </div> <?php } ?> </div>
<?php /** * ownCloud - bookmarks plugin * * @authors Dr.J.Akilandeswari, R.Ramki, R.Sasidharan, P.Suresh * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); OCP\JSON::checkAppEnabled('collaboration'); try { OCP\JSON::success(array('projects' => OC_Collaboration_Project::getProjects(OC_User::getUser()))); exit; } catch (Exception $e) { OC_JSON::error(); exit; }
<?php /** * ownCloud - bookmarks plugin * * @authors Dr.J.Akilandeswari, R.Ramki, R.Sasidharan, P.Suresh * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); OCP\JSON::checkAppEnabled('collaboration'); if (isset($_POST['pid'])) { OCP\JSON::success(array('deadline' => OC_Collaboration_Project::getDeadline($_POST['pid']))); exit; } OC_JSON::error(); exit;
<?php p($l->t('Skillset')); ?> </h1> <table id="skills"> <tr> <th> <?php p($l->t('Member')); ?> </th> <th> <?php print_unescaped($l->t('Number of tasks in project<br />\'%s\'', array(OC_Collaboration_Project::getProjectTitle($_['project'])))); ?> </th> <th> <?php p($l->t('Number of tasks in all projects')); ?> </th> <th> <?php p($l->t('Skill')); ?> </th>
\OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'update_project'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'update_project'); $l = OC_L10N::get('collaboration'); $bol = OC_Collaboration_Project::isAdmin(); if ($bol == true) { $tpl = new OCP\Template('collaboration', 'update_project', 'user'); if (isset($_POST['pid'])) { $tpl->assign('title', $l->t('Update Project')); $tpl->assign('submit_btn_name', $l->t('Update')); $tpl->assign('pid', $_POST['pid']); $tpl->assign('project_details', OC_Collaboration_Project::readProject($_POST['pid'])); } else { $tpl->assign('title', $l->t('Create Project')); $tpl->assign('submit_btn_name', $l->t('Create')); } $tpl->printPage(); } else { /* Use this if you don't want to redirect OCP\Util::addScript('collaboration', 'display_message'); $tpl = new OCP\Template('collaboration', 'display_message', 'user'); $tpl->assign('title', 'Permission denied'); $tpl->assign('msg', 'Sorry, you must have admin rights, to create a project.'); $tpl->printPage(); */