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
3420ba36
Commit
3420ba36
authored
May 27, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial Import
parents
Pipeline
#1006
failed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
589 additions
and
0 deletions
+589
-0
intranet-wall.info
intranet-wall.info
+29
-0
intranet-wall-create.sql
sql/postgresql/intranet-wall-create.sql
+205
-0
index.adp
www/index.adp
+186
-0
index.tcl
www/index.tcl
+169
-0
No files found.
intranet-wall.info
0 → 100644
View file @
3420ba36
<?xml version="1.0"?>
<!-- Generated by the OpenACS Package Manager -->
<package
key=
"intranet-wall"
url=
"http://openacs.org/repository/apm/packages/intranet-wall"
type=
"apm_application"
>
<package-name>
]project-open[ Wall
</package-name>
<pretty-plural>
]project-open[ Wall
</pretty-plural>
<initial-install-p>
f
</initial-install-p>
<singleton-p>
t
</singleton-p>
<implements-subsite-p>
f
</implements-subsite-p>
<inherit-templates-p>
f
</inherit-templates-p>
<auto-mount>
intranet-wall
</auto-mount>
<version
name=
"0.1d"
url=
"http://openacs.org/repository/download/apm/intranet-wall-0.1d.apm"
>
<owner
url=
"mailto:frank.bergmann@project-open.com"
>
Frank Bergmann
</owner>
<summary>
Project Wall - News that really interest you
</summary>
<vendor
url=
"http://www.project-open.com/"
>
]project-open[
</vendor>
<description
format=
"text/plain"
>
Provides a dashboard to show personalized news for the current user. News are extracted using plug-in data-sources.
</description>
<maturity>
0
</maturity>
<provides
url=
"intranet-wall"
version=
"0.1d"
/>
<callbacks>
</callbacks>
<parameters>
<!-- No version parameters -->
</parameters>
</version>
</package>
sql/postgresql/intranet-wall-create.sql
0 → 100755
View file @
3420ba36
-- /packages/intranet-wall/sql/postgresql/intranet-wall-create.sql
--
-- Copyright (c) 2003-2012 ]project-open[
--
-- All rights reserved. Please check
-- http://www.project-open.com/license/ for details.
--
-- @author frank.bergmann@project-open.com
---------------------------------------------------------
-- Wall Menu
--
-- This is a sub-menu im the "Reporting" section
create
or
replace
function
inline_0
()
returns
integer
as
$
body
$
declare
-- Menu IDs
v_menu
integer
;
v_main_menu
integer
;
-- Groups
v_employees
integer
;
v_accounting
integer
;
v_senman
integer
;
v_customers
integer
;
v_freelancers
integer
;
v_proman
integer
;
v_admins
integer
;
v_reg_users
integer
;
BEGIN
select
group_id
into
v_admins
from
groups
where
group_name
=
'P/O Admins'
;
select
group_id
into
v_senman
from
groups
where
group_name
=
'Senior Managers'
;
select
group_id
into
v_proman
from
groups
where
group_name
=
'Project Managers'
;
select
group_id
into
v_accounting
from
groups
where
group_name
=
'Accounting'
;
select
group_id
into
v_employees
from
groups
where
group_name
=
'Employees'
;
select
group_id
into
v_customers
from
groups
where
group_name
=
'Customers'
;
select
group_id
into
v_freelancers
from
groups
where
group_name
=
'Freelancers'
;
select
group_id
into
v_reg_users
from
groups
where
group_name
=
'Registered Users'
;
select
menu_id
into
v_main_menu
from
im_menus
where
label
=
'reporting'
;
v_menu
:
=
im_menu__new
(
null
,
-- p_menu_id
'im_menu'
,
-- object_type
now
(),
-- creation_date
null
,
-- creation_user
null
,
-- creation_ip
null
,
-- context_id
'intranet-wall'
,
-- package_name
'reporting-wall'
,
-- label
'Project-Wall (System)'
,
-- name
'/intranet-wall/'
,
-- url
200
,
-- sort_order
v_main_menu
,
-- parent_menu_id
null
-- p_visible_tcl
);
PERFORM
acs_permission__grant_permission
(
v_menu
,
v_admins
,
'read'
);
return
0
;
end
;
$
body
$
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
----------------------------------------------------------------------
-- New Objects Report
----------------------------------------------------------------------
SELECT
im_report_new
(
'Project-Wall New Project Task'
,
-- report_name
'wall_new_project_task'
,
-- report_code
'intranet-wall'
,
-- package_key
1000
,
-- report_sort_order
(
select
menu_id
from
im_menus
where
label
=
'reporting-wall'
),
-- parent_menu_id
'
select
''
wall_new_project_task
''
as type,
acs_lang_lookup_message(:user_id,
''
intranet-wall
''
,
''
New Task
''
) as title,
''
blue
''
as color,
''
new
''
as icon,
o.creation_date as date,
coalesce(p.description, p.note, p.project_name) as message,
main_p.project_id as container_object_id,
''
im_project
''
as container_object_type,
main_p.project_name as container_object_name,
t.task_id as specific_object_id,
o.object_type as specific_object_type,
p.project_name as specific_object_name,
im_name_from_user_id(o.creation_user) as user_name,
o.creation_user as user_id
from acs_objects o,
im_projects p,
im_timesheet_tasks t,
im_projects main_p
where
o.object_id = p.project_id and
o.object_id = t.task_id and
tree_root_key(p.tree_sortkey) = main_p.tree_sortkey and
o.creation_date >=
''
%wall_date%
''
order by
o.object_type, o.object_id
'
);
update
im_reports
set
report_description
=
'Lists all objects created since %wall_date%.'
where
report_code
=
'wall_new_project_task'
;
SELECT
acs_permission__grant_permission
(
(
select
menu_id
from
im_menus
where
label
=
'wall_new_project_task'
),
(
select
group_id
from
groups
where
group_name
=
'Employees'
),
'read'
);
SELECT
im_report_new
(
'Project-Wall New Objects'
,
-- report_name
'wall_new_objects'
,
-- report_code
'intranet-wall'
,
-- package_key
1000
,
-- report_sort_order
(
select
menu_id
from
im_menus
where
label
=
'reporting-wall'
),
-- parent_menu_id
'
select
''
new_object
''
as type,
acs_lang_lookup_message(:user_id,
''
intranet-wall
''
,
''
New
''
) ||
''
''
||
acs_lang_lookup_message(:user_id,
''
intranet-wall
''
, o.object_type) ||
''
''
||
acs_object__name(o.object_id) as title,
''
blue
''
as color,
''
new
''
as icon,
o.creation_date as date,
''''
as message,
o.object_id as container_object_id,
o.object_type as container_object_type,
acs_object__name(o.object_id) as container_object_name,
null as specific_object_id,
null as specific_object_type,
null as specific_object_name,
im_name_from_user_id(o.creation_user) as user_name,
o.creation_user as user_id
from acs_objects o
where o.creation_date >=
''
%wall_date%
''
and
o.object_type in (
''
im_company
''
,
''
user
''
,
''
::xowiki::Page
''
)
order by
o.object_type, o.object_id
'
);
update
im_reports
set
report_description
=
'Lists all objects created since %wall_date%.'
where
report_code
=
'wall_new_objects'
;
SELECT
acs_permission__grant_permission
(
(
select
menu_id
from
im_menus
where
label
=
'wall_new_objects'
),
(
select
group_id
from
groups
where
group_name
=
'Employees'
),
'read'
);
/*
o.object_type not in (
''acs_activity'',
''acs_object'',
''acs_reference_repository'',
''acs_sc_contract'',
''acs_sc_implementation'',
''acs_sc_operation'',
''acs_sc_msg_type'',
''apm_package'',
''apm_package_version'',
''apm_parameter'',
''apm_parameter_value'',
''cal_item'',
''cr_item_child_rel'',
''im_biz_object_member'',
''im_component_plugin'',
''im_dynfield_attribute'',
''im_dynfield_widget'',
''im_indicator'',
''im_menu'',
''im_report'',
''notification_type'',
''site_node'',
''zzz''
)
*/
www/index.adp
0 → 100644
View file @
3420ba36
<if @show_template_p@>
<master>
<property name="title">@page_title@</property>
<property name="context_bar">@context_bar@</property>
<property name="sub_navbar">@wall_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="60%">
</if>
<h1>@page_title@</h1>
<p>#intranet-wall-management.Description_of_activities#</p>
<form method=post action="/intranet-helpdesk/action">
<%= [export_form_vars {return_url} ] %>
<table class="list">
<tr class="list-header">
<if @user_is_admin_p@>
<th class="list-narrow" align=center>
<input type=checkbox name="_dummy" onclick="acs_ListCheckAll('wall_list', this.checked)" title="Check/uncheck all rows">
</th>
</if>
<th class="list-narrow">#intranet-wall-management.Votes#</th>
<th class="list-narrow">#intranet-wall-management.Name#</th>
</tr>
<multiple name=wall>
<if @wall.rownum@ odd><tr class="list-odd" valign=top></if>
<else><tr class="list-even" valign=top></else>
<if @user_is_admin_p@>
<td class="list-narrow">
<input type=checkbox name=tid value=@wall.wall_id@ id='ticket,@wall.wall_id@'>
</td>
</if>
<td align=center>
<div style="width: 50px; height: 35px; border: solid 1px #ccc; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; text-align: center">
<div style="color: #333; margin-bottom: -0.1em; letter-spacing: -1px; font-weight: bold; font-size: 200%">
<if "" ne @wall.thumbs_up_count@>
@wall.thumbs_up_count@
</div>
<if 1 eq @wall.thumbs_up_count@>#intranet-wall-management.Thumb#</if>
<else>#intranet-wall-management.Thumbs#</else>
</div>
</if>
<if "up" eq @wall.thumbs_direction@>
<a href="@wall.thumbs_undo_url;noquote@" onmouseover="thumbs_change('thumbs_@wall.rownum@', Thumbs_up_pale)" onmouseout="thumbs_change('thumbs_@wall.rownum@', Thumbs_up_pressed)">
<img src="@thumbs_up_pressed_24_gif;noquote@" name="thumbs_@wall.rownum@" title="#intranet-wall-management.Press_here_to_redraw_your_vote_for_this_wall#" border='0' style='margin-top:3px'></a><br>
</if>
<else>
<a href="@wall.thumbs_up_url;noquote@" onmouseover="thumbs_change('thumbs_@wall.rownum@', Thumbs_up_pressed)" onmouseout="thumbs_change('thumbs_@wall.rownum@', Thumbs_up_pale)">
<img src="@thumbs_up_pale_24_gif;noquote@" name="thumbs_@wall.rownum@" title="#intranet-wall-management.Press_here_to_vote_for_this_wall#" border='0' style='margin-top:3px'></a><br>
</else>
</td>
<td class="list-narrow">
<a href="@wall.wall_url;noquote@">@wall.project_name@</a>
<br>
@wall.wall_description;noquote@
<br>
#intranet-wall-management.From#: <a href="@wall.creator_url;noquote@">@wall.creator_name@</a>
|
<a href="@wall.wall_url;noquote@">
@wall.comment_count@
<if @wall.comment_count@ eq 1>#intranet-wall-management.Comment#</if>
<else>#intranet-wall-management.Comments#</else></a>
|
<if @wall.comment_count@>
</if>
#intranet-wall-management.Status#: @wall.ticket_status@
|
#intranet-wall-management.Type#: @wall.ticket_type@
|
<a href="@wall.comments_url;noquote@"
><%= [im_gif comments [lang::message::lookup "" intranet-wall-management.Comment_on_wall "Comment on wall"]]
%></a>
|
<a href="@wall.dollar_url;noquote@"
><%= [im_gif money_dollar [lang::message::lookup "" intranet-wall-management.Share_development_costs "Share development costs"]]
%></a>
</td>
</tr>
</multiple>
<if @ticket_bulk_actions_p@>
<tfoot>
<tr valign=top>
<td align=left colspan=3 valign=top>
<%= [im_category_select \
-translate_p 1 \
-package_key "intranet-helpdesk" \
-plain_p 1 \
-include_empty_p 1 \
-include_empty_name "" \
"Intranet Ticket Action" \
action_id \
]
%>
<input type=submit value='#intranet-helpdesk.Update_Tickets#'>
</td>
</tr>
</tfoot>
</if>
</table>
</form>
<if @show_template_p@>
</td>
<td align=left width="40%">
</if>
<if @survey_count@></if>
<else>
<h1>#intranet-wall-management.Increase_the_Weight_of_your_Votes#</h1>
#intranet-wall-management.You_havent_yet_filled_our_one_of_the_following_surveys#.<br>
#intranet-wall-management.Filling_out_the_survey_will_increase_the_weight_of_your_votes#:<br>
<ul>
<li>Are you a potential ]po[ user?<br>
Then please take the <a href="/simple-survey/one?return_url=&survey_id=438275">Potential User Feedback</a>
<br>
<li>Are you a productive ]po[ user?<br>
Then please take the <a href="/simple-survey/one?return_url=&survey_id=438249">Productive User Feedback</a>
<br>
<li>Are you a ]po[ partner? <br>
Then please take the <a href="/simple-survey/one?return_url=&survey_id=305439">Partner Survey</a>.
<br>
</ul>
</else>
<h1>Create a new Wall</h1>
<p>
#intranet-wall-management.Please_check_for_duplicate_wall#
</p>
<form action="/intranet-wall-management/wall-new" method=POST>
<%= [export_form_vars return_url] %>
<table width="100%">
<tr class=rowodd>
<td>#intranet-wall-management.Title#:</td>
<td><input type=text size=40 name=wall_title value="#intranet-wall-management.Catchy_phrase_for_your_wall#"></td>
</tr>
<tr class=roweven>
<td>#intranet-wall-management.Description#:</td>
<td><textarea name=wall_description cols=30 rows=3>#intranet-wall-management.One_or_two_paragraphs_to_describe_your_wall#</textarea></td>
</tr>
<tr class=rowodd>
<td>#intranet-wall-management.Submit#:</td>
<td><input type=submit></td>
</tr>
</table>
</form>
<if @show_template_p@>
</td>
</tr>
</table>
</if>
www/index.tcl
0 → 100644
View file @
3420ba36
# /packages/intranet-wall/www/index.tcl
#
# Copyright (c
)
2011
]
project-open
[
# All rights reserved
# ---------------------------------------------------------------
# Page Contract
# ---------------------------------------------------------------
ad_page_contract
{
@author frank.bergmann@ticket-open.com
}
{
{
wall_date
""
}
{
order_by
"Points"
}
{
mine_p
"all"
}
{
ticket_status_id:integer
"
[
im_ticket_status_open
]
"
}
{
letter:trim
""
}
{
start_idx:integer 0
}
{
how_many
""
}
{
view_name
"wall_management_list"
}
{
wall_search
""
}
{
perspective
""
}
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
ad_get_user_id
]
set
page_title
[
lang::message::lookup
""
intranet-wall.Project_Wall
"Project Wall"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
set
letter
[
string
toupper
$letter
]
set
max_description_len 200
set
user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
set
return_url
[
im_url_with_query
]
if
{
""
==
$wall
_date
}
{
set wall_date
[
db_string wall_date
"select now()::date - 30 from dual"
]
}
set
view_walls_all_p 1
set
edit_walls_all_p 1
# 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
}
set
ticket_bulk_actions_p
$user
_is_admin_p
# ---------------------------------------------------------------
# Perspectives
# ---------------------------------------------------------------
set
order_by_clause
"thumbs_up_count DESC"
switch
$perspective
{
Top
{
set order_by_clause
"thumbs_up_count DESC"
}
Hot
{
set order_by_clause
"thumbs_up_count_in_last_month, thumbs_up_count DESC"
}
New
{
set order_by_clause
"creation_date DESC"
}
Accepted
{
set ticket_status_id
[
im_ticket_status_assigned
]
}
Done
{
set ticket_status_id
[
im_ticket_status_closed
]
}
default
{
# Nothing, show
"Top"
order
}
}
# ---------------------------------------------------------------
# Main SQL
# ---------------------------------------------------------------
set
wall_sql
[
db_string wall
"select report_sql from im_reports where report_code = 'wall_new_project_task'"
]
set
substitution_list
[
list
\
user_id
$current
_user_id
\
wall_date
$wall
_date
\
]
set
form_vars
[
ns_conn form
]
foreach
form_var
[
ad_ns_set_keys
$form
_vars
]
{
set form_val
[
ns_set get
$form
_vars
$form
_var
]
lappend substitution_list
$form
_var
lappend substitution_list
$form
_val
}
set
wall_sql
[
lang::message::format
$wall
_sql
$substitution
_list
]
# ---------------------------------------------------------------
# Create the main walls multirow
# ---------------------------------------------------------------
set
user_id 0
set
wall_id 0
set
forum_topic_id 0
set
ticket_description
""
db_multirow -extend
{
ticket_status ticket_type thumbs_up_count thumbs_direction wall_description comment_count wall_url project_name wall_id type thumbs_down_url thumbs_up_url thumbs_undo_url dollar_url comments_url creator_url creator_name
}
wall wall_query
$wall
_sql
{
set wall_id
$container
_object_id
set type
"wall_project_tasks"
set thumbs_up_count 0
set comment_count 0
set thumbs_direction
"up"
set project_name
$container
_object_name
set wall_description
"adsf"
set ticket_status
"status"
set ticket_type
"type"
set wall_url
[
export_vars -base
"/intranet-wall/redirect-to-ticket"
{{
ticket_id
$wall
_id
}
return_url
}]
set dollar_url
[
export_vars -base
"/intranet-wall/dollar-action"
{
return_url ticket_id
}]
set comments_url
[
export_vars -base
"/intranet-forum/new"
{
return_url
{
parent_id
$forum
_topic_id
}}]
set wall_description
[
ns_quotehtml
[
string
range
$ticket
_description 0
$max
_description_len
]]
if
{[
string
length
$wall
_description
]
>=
$max
_description_len
}
{
append wall_description
"... (<a href='
$wall
_url'>more</a>)"
}
set creator_name
$user
_name
if
{[
regexp
{
^
([
a-z0-9A-Z
\-
_
]
*
)
@
}
$creator
_name match username_body
]}
{
set creator_name
$username
_body
}
set creator_url
[
export_vars -base
"/intranet/users/view"
{{
user_id
$user
_id
}}]
set thumbs_up_url
[
export_vars -base
"/intranet-wall/thumbs-action"
{
return_url
{
ticket_id
$wall
_id
}
{
direction up
}}]
set thumbs_down_url
[
export_vars -base
"/intranet-wall/thumbs-action"
{
return_url
{
ticket_id
$wall
_id
}
{
direction down
}}]
set thumbs_undo_url
[
export_vars -base
"/intranet-wall/thumbs-action"
{
return_url
{
ticket_id
$wall
_id
}
{
direction undo
}}]
}
# 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