~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to html/user/team_manage.php

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
require_once("../inc/team.inc");
22
22
 
23
23
function show_admin_page($user, $team) {
24
 
    page_head("Team administration for $team->name");
 
24
    page_head(tra("Team administration for %1", $team->name));
25
25
    echo "
26
26
        <ul>
27
 
        <li><a href=team_edit_form.php?teamid=$team->id>Edit team info</a>
28
 
            <br><span class=note>Change team name, URL, description, type, or country</span>
 
27
        <li><a href=team_edit_form.php?teamid=$team->id>".tra("Edit team info")."</a>
 
28
            <br><span class=note>".tra("Change team name, URL, description, type, or country")."</span>
29
29
        <li>
30
 
            Member list:
31
 
        <a href=team_email_list.php?teamid=$team->id>HTML</a>
32
 
        | <a href=team_email_list.php?teamid=$team->id&plain=1>text</a>
33
 
            <br><span class=note> View member names and email addresses </span>
34
 
        <li>View change history:
35
 
            <a href=team_delta.php?teamid=$team->id>HTML</a>
36
 
            | <a href=team_delta.php?teamid=$team->id&xml=1>XML</a>
37
 
            <br><span class=note>See when members joined or quit this team</span>
 
30
            ".tra("Member list:")."
 
31
        <a href=team_email_list.php?teamid=$team->id>".tra("HTML")."</a>
 
32
        | <a href=team_email_list.php?teamid=$team->id&plain=1>".tra("text")."</a>
 
33
            <br><span class=note>".tra("View member names and email addresses")."</span>
 
34
        <li>".tra("View change history:")."
 
35
            <a href=team_delta.php?teamid=$team->id>".tra("HTML")."</a>
 
36
            | <a href=team_delta.php?teamid=$team->id&xml=1>".tra("XML")."</a>
 
37
            <br><span class=note>".tra("See when members joined or quit this team")."</span>
38
38
    ";
39
39
 
40
40
    // founder-only stuff follows
45
45
            $user2 = BoincUser::lookup_id($team->ping_user);
46
46
            $deadline = date_str(transfer_ok_time($team));
47
47
            echo "<li>
48
 
                <a href=team_change_founder_form.php?teamid=$team->id><font color=red><b>Respond to foundership request</b></font></a>.  If you don't respond by $deadline, $user2->name may assume foundership of this team.
49
 
            ";
 
48
                <a href=team_change_founder_form.php?teamid=$team->id><font color=red><strong>".tra("Respond to foundership request.")."</strong></font></a>  ".tra("If you don't respond by %1, %2 may assume foundership of this team.", $deadline, $user2->name)
 
49
                ;
50
50
        }
51
51
        echo "
52
 
            <li><a href=team_remove_inactive_form.php?teamid=$team->id>Remove members</a>
53
 
                <br><span class=note>Remove inactive or unwanted members from this team</span>
54
 
            <li><a href=team_change_founder_form.php?teamid=$team->id>Change founder</a>
55
 
                <br><span class=note>Transfer foundership to another member</span>
56
 
            <li><a href=team_admins.php?teamid=$team->id>Add/remove Team Admins</a>
57
 
                <br><span class=note>Give selected team members Team Admin privileges</span>
 
52
            <li><a href=team_remove_inactive_form.php?teamid=$team->id>".tra("Remove members")."</a>
 
53
                <br><span class=note>".tra("Remove inactive or unwanted members from this team")."</span>
 
54
            <li><a href=team_change_founder_form.php?teamid=$team->id>".tra("Change founder")."</a>
 
55
                <br><span class=note>".tra("Transfer foundership to another member")."</span>
 
56
            <li><a href=team_admins.php?teamid=$team->id>".tra("Add/remove Team Admins")."</a>
 
57
                <br><span class=note>".tra("Give selected team members Team Admin privileges")."</span>
58
58
 
59
 
            <li><a href=team_manage.php?teamid=$team->id&action=delete&$tokens>Remove team</a>
60
 
                <br><span class=note>Allowed only if team has no members</a>
61
 
            <li><a href=team_forum.php?teamid=$team->id&cmd=manage>Message board</a>
62
 
                <br><span class=note>Create or manage team message board</span>
 
59
            <li><a href=team_manage.php?teamid=$team->id&action=delete&$tokens>".tra("Remove team")."</a>
 
60
                <br><span class=note>".tra("Allowed only if team has no members")."</a>
 
61
            <li><a href=team_forum.php?teamid=$team->id&cmd=manage>".tra("Message board")."</a>
 
62
                <br><span class=note>".tra("Create or manage a team message board")."</span>
63
63
        ";
64
64
    }
65
65
    echo "
66
66
 
67
67
        <p>
68
68
        <li>
69
 
            To have this team created on all BOINC projects
70
 
            (current and future) you can make it into a
71
 
            <a href=http://boinc.berkeley.edu/teams/>BOINC-wide team</a>.
72
 
        <li>
73
 
            Team admins are encouraged to join and participate in the Google
74
 
            <a href=http://groups.google.com/group/boinc-team-founders>boinc-team-founders</a> group.
75
 
        <li>
76
 
            Other resources for BOINC team admins
77
 
            are available from a third-party site,
78
 
            <a href=http://www.boincteams.com>www.boincteams.com</a>.
 
69
            ".tra("To have this team created on all BOINC projects (current and future) you can make it into a %1BOINC-wide team%2.", "<a href=http://boinc.berkeley.edu/teams/>", "</a>")."
 
70
        <li>
 
71
            ".tra("Team admins are encouraged to join and participate in the Google %1boinc-team-founders%2 group.", "<a href=http://groups.google.com/group/boinc-team-founders>", "</a>")."
 
72
        <li>
 
73
            ".tra("Other resources for BOINC team admins are available from a third-party site, %1www.boincteams.com%2.", "<a href=http://www.boincteams.com>", "</a>")."
79
74
    </ul>
80
75
    ";
81
76
 
85
80
$user = get_logged_in_user(true);
86
81
$teamid = get_int('teamid');
87
82
$team = BoincTeam::lookup_id($teamid);
88
 
if (!$team) error_page("no such team");
 
83
if (!$team) error_page(tra("no such team"));
89
84
 
90
85
$action = get_str('action', true);
91
86
if ($action == 'delete') {
92
87
    require_founder_login($user, $team);
93
88
    if (team_count_members($team->id) > 0) {
94
 
        error_page("Can't delete non-empty team");
 
89
        error_page(tra("Can't delete non-empty team"));
95
90
    }
96
91
    check_tokens($user->authenticator);
97
92
    $team->delete();
98
 
    page_head("Team $team->name deleted");
 
93
    page_head(tra("Team %1 deleted", $team->name));
99
94
    page_tail();
100
95
} else {
101
96
    require_admin($user, $team);