1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
<?xml version="1.0"?>
<!--
-
- $Id$
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project 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; only version 2 of the License, dated June 1991.
-
- This program 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 this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-->
<v:page name="blog-home-page" xmlns:vm="http://www.openlinksw.com/vspx/ods/" xmlns:v="http://www.openlinksw.com/vspx/"
style="index.xsl"
doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<vm:page>
<vm:header>
<vm:title>My Connections</vm:title>
</vm:header>
<vm:pagewrapper>
<vm:variable name="conn_num" type="int" default="0" />
<vm:variable name="sne_id" type="int" default="0" />
<!--vm:navigation on="sn"/>
<vm:navigation1 on="sn"/-->
<vm:navigation-new on="home"/>
<vm:navigation2 on="sn_sent_inv"/>
<vm:rawheader caption="My Connections"/>
<vm:body>
<vm:login redirect="index.vspx"/>
<div id="LT">
<v:local-variable name="lv1">
<v:after-data-bind>
select sne_id into self.sne_id from sn_entity where sne_name = self.u_name;
select count(*) into self.conn_num from sn_invitation where
sni_from = self.sne_id and sni_status = 0;
</v:after-data-bind>
</v:local-variable>
<vm:if test="self.conn_num">
<p>You have <v:label name="lnc1" value="--self.conn_num" format="%d"/> sent invitations pending acceptance.</p>
</vm:if>
<table class="listing">
<v:data-set
name="ds_conn"
sql="select sni_to, sni_status from sn_invitation where sni_from = :uid and sni_status in (0, -1)"
nrows="1000"
cursor-type="dynamic"
scrollable="1"
editable="1">
<v:param name="uid" value="--self.sne_id"/>
<v:template type="repeat" name="ds_conn_rep">
<v:template name="ds_conn_no" type="if-not-exists">
<tr><td colspan="2">No pending invitations</td></tr>
</v:template>
<v:template name="ds_conn_yes" type="if-exists">
<tr class="listing_header_row">
<th>To</th>
<th>Status</th>
<th>Action</th>
</tr>
</v:template>
<v:template type="browse" name="ds_conn_brows">
<tr class="<?V case when mod(control.te_ctr, 2) = 0 then 'listing_row_odd' else 'listing_row_even' end ?>">
<td>
<v:label name="l1"
value="--(control.vc_parent as vspx_row_template).te_rowset[0]" />
</td>
<td>
<v:label name="l2"
value="--case when (control.vc_parent as vspx_row_template).te_rowset[1] = 0 then 'pending' else 'rejected' end" />
</td>
<td>
<v:button name="bt1" action="simple" value="--case when (control.vc_parent as vspx_row_template).te_rowset[1] = 0 then 'Withdraw' else 'Remove' end">
<v:on-post>
<![CDATA[
delete from sn_invitation
where sni_from = self.sne_id and
sni_to = (control.vc_parent as vspx_row_template).te_rowset[0];
self.vc_data_bind (e);
]]>
</v:on-post>
</v:button>
</td>
</tr>
</v:template>
</v:template>
</v:data-set>
<tr>
<td colspan="3">
<span class="fm_ctl_btn">
<v:button name="bt_conf3" value="Back" action="simple">
<v:on-post>
<![CDATA[
self.vc_redirect ('sn_connections.vspx');
]]>
</v:on-post>
</v:button>
</span>
</td>
</tr>
</table>
</div>
<div id="RT">
<ul class="button_bar">
<li>
<img src="images/icons/mail_new.png" alt="Mail icon"/>
<v:url name="u1" value="Send a New Invitation" url="sn_make_inv.vspx"/>
</li>
</ul>
</div> <!-- RT -->
</vm:body>
</vm:pagewrapper>
</vm:page>
</v:page>
|