[phpwebapp-commits] CVS: top10/templates/edit_project edit_project_adm.js,NONE,1.1 edit_project.php,
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2003-10-02 07:09:46
|
Update of /cvsroot/phpwebapp/top10/templates/edit_project In directory sc8-pr-cvs1:/tmp/cvs-serv5584/templates/edit_project Modified Files: edit_project.php edit_project.js edit_project.html Added Files: edit_project_adm.js Log Message: --- NEW FILE: edit_project_adm.js --- // -*-C-*- //tell emacs to use C mode function send_to_user() { var username = prompt("Give the username to which you will send it:"); if (username==null) return; //canceled SendEvent("edit_project", "send_to_user", "username="+username); } Index: edit_project.php =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/edit_project/edit_project.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_project.php 30 Sep 2003 09:41:07 -0000 1.2 --- edit_project.php 2 Oct 2003 07:09:40 -0000 1.3 *************** *** 103,106 **** --- 103,120 ---- } + function on_send_to_user($event_args) + { + if (ADMIN <> 'true') return; + + $username = $event_args["username"]; + $to = "dasho"; + //$to = $username."@users.sourceforge.net"; + $subject = ""; + $message = " "; + + mail($to, $subject, $message); + WebApp::message("Project sent to '$to' for editing."); + } + function onRender() { Index: edit_project.js =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/edit_project/edit_project.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_project.js 30 Sep 2003 09:41:07 -0000 1.2 --- edit_project.js 2 Oct 2003 07:09:40 -0000 1.3 *************** *** 1,3 **** --- 1,23 ---- // -*-C-*- //tell emacs to use C mode + /* + This file is part of Top10. Top10 is a web application for ranking + and evaluating web application projects at SourceForge. + + Copyright 2003 Dashamir Hoxha, das...@us... + + Top10 is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + Top10 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 General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with Top10; if not, write to the Free Software Foundation, Inc., + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ function add_project() *************** *** 59,61 **** --- 79,86 ---- return true; + } + + function add_new_project() + { + SendEvent("module", "add_new_project"); } Index: edit_project.html =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/edit_project/edit_project.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_project.html 30 Sep 2003 09:41:07 -0000 1.2 --- edit_project.html 2 Oct 2003 07:09:40 -0000 1.3 *************** *** 5,9 **** <If condition="'{{mode}}'!='add'"> ! <h2>Project: <a href="http://sourceforge.net/projects/{{proj_id}}" target="_blank">{{proj_name}} ({{proj_id}})</a></h2> </If> --- 5,9 ---- <If condition="'{{mode}}'!='add'"> ! <h2>Edit Project: <a href="http://sourceforge.net/projects/{{proj_id}}" target="_blank">{{proj_name}} ({{proj_id}})</a></h2> </If> *************** *** 91,96 **** </If> <If condition="'{{mode}}'=='done'"> ! <a class="button" href="javascript:SendEvent('module','add_new_project')"> Add Another Project </a> </If> --- 91,102 ---- </If> <If condition="'{{mode}}'=='done'"> ! <a class="button" href="javascript:add_new_project()"> Add Another Project + </a> + </If> + <If condition="'{{ADMIN}}'=='true'"> + <script language="javascript" src="{{./}}edit_project_adm.js"></script> + <a class="button" href="javascript:send_to_user()"> + Give Editing Rights to a User </a> </If> |