Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-wall
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-wall
Commits
a491e94a
Commit
a491e94a
authored
Jul 11, 2016
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Started creating a list of "my-stuff" objects of a given user
parent
913ec905
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
177 additions
and
0 deletions
+177
-0
my-stuff.adp
www/my-stuff.adp
+70
-0
my-stuff.tcl
www/my-stuff.tcl
+107
-0
No files found.
www/my-stuff.adp
0 → 100644
View file @
a491e94a
<if @show_template_p@>
<master>
<property name="title">@page_title@</property>
<property name="context_bar">@context_bar@</property>
<property name="sub_navbar">@sub_navbar_html;noquote@</property>
</if>
<script type="text/javascript">
Thumbs_up_pale = new Image();
Thumbs_up_pale.src = "@thumbs_up_pale_24_gif;noquote@";
Thumbs_up_pressed = new Image();
Thumbs_up_pressed.src = "@thumbs_up_pressed_24_gif;noquote@";
function thumbs_change (name, object) {
window.document.images[name].src = object.src;
}
</script>
<if @show_template_p@>
<table>
<tr valign=top>
<td width="100%">
</if>
<h1>@page_title@</h1>
<p>#intranet-wall.Description_of_activities#</p>
<form method=post action="/intranet-helpdesk/action">
<%= [export_form_vars {return_url} ] %>
<table class="list">
<tr class="list-header">
<th class="list-narrow">#intranet-wall.User#</th>
<th class="list-narrow">#intranet-wall.Object#</th>
<th class="list-narrow">#intranet-wall.Name#</th>
</tr>
<multiple name=my_stuff>
<if @my_stuff.rownum@ odd><tr class="list-odd" valign=top></if>
<else><tr class="list-even" valign=top></else>
<td align=center>
<%= [im_portrait_html $user_id] %>
</td>
<td align=left>
<a href=@container_url@>@container_type_l10n@ @container_name@</a> /<br>
<a href=@object_url@>@object_type_l10n@ @object_name@</a>
</td>
<td class="list-narrow">
@my_stuff.message@
</td>
</tr>
</multiple>
</table>
</form>
<if @show_template_p@>
</td>
</tr>
</table>
</if>
www/my-stuff.tcl
0 → 100644
View file @
a491e94a
# /packages/intranet-wall/www/my-stuff.tcl
#
# Copyright (c
)
2011
]
project-open
[
# All rights reserved
# ---------------------------------------------------------------
# Page Contract
# ---------------------------------------------------------------
ad_page_contract
{
Shows the list of all objects related to the current user.
@author frank.bergmann@ticket-open.com
}
{
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
ad_get_user_id
]
set
page_title
[
lang::message::lookup
""
intranet-wall.Project_Wall
"My Stuff"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
set
user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
set
return_url
[
im_url_with_query
]
# Parameter passing from XoWiki includelet:
# Allow the includelet to disable the "master" on this page.
if
{
!
[
info
exists show_template_p
]}
{
set show_template_p 1
}
# ---------------------------------------------------------------
# Main SQL
# ---------------------------------------------------------------
set
my_stuff_sql
""
# ---------------------------------------------------------------
# Create the my-stuff multirow
# ---------------------------------------------------------------
set
user_id 0
db_multirow -extend
{
container_url
}
my_stuff my_stuff_query
$my
_stuff_sql
{
set container_url
[
util_memoize
[
list
db_string container_url
"
select url
from im_biz_object_urls
where object_type = '
$container
_type' and
url_type = 'view'
"
]]
append container_url
$container
_id
set container_type_l10n
[
lang::message::lookup
""
intranet-core.$container_type
$container
_type
]
set object_url
[
util_memoize
[
list
db_string object_url
"
select url
from im_biz_object_urls
where object_type = '
$object
_type' and
url_type = 'view'
"
]]
append object_url
$object
_id
set object_type_l10n
[
lang::message::lookup
""
intranet-core.$object_type
$object
_type
]
set creator_url
[
export_vars -base
"/intranet/users/view"
{{
user_id
$user
_id
}}]
}
# Define a few GIFs that are used in the ADP
set
comment_gif
[
im_gif comments
]
set
thumbs_up_pale_24
[
im_gif
"thumbs_up.pale.24"
]
set
thumbs_down_pale_24
[
im_gif
"thumbs_down.pale.24"
]
set
thumbs_up_pressed_24
[
im_gif
"thumbs_up.pressed.24"
]
set
thumbs_down_pressed_24
[
im_gif
"thumbs_down.pressed.24"
]
regexp
{
src=
\"
([
a-z0-9A-Z_
\.
/
]
*
)
\"
}
$thumbs
_up_pale_24 match thumbs_up_pale_24_gif
regexp
{
src=
\"
([
a-z0-9A-Z_
\.
/
]
*
)
\"
}
$thumbs
_up_pressed_24 match thumbs_up_pressed_24_gif
# ---------------------------------------------------------------
# Count how many surveys the user has filled out
# ---------------------------------------------------------------
set
survey_count
[
db_string survey_count
"
select count(*)
from survsimp_responses sr,
acs_objects o
where sr.response_id = o.object_id and
o.creation_user = :current_user_id and
survey_id in (438275, 438249, 305439)
"
]
# ---------------------------------------------------------------
# Sub-Navbar
# ---------------------------------------------------------------
set
next_page_url
""
set
previous_page_url
""
set
menu_select_label
"wall"
set
wall_navbar_html
""
# [im_wall_navbar $letter "/intranet-wall/index" $next_page_url $previous_page_url [list start_idx order_by how_many view_name letter
]
$menu
_select_label
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment