added a request tracker system via the CS
This commit is contained in:
parent
d5a33068d1
commit
6b77047cde
9 changed files with 698 additions and 16 deletions
|
|
@ -32,6 +32,7 @@
|
|||
- Increased the performance of CS Thread viewing by 500%.
|
||||
- Changed the CS post rating mechinism to thumbs up/down to be less
|
||||
confusing.
|
||||
- Added CS templates to run a request tracker (trouble ticket) style system.
|
||||
- Updated TinyMCE rich text editor to version 2.0.5.1.
|
||||
- Disabled the rich editor for Safari because it doesn't work correctly.
|
||||
- Added install/uninstall functions to the asset and wobject skeletons to
|
||||
|
|
|
|||
|
|
@ -485,6 +485,24 @@ sub addPrototypes {
|
|||
threadTemplateId=>"PBtmpl0000000000000067",
|
||||
postFormTemplateId=>"PBtmpl0000000000000068"
|
||||
},"pbproto000000000000001");
|
||||
$importNode->addChild({
|
||||
title=>"Request Tracker",
|
||||
menuTitle=>"Request Tracker",
|
||||
url=>"request-tracker-prototype",
|
||||
groupIdView=>'7',
|
||||
groupIdEdit=>'12',
|
||||
className=>'WebGUI::Asset::Wobject::Collaboration',
|
||||
assetId=>"new",
|
||||
allowReplies=>1,
|
||||
attachmentsPerPost=>10,
|
||||
isPrototype=>1,
|
||||
usePreview=>0,
|
||||
archiveAfter=>60*60*24*30,
|
||||
defaultKarmaScale=>100,
|
||||
collaborationTemplateId=>"PBtmpl0000000000000208",
|
||||
threadTemplateId=>"PBtmpl0000000000000209",
|
||||
postFormTemplateId=>"PBtmpl0000000000000210"
|
||||
},"pbproto000000000000001");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
110
docs/upgrades/templates-6.99.0/requesttracker.tmpl
Normal file
110
docs/upgrades/templates-6.99.0/requesttracker.tmpl
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
#PBtmpl0000000000000208
|
||||
#create
|
||||
#namespace:Collaboration
|
||||
#url:request-tracker-template
|
||||
#title:Request Tracker
|
||||
#menuTitle:Request Tracker
|
||||
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
|
||||
|
||||
<tmpl_if session.var.adminOn>
|
||||
<p><tmpl_var controls></p>
|
||||
</tmpl_if>
|
||||
|
||||
<tmpl_if displayTitle>
|
||||
<h2><tmpl_var title></h2>
|
||||
</tmpl_if>
|
||||
|
||||
<tmpl_if description>
|
||||
<tmpl_var description>
|
||||
</tmpl_if>
|
||||
|
||||
<p>
|
||||
<tmpl_if user.canPost>
|
||||
<a href="<tmpl_var add.url>"><tmpl_var add.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_unless user.isVisitor>
|
||||
<tmpl_if user.isSubscribed>
|
||||
<a href="<tmpl_var unsubscribe.url>"><tmpl_var unsubscribe.label></a>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var subscribe.url>"><tmpl_var subscribe.label></a>
|
||||
</tmpl_if>
|
||||
•
|
||||
</tmpl_unless>
|
||||
<a href="<tmpl_var search.url>"><tmpl_var search.label></a>
|
||||
</p>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.title.url>"><tmpl_var subject.label></a></td>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.username.url>"><tmpl_var user.label></a></td>
|
||||
<tmpl_if karmaIsEnabled>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.karmaRank.url>"><tmpl_var karmaRank.label></a></td>
|
||||
</tmpl_if karmaIsEnabled>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.rating.url>"><tmpl_var rating.label></a></td>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.date.url>"><tmpl_var date.label></a></td>
|
||||
<tmpl_if displayLastReply>
|
||||
<td class="forumHead"><a href="<tmpl_var sortby.lastreply.url>"><tmpl_var lastReply.label></a></td>
|
||||
</tmpl_if>
|
||||
</tr>
|
||||
<tmpl_loop post_loop>
|
||||
<tr>
|
||||
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>"><a href="<tmpl_var url>"><tmpl_var title></a></td>
|
||||
<tmpl_if user.isVisitor>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>"><tmpl_var username></td>
|
||||
<tmpl_else>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>"><a href="<tmpl_var userProfile.url>"><tmpl_var username></a></td>
|
||||
</tmpl_if>
|
||||
<tmpl_if karmaIsEnabled>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>" align="center"><tmpl_var karmaRank></td>
|
||||
</tmpl_if>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>" align="center"><tmpl_var rating></td>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>"><tmpl_var dateSubmitted.human> @ <tmpl_var timeSubmitted.human></td>
|
||||
<tmpl_if displayLastReply>
|
||||
<td class="<tmpl_if __ODD__>oddThread<tmpl_else>evenThread</tmpl_if>" style="font-size: 11px;">
|
||||
<a href="<tmpl_var lastReply.url>"><tmpl_var lastReply.title></a>
|
||||
by
|
||||
<tmpl_if lastReply.user.isVisitor>
|
||||
<tmpl_var lastReply.username>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var lastReply.userProfile.url>"><tmpl_var lastReply.username></a>
|
||||
</tmpl_if>
|
||||
on <tmpl_var lastReply.dateSubmitted.human> @ <tmpl_var lastReply.timeSubmitted.human>
|
||||
</td>
|
||||
</tmpl_if>
|
||||
</tr>
|
||||
</tmpl_loop>
|
||||
</table>
|
||||
|
||||
<tmpl_if pagination.pageCount.isMultiple>
|
||||
<div class="pagination">
|
||||
<tmpl_var pagination.previousPage> · <tmpl_var pagination.pageList.upTo10> · <tmpl_var pagination.nextPage>
|
||||
</div>
|
||||
</tmpl_if>
|
||||
|
||||
~~~
|
||||
|
||||
<style type="text/css">
|
||||
.forumHead {
|
||||
background-color: #eeeeee;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
padding: 2px;
|
||||
padding-bottom: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.oddThread {
|
||||
font-size: 13px;
|
||||
border-bottom: 1px dashed #83cc83;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.evenThread {
|
||||
font-size: 13px;
|
||||
border-bottom: 1px dashed #aaaaff;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
343
docs/upgrades/templates-6.99.0/requesttrackerpost.tmpl
Normal file
343
docs/upgrades/templates-6.99.0/requesttrackerpost.tmpl
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
#PBtmpl0000000000000209
|
||||
#create
|
||||
#namespace:Collaboration/Thread
|
||||
#url:request-tracker-post-template
|
||||
#title:Request Tracker Post
|
||||
#menuTitle:Request Tracker Post
|
||||
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
|
||||
|
||||
<tmpl_if session.var.adminOn>
|
||||
<p><tmpl_var controls></p>
|
||||
</tmpl_if>
|
||||
|
||||
<h2><tmpl_var title></h2>
|
||||
|
||||
<div class="defaultSubmissionDetails">
|
||||
<b><tmpl_var user.label>:</b>
|
||||
<tmpl_if user.isVisitor>
|
||||
<tmpl_var username>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
||||
</tmpl_if>
|
||||
<br />
|
||||
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
||||
<b><tmpl_var severity.label>:</b> <tmpl_var userDefined1><br />
|
||||
<b><tmpl_var views.label>:</b> <tmpl_var views><br />
|
||||
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
||||
<tmpl_unless hasRated>
|
||||
<tmpl_var rate.label> [ <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsUp>"><img src="<tmpl_var thumbsUp.icon.url>" alt="+" style="border: 0px;vertical-align:middle;" /></a></p> | <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsDown>"><img src="<tmpl_var thumbsDown.icon.url>" alt="-" style="border: 0px;vertical-align:middle;" /></a></p> ]
|
||||
</tmpl_unless>
|
||||
<br />
|
||||
<tmpl_if user.isModerator>
|
||||
<b><tmpl_var status.label>:</b> <tmpl_if isArchived><tmpl_var closed.label> [ <a href="<tmpl_var unarchive.url>"><tmpl_var open.label></a> <tmpl_else> <tmpl_var open.label> [ <a href="<tmpl_var archive.url>"><tmpl_var close.label></a></tmpl_if> ]<br />
|
||||
<tmpl_else>
|
||||
<tmpl_if user.isPoster>
|
||||
<b><tmpl_var status.label>:</b> <tmpl_if isArchived><tmpl_var closed.label> <tmpl_else> <tmpl_var open.label></tmpl_if><br />
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
<tmpl_if karmaIsEnabled>
|
||||
<b><tmpl_var karmaRank.label>:</b> <tmpl_var karmaRank><br />
|
||||
<b><tmpl_var transferkarma.label>:</b>
|
||||
<tmpl_var transfer.karma.form>
|
||||
</tmpl_if>
|
||||
</div>
|
||||
|
||||
<div class="collaborationThreadContent">
|
||||
<tmpl_var content>
|
||||
</div>
|
||||
|
||||
<tmpl_if attachment_loop>
|
||||
<br />
|
||||
<tmpl_loop attachment_loop>
|
||||
<div style="float: left; padding: 5px;">
|
||||
<a href="<tmpl_var url>"><tmpl_if isImage><img src="<tmpl_var thumbnail>" border="0" alt="<tmpl_var filename>" /><tmpl_else><img src="<tmpl_var icon>" border="0" alt="<tmpl_var filename>" align="middle" /> <tmpl_var filename></tmpl_if></a>
|
||||
</div>
|
||||
</tmpl_loop>
|
||||
<div style="clear: both;"></div>
|
||||
<br />
|
||||
</tmpl_if>
|
||||
|
||||
|
||||
|
||||
<tmpl_unless isLocked>
|
||||
<div class="postControls">
|
||||
<tmpl_if user.canReply>
|
||||
<a href="<tmpl_var reply.url>"><tmpl_var reply.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_if user.canEdit>
|
||||
<a href="<tmpl_var edit.url>"><tmpl_var edit.label></a>
|
||||
•
|
||||
<a href="<tmpl_var delete.url>"><tmpl_var delete.label></a>
|
||||
</tmpl_if>
|
||||
</div>
|
||||
</tmpl_unless>
|
||||
|
||||
|
||||
|
||||
<tmpl_if repliesAllowed>
|
||||
<div style="float: left; width: 70%">
|
||||
<h2><tmpl_var replies.label></h2>
|
||||
</div>
|
||||
<div style="width: 30%; float: left; text-align: right;">
|
||||
<tmpl_if layout.isFlat>
|
||||
<a href="<tmpl_var layout.nested.url>"><tmpl_var layout.nested.label></a>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var layout.flat.url>"><tmpl_var layout.flat.label></a>
|
||||
</tmpl_if>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<tmpl_if layout.isFlat>
|
||||
<!-- begin flat layout -->
|
||||
<tmpl_loop post_loop>
|
||||
<tmpl_unless isThreadRoot>
|
||||
<div class="postBorder<tmpl_if isCurrent>Current</tmpl_if>">
|
||||
<a name="<tmpl_var assetId>"></a>
|
||||
<div class="postSubject">
|
||||
<tmpl_var title>
|
||||
</div>
|
||||
<div class="postData">
|
||||
<div style="float: left; width: 50%">
|
||||
<b><tmpl_var user.label>:</b>
|
||||
<tmpl_if user.isVisitor>
|
||||
<tmpl_var username>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
||||
</tmpl_if>
|
||||
<br />
|
||||
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
||||
</div>
|
||||
<div>
|
||||
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
||||
<tmpl_unless hasRated>
|
||||
<tmpl_var rate.label> [ <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsUp>"><img src="<tmpl_var thumbsUp.icon.url>" alt="+" style="border: 0px;vertical-align:middle;" /></a></p> | <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsDown>"><img src="<tmpl_var thumbsDown.icon.url>" alt="-" style="border: 0px;vertical-align:middle;" /></a></p> ]
|
||||
</tmpl_unless>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="postMessage">
|
||||
<tmpl_var content>
|
||||
<tmpl_loop attachment_loop>
|
||||
<div style="float: left; padding: 5px;"><a href="<tmpl_var url>"><tmpl_if isImage><img src="<tmpl_var thumbnail>" border="0" alt="<tmpl_var filename>" /><tmpl_else><img src="<tmpl_var icon>" border="0" alt="<tmpl_var filename>" align="middle" /> <tmpl_var filename></tmpl_if></a></div>
|
||||
</tmpl_loop>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<tmpl_unless isLocked>
|
||||
<div class="postControls">
|
||||
<tmpl_if user.canReply>
|
||||
<a href="<tmpl_var reply.url>"><tmpl_var reply.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_if user.canEdit>
|
||||
<a href="<tmpl_var edit.url>"><tmpl_var edit.label></a>
|
||||
•
|
||||
<a href="<tmpl_var delete.url>"><tmpl_var delete.label></a>
|
||||
</tmpl_if>
|
||||
</div>
|
||||
</tmpl_unless>
|
||||
</div>
|
||||
</tmpl_unless>
|
||||
</tmpl_loop>
|
||||
<!-- end flat layout -->
|
||||
</tmpl_if>
|
||||
|
||||
<tmpl_if layout.isNested>
|
||||
<!-- begin nested layout -->
|
||||
<tmpl_loop post_loop>
|
||||
<tmpl_unless isThreadRoot>
|
||||
<div style="margin-left: <tmpl_var depthX10>px;">
|
||||
<div class="postBorder<tmpl_if isCurrent>Current</tmpl_if>">
|
||||
<a name="<tmpl_var assetId>"></a>
|
||||
<div class="postSubject">
|
||||
<tmpl_var title>
|
||||
</div>
|
||||
<div class="postData">
|
||||
<div style="float: left; width: 50%">
|
||||
<b><tmpl_var user.label>:</b>
|
||||
<tmpl_if user.isVisitor>
|
||||
<tmpl_var username>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var userProfile.url>"><tmpl_var username></a>
|
||||
</tmpl_if>
|
||||
<br />
|
||||
<b><tmpl_var date.label>:</b> <tmpl_var dateSubmitted.human><br />
|
||||
</div>
|
||||
<div>
|
||||
<b><tmpl_var rating.label>:</b> <tmpl_var rating>
|
||||
<tmpl_unless hasRated>
|
||||
<tmpl_var rate.label> [ <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsUp>"><img src="<tmpl_var thumbsUp.icon.url>" alt="+" style="border: 0px;vertical-align:middle;" /></a></p> | <p style="display:inline;vertical-align:middle;"><a href="<tmpl_var rate.url.thumbsDown>"><img src="<tmpl_var thumbsDown.icon.url>" alt="-" style="border: 0px;vertical-align:middle;" /></a></p> ]
|
||||
</tmpl_unless>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="postMessage">
|
||||
<tmpl_var content>
|
||||
<tmpl_loop attachment_loop>
|
||||
<div style="float: left; padding: 5px;"><a href="<tmpl_var url>"><tmpl_if isImage><img src="<tmpl_var thumbnail>" border="0" alt="<tmpl_var filename>" /><tmpl_else><img src="<tmpl_var icon>" border="0" alt="<tmpl_var filename>" align="middle" /> <tmpl_var filename></tmpl_if></a></div>
|
||||
</tmpl_loop>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<tmpl_unless isLocked>
|
||||
<div class="postControls">
|
||||
<tmpl_if user.canReply>
|
||||
<a href="<tmpl_var reply.url>"><tmpl_var reply.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_if user.canEdit>
|
||||
<a href="<tmpl_var edit.url>"><tmpl_var edit.label></a>
|
||||
•
|
||||
<a href="<tmpl_var delete.url>"><tmpl_var delete.label></a>
|
||||
</tmpl_if>
|
||||
</div>
|
||||
</tmpl_unless>
|
||||
</div>
|
||||
</div>
|
||||
</tmpl_unless>
|
||||
</tmpl_loop>
|
||||
<!-- end nested layout -->
|
||||
</tmpl_if>
|
||||
|
||||
<tmpl_if pagination.pageCount.isMultiple>
|
||||
<div class="pagination" style="margin-top: 20px;">
|
||||
[ <tmpl_var pagination.previousPage> | <tmpl_var pagination.pageList.upTo10> | <tmpl_var pagination.nextPage> ]
|
||||
</div>
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
|
||||
<div class="postControls">
|
||||
<tmpl_if previous.url>
|
||||
<a href="<tmpl_var previous.url>"><tmpl_var previous.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<a href="<tmpl_var collaboration.url>"><tmpl_var back.label></a>
|
||||
|
||||
<tmpl_if next.url>
|
||||
•
|
||||
<a href="<tmpl_var next.url>"><tmpl_var next.label></a>
|
||||
</tmpl_if>
|
||||
<tmpl_if user.canPost>
|
||||
•
|
||||
<a href="<tmpl_var add.url>"><tmpl_var add.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_if user.isModerator>
|
||||
<tmpl_if isSticky>
|
||||
<a href="<tmpl_var unstick.url>"><tmpl_var unstick.label></a>
|
||||
•
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var stick.url>"><tmpl_var stick.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
<tmpl_if isLocked>
|
||||
<a href="<tmpl_var unlock.url>"><tmpl_var unlock.label></a>
|
||||
•
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var lock.url>"><tmpl_var lock.label></a>
|
||||
•
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
<tmpl_unless user.isVisitor>
|
||||
<tmpl_if user.isSubscribed>
|
||||
<a href="<tmpl_var unsubscribe.url>"><tmpl_var unsubscribe.label></a>
|
||||
<tmpl_else>
|
||||
<a href="<tmpl_var subscribe.url>"><tmpl_var subscribe.label></a>
|
||||
</tmpl_if>
|
||||
</tmpl_unless>
|
||||
</div>
|
||||
~~~
|
||||
<style type="text/css">
|
||||
.defaultSubmissionDetails
|
||||
{
|
||||
float: right;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
font-size:9pt;
|
||||
font-family:arial;
|
||||
}
|
||||
|
||||
.defaultSubmissionDetails a
|
||||
{
|
||||
color:#29587E;
|
||||
}
|
||||
|
||||
.postBorder {
|
||||
border: 1px solid #cccccc;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.postBorderCurrent {
|
||||
border: 3px dotted black;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.postSubject {
|
||||
border-bottom: 1px solid #cccccc;
|
||||
font-weight: bold;
|
||||
padding: 3px;
|
||||
font-family:arial;
|
||||
}
|
||||
.postData {
|
||||
border-bottom: 1px solid #cccccc;
|
||||
font-size: 9pt;
|
||||
background-color: #eeeeee;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
font-family:arial;
|
||||
}
|
||||
.postControls {
|
||||
border-top: 1px solid #cccccc;
|
||||
background-color: #eeeeee;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
font-family:arial;
|
||||
}
|
||||
.postMessage {
|
||||
padding: 3px;
|
||||
}
|
||||
.currentThread {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
.threadHead {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
font-size: 9pt;
|
||||
background-color: #eeeeee;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
font-family:arial;
|
||||
}
|
||||
.threadData {
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-family:arial;
|
||||
}
|
||||
|
||||
.postControls
|
||||
{
|
||||
background:#C0C0C0;
|
||||
display:block;
|
||||
text-align:right;
|
||||
padding:3px;
|
||||
font-size:9pt;
|
||||
font-family:arial;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.postControls a
|
||||
{
|
||||
color:white;
|
||||
}
|
||||
|
||||
.collaborationThreadContent
|
||||
{
|
||||
height:100px;
|
||||
font-family:arial;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
#mainText > .collaborationThreadContent
|
||||
{
|
||||
height:auto;
|
||||
min-height:100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
111
docs/upgrades/templates-6.99.0/requesttrackerpostform.tmpl
Normal file
111
docs/upgrades/templates-6.99.0/requesttrackerpostform.tmpl
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
#PBtmpl0000000000000210
|
||||
#create
|
||||
#namespace:Collaboration/PostForm
|
||||
#url:request-tracker-template
|
||||
#title:Request Tracker
|
||||
#menuTitle:Request Tracker
|
||||
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
|
||||
|
||||
<tmpl_if preview.title>
|
||||
<p><b><tmpl_var preview.title></b></p>
|
||||
</tmpl_if>
|
||||
|
||||
<tmpl_if preview.content>
|
||||
<p><tmpl_var preview.content></p>
|
||||
</tmpl_if>
|
||||
|
||||
<h2><tmpl_var message.header.label></h2>
|
||||
|
||||
<tmpl_var form.header>
|
||||
<table class="defaultPostForm">
|
||||
<tmpl_if isNewPost>
|
||||
<tmpl_if user.isVisitor>
|
||||
<tr>
|
||||
<td><tmpl_var visitorName.label></td>
|
||||
<td><tmpl_var visitorName.form></td>
|
||||
</tr>
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
<tr>
|
||||
<td><tmpl_var subject.label></td>
|
||||
<td><tmpl_var title.form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tmpl_var severity.label></td>
|
||||
<td><select id="myCustomField1" name="userDefined1">
|
||||
<option value="<tmpl_var cosmetic.label>"><tmpl_var cosmetic.label></option>
|
||||
<option value="<tmpl_var minor.label>"><tmpl_var minor.label></option>
|
||||
<option value="<tmpl_var critical.label>"><tmpl_var critical.label></option>
|
||||
<option value="<tmpl_var fatal.label>"><tmpl_var fatal.label></option>
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
var value = '<tmpl_var name="userDefined1" escape="JS">';
|
||||
var field = document.getElementById("myCustomField1");
|
||||
for (var i = 0; i < field.options.length; i++) {
|
||||
if (field.options[i].value == value) {
|
||||
field.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tmpl_var description.label></td>
|
||||
<td><tmpl_var content.form></td>
|
||||
</tr>
|
||||
<tmpl_if attachment.form>
|
||||
<tr>
|
||||
<td><tmpl_var attachment.label></td>
|
||||
<td><tmpl_var attachment.form></td>
|
||||
</tr>
|
||||
</tmpl_if>
|
||||
<tmpl_if user.isModerator><tmpl_if karmaIsEnabled><tmpl_if isThread>
|
||||
<tr>
|
||||
<td><tmpl_var karmaScale.label></td>
|
||||
<td><tmpl_var karmaScale.form></td>
|
||||
</tr>
|
||||
</tmpl_if></tmpl_if></tmpl_if>
|
||||
<tmpl_if isNewPost>
|
||||
<tmpl_unless user.isVisitor>
|
||||
<tr>
|
||||
<td><tmpl_var subscribe.label></td>
|
||||
<td><tmpl_var subscribe.form></td>
|
||||
</tr>
|
||||
</tmpl_unless>
|
||||
<tmpl_if isNewThread>
|
||||
<tmpl_if user.isModerator>
|
||||
<tr>
|
||||
<td><tmpl_var lock.label></td>
|
||||
<td><tmpl_var lock.form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tmpl_var stick.label></td>
|
||||
<td><tmpl_var sticky.form></td>
|
||||
</tr>
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
</tmpl_if>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><tmpl_if usePreview><tmpl_var form.preview></tmpl_if><tmpl_var form.submit></td>
|
||||
</tr>
|
||||
</table>
|
||||
<tmpl_var form.footer>
|
||||
|
||||
<tmpl_if isReply>
|
||||
<p><b><tmpl_var reply.title></b></p>
|
||||
<tmpl_var reply.content>
|
||||
</tmpl_if>
|
||||
~~~
|
||||
<style type="text/css">
|
||||
table.defaultPostForm td
|
||||
{
|
||||
font-family:arial;
|
||||
font-size:9pt;
|
||||
}
|
||||
h2
|
||||
{
|
||||
font-family:arial;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -687,7 +687,6 @@ sub postProcess {
|
|||
$size += $storage->getFileSize($file);
|
||||
}
|
||||
$self->setSize($size);
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -946,6 +945,7 @@ sub www_edit {
|
|||
$content .= "\n\n".$self->session->user->profileField("signature") if ($self->session->user->profileField("signature") && !$self->session->form->process("content"));
|
||||
} else { # edit
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$var{isThread} = !$self->isReply;
|
||||
$var{'form.header'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl})
|
||||
.WebGUI::Form::hidden($self->session, {
|
||||
name=>"func",
|
||||
|
|
@ -1030,9 +1030,10 @@ sub www_edit {
|
|||
});
|
||||
$var{'karmaScale.form'} = WebGUI::Form::integer($self->session, {
|
||||
name=>"karmaScale",
|
||||
defaultValue=>$self->getThread->getParent->get("defaultKarmaScale"),
|
||||
value=>$self->getValue("karmaScale"),
|
||||
defaultValue=>1
|
||||
});
|
||||
$var{karmaIsEnabled} = $self->session->setting->get("useKarma");
|
||||
$var{'form.preview'} = WebGUI::Form::submit($self->session, {
|
||||
value=>$i18n->get("preview","Asset_Collaboration")
|
||||
});
|
||||
|
|
|
|||
|
|
@ -118,13 +118,13 @@ sub definition {
|
|||
},
|
||||
karmaRank => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
fieldType=>"float",
|
||||
defaultValue=>0
|
||||
},
|
||||
karmaScale => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"integer",
|
||||
defaultValue=>1
|
||||
defaultValue=>10
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -521,8 +521,9 @@ sub processPropertiesFromFormPost {
|
|||
$self->getParent->incrementThreads($self->get("dateUpdated"),$self->getId) unless ($self->isReply);
|
||||
}
|
||||
if ($self->getParent->canEdit) {
|
||||
my $karmaScale = $self->session->form("karmaScale","integer") || 1;
|
||||
$self->update({karmaScale=>$karmaScale, karmaRank=>$self->get("karma")/$karmaScale});
|
||||
my $karmaScale = $self->session->form->process("karmaScale","integer") || $self->getParent->get("defaultKarmaScale");
|
||||
my $karmaRank = $self->get("karma")/$karmaScale;
|
||||
$self->update({karmaScale=>$karmaScale, karmaRank=>$karmaRank});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -742,7 +743,7 @@ sub view {
|
|||
$self->session->scratch->set("discussionLayout",$self->session->form->process("layout"));
|
||||
my $var = $self->getTemplateVars;
|
||||
$self->getParent->appendTemplateLabels($var);
|
||||
|
||||
$var->{karmaIsEnabled} = $self->session->setting->get("useKarma");
|
||||
$var->{'user.isVisitor'} = ($self->session->user->userId eq '1');
|
||||
$var->{'user.isModerator'} = $self->getParent->canEdit;
|
||||
$var->{'user.canPost'} = $self->getParent->canPost;
|
||||
|
|
@ -947,7 +948,8 @@ sub www_transferKarma {
|
|||
if ($amount <= $self->session->user->karma) {
|
||||
$self->session->user->karma($amount, "Thread ".$self->getId, "Transferring karma to a thread.");
|
||||
my $newKarma = $self->get("karma")+$amount;
|
||||
$self->update({karma=>$newKarma,karmaRank=>$newKarma/$self->get("karmaScale")});
|
||||
my $karmaScale = $self->get("karmaScale") || 1;
|
||||
$self->update({karma=>$newKarma,karmaRank=>$newKarma/$karmaScale});
|
||||
}
|
||||
return $self->www_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,16 @@ sub appendTemplateLabels {
|
|||
my $self = shift;
|
||||
my $var = shift;
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_Collaboration");
|
||||
$var->{"transferkarma.label"} = $i18n->get("transfer karma");
|
||||
$var->{"karmaScale.label"} = $i18n->get("karma scale");
|
||||
$var->{"close.label"} = $i18n->get("close");
|
||||
$var->{"closed.label"} = $i18n->get("closed");
|
||||
$var->{"open.label"} = $i18n->get("open");
|
||||
$var->{"critical.label"} = $i18n->get("critical");
|
||||
$var->{"cosmetic.label"} = $i18n->get("cosmetic");
|
||||
$var->{"minor.label"} = $i18n->get("minor");
|
||||
$var->{"fatal.label"} = $i18n->get("fatal");
|
||||
$var->{"severity.label"} = $i18n->get("severity");
|
||||
$var->{"add.label"} = $i18n->get("add");
|
||||
$var->{"addlink.label"} = $i18n->get("addlink");
|
||||
$var->{"addquestion.label"} = $i18n->get("addquestion");
|
||||
|
|
@ -126,6 +136,7 @@ sub appendTemplateLabels {
|
|||
$var->{"job.title.label"} = $i18n->get("job title");
|
||||
$var->{"job.description.label"} = $i18n->get("job description");
|
||||
$var->{"job.requirements.label"} = $i18n->get("job requirements");
|
||||
$var->{"karmaRank.label"} = $i18n->get("karma rank");
|
||||
$var->{"location.label"} = $i18n->get("location");
|
||||
$var->{"layout.flat.label"} = $i18n->get("flatLayout");
|
||||
$var->{'link.header.label'} = $i18n->get("edit link");
|
||||
|
|
@ -614,14 +625,16 @@ sub getEditForm {
|
|||
);
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"karmaRatingMultiplier",
|
||||
$i18n->get('karma rating multiplier'),
|
||||
-label=>$i18n->get('karma rating multiplier'),
|
||||
-hoverHelp=>$i18n->get('karma rating multiplier description'),
|
||||
-defaultValue=>1,
|
||||
-value=>$self->getValue("karmaRatingMultiplier")
|
||||
);
|
||||
$tabform->getTab("properties")->integer(
|
||||
-name=>"defaultKarmaScale",
|
||||
$i18n->get("default karma scale"),
|
||||
-label=>$i18n->get("default karma scale"),
|
||||
-hoverHelp=>$i18n->get('default karma scale help'),
|
||||
-defaultValue=>10,
|
||||
-value=>$self->getValue("defaultKarmaScale")
|
||||
);
|
||||
} else {
|
||||
|
|
@ -1058,6 +1071,8 @@ sub view {
|
|||
$var{'user.isSubscribed'} = $self->isSubscribed;
|
||||
$var{'sortby.title.url'} = $self->getSortByUrl("title");
|
||||
$var{'sortby.username.url'} = $self->getSortByUrl("username");
|
||||
$var{'karmaIsEnabled'} = $self->session->setting->get("useKarma");
|
||||
$var{'sortby.karmaRank.url'} = $self->getSortByUrl("karmaRank");
|
||||
$var{'sortby.date.url'} = $self->getSortByUrl("dateSubmitted");
|
||||
$var{'sortby.lastreply.url'} = $self->getSortByUrl("lastPostDate");
|
||||
$var{'sortby.views.url'} = $self->getSortByUrl("views");
|
||||
|
|
|
|||
|
|
@ -272,8 +272,53 @@ our $I18N = {
|
|||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'contentType' => {
|
||||
message => q|Content Type|,
|
||||
'open' => {
|
||||
message => q|Open|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'closed' => {
|
||||
message => q|Closed|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'transfer karma' => {
|
||||
message => q|Transfer Karma|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'karma scale' => {
|
||||
message => q|Karma Scale|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'close' => {
|
||||
message => q|Close|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'critical' => {
|
||||
message => q|Critical (mostly not working)|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'cosmetic' => {
|
||||
message => q|Cosmetic (misspelling, formatting problems)|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'minor' => {
|
||||
message => q|Minor (annoying, but not harmful)|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'fatal' => {
|
||||
message => q|Fatal (can't continue until this is resolved)|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
'severity' => {
|
||||
message => q|Severity|,
|
||||
lastUpdated => 1109618544,
|
||||
},
|
||||
|
||||
|
|
@ -675,8 +720,36 @@ our $I18N = {
|
|||
^International("word","Asset_Collaboration"); "^International("compensation","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>contentType.label</b><br>
|
||||
^International("phrase","Asset_Collaboration"); "^International("contentType","Asset_Collaboration");".
|
||||
<b>open.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("open","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>close.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("close","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>closed.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("closed","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>critical.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("critical","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>minor.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("minor","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>cosmetic.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("cosmetic","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>fatal.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("fatal","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>severity.label</b><br>
|
||||
^International("word","Asset_Collaboration"); "^International("severity","Asset_Collaboration");".
|
||||
<p>
|
||||
|
||||
<b>date.label</b><br>
|
||||
|
|
@ -864,7 +937,7 @@ our $I18N = {
|
|||
<p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1145039922
|
||||
lastUpdated => 1146153770
|
||||
},
|
||||
|
||||
'collaboration add/edit title' => {
|
||||
|
|
@ -1228,6 +1301,14 @@ the Collaboration Asset, the user will be notified.
|
|||
<b>unsubscribe.url</b><br>
|
||||
A URL for unsubscribing the current user from this Asset.
|
||||
|
||||
<p>
|
||||
<b>karmaIsEnabled</b><br>
|
||||
A boolean indicating whether the use of karma is enabled or not.
|
||||
|
||||
<p>
|
||||
<b>sortby.karmaRank.url</b><br>
|
||||
A URL for sorting and displaying the list of posts by the amount of karma users have transfered to the thread.
|
||||
|
||||
<p>
|
||||
<b>sortby.title.url</b><br>
|
||||
A URL for sorting and displaying the list of posts by title.
|
||||
|
|
@ -1257,7 +1338,7 @@ A URL for sorting and displaying the list of posts by the number of replies to t
|
|||
A URL for sorting and displaying the list of posts by their ratings.
|
||||
|
||||
|,
|
||||
lastUpdated => 1114466583,
|
||||
lastUpdated => 1146150802,
|
||||
},
|
||||
|
||||
'collaboration search template title' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue