-
Employee Training template, official release!
Posted on July 2nd, 2009 50 commentsAfter developing this custom template for an internal project, I knew I would have to do some work to be able to recreate and reuse this internally. After a couple weeks of tinkering, deploying and troubleshooting, I have what I believe to be an easily deployable template to manage internal registrations for employee training. After about 10 to 15 minutes of simple configurations, you can have this up and running in your environment.
All that is needed is Sharepoint Designer access and server access if you wish to deploy the STP file as a top level site in a collection. If not, the file can be uploaded to the Site Template Gallery on an existing collection and deployed as a new site.
This should be fully WSS compliant, if you have MOSS you can take advantage of the audience features and security trim things a little cleaner. Link to the original template, link to Dessie’s updates and bug fixes.
I have packaged this into 2 different STP files. Both contain configuration instructions and deployment batch files. One contains HTML emails the other contains more “stock” Sharepoint Designer work flow emails. Choose which ever you’d like.
P.S. – This looks great with the new Event Planning theme that was released by Microsoft. If you go that route, you’ll want to add some style tags to change the page titles to black so they are readable (and the reason why I included Heather Solomon’s clean calendar CSS file, that theme calendar isn’t styled).
Edit:7/15/09
I believe I have tracked down and resolved the problem people were having deploying the template and creating sites and site collections off of it. I have updated the zip file above. For support reasons, I am eliminating the HTML email version of the download. Please refer to this post on how to configure HTML emails. Sorry, it is too difficult to try and maintain 2 different installations and ensure they are all in sync with the bug fixes.
Plurk This Post
Buzz This Post
Delicious
Digg This Post Stumble This Post -
Modifying Employee Training template
Posted on April 8th, 2009 2 commentsIn my last blog post, I mentioned I was starting to dislike the fab 40 templates. This post describes how we (myself and my colleague Tony Miller) fixed an inherent issue with one of these templates. This post goes into steps done after following these three blog posts:
- Employee Training and Scheduling Template – a couple fixes Part 1
- Employee Training and Scheduling Template – a couple fixes Part 2
- Employee Training and Scheduling Template – a couple fixes Part 3
Here is some background on the template if you aren’t familiar. The site is designed so that an instructor can add courses they wish to teach to a list. Users come into the site and see the courses available and click a link to go to the Dispform to register. However there is a glaring security issue here. The navigational bar is present for users to delete a course! If a permission level is created to stop them from deleting items, then they can’t unregister for a course. This bar also contains a function to export the item to Outlook.
So what do we do to fix it? I hope that’s why you’re reading.
The first thing I did was to create a calculated column in the course list that creates an iCal hyperlink. I created the function as =CONCATENATE(”https://MyDomain/sites/cferegistration/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=%7B242652E5%2D0492%2D4C2F%2D8B37%2D06C9A59B0020%7D&CacheControl=1&ID=”,ID,”&Using=event.ics”). Easy enough. I then used a little of Paul Grenier’s jQuery magic to clean that up. Functionality restored for the users. Now to get it on the Dispform.
Here I opened Sharepoint Designer and opened the Dispform associated with the Courses list. I added @iCal, iCal to the XSL data fields at the top of the transform. Then I added
<tr style="display: none"> <td width="190px" valign="top" class="ms-formlabel"> <H3 class="ms-standardheader"> <nobr>Export to Outlook</nobr> </H3> </td> <td width="400px" valign="top" class="ms-formbody"> <xsl:value-of select="@iCal/> </td> </tr>
an thought I’d be golden. well, I was wrong. It created a nightmare of a URL and needed a way to make a nice hyperlink so users could just click it and save the item. After about an hour of trying all sorts of things, Tony realized that Sharepoint was using XSL version 1.0. With this in hand we were able to utilize a replacement function to clean out the amp; values and create a nice hyperlink.
We added
<xsl:template name="replace-substring"> <xsl:param name="original"/> <xsl:param name="substring"/> <xsl:param name="replacement" select="''"/> <xsl:variable name="first"> <xsl:choose> <xsl:when test="contains($original, $substring)"> <xsl:value-of select="substring-before($original, $substring)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$original"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="middle"> <xsl:choose> <xsl:when test="contains($original, $substring)"> <xsl:value-of select="$replacement"/> </xsl:when> <xsl:otherwise> <xsl:text></xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="last"> <xsl:choose> <xsl:when test="contains($original, $substring)"> <xsl:choose> <xsl:when test="contains(substring-after($original, $substring), $substring)"> <xsl:call-template name="replace-substring"> <xsl:with-param name="original"> <xsl:value-of select="substring-after($original, $substring)"/> </xsl:with-param> <xsl:with-param name="substring"> <xsl:value-of select="$substring"/> </xsl:with-param> <xsl:with-param name="replacement"> <xsl:value-of select="$replacement"/> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring-after($original, $substring)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:text></xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="concat($first, $middle, $last)"/> </xsl:template>to the top of the transform after the following code.
<xsl:variable name="dvt_1_automode">0</xsl:variable>
Then we changed the values being displayed by altering the output code to:
<tr> <td width="190px" valign="top" class="ms-formlabel"> <H3 class="ms-standardheader"> <nobr>Export to iCal</nobr> </H3> </td> <td width="400px" valign="top" class="ms-formbody"> <xsl:variable name="iCalLink"> <xsl:call-template name="replace-substring"> <xsl:with-param name="original" select="@iCal"/> <xsl:with-param name="substring" select="string('amp;')"/> <xsl:with-param name="replacement" select="string('')"/> </xsl:call-template> </xsl:variable> <a href="{$iCalLink}">Export to iCal</a> </td> </tr>Now we had a working hyperlink in our item details.
Whew, almost done! Last cleanup item is to remove the toolbar so users cannot delete items. We cranked up Firefox and Firebug and found the toolbar easily enough. A few console trial and errors and we had removed it. Instead of putting it into a CEWP like I normally would, I just added it to the page head on the dispform. That code is:
<script type="text/javascript"> $(function() { $('table[@id$=toolBarTbl].ms-toolbar').remove(); }); </script>
Save, refresh and viola! the dispform now looks like the below image. This might not have been the easiest method to do this, and I’d be happy to hear other ways of doing it.
Plurk This Post
Buzz This Post
Delicious
Digg This Post Stumble This Post -
Fab 40 templates and why I’m starting to dislike them
Posted on April 7th, 2009 No commentsSo in theory the Fab 40 pack of Sharepoint templates seem pretty nice. They provide predefined templates to help resolve business processes. Great, well not so much. I thought these would be great for our environment to help end users solve some basic needs. Before I rant, I just want to say that I appreciate the efforts of those that made these templates and thank them for making them available for free to WSS and MOSS users.
One of the first templates to get deployed was the Employee Training template to help resolve a complex registration system for faculty seminars. After some major rework, this will be great. The template deploys with a few bugs as detailed by Paul Galvin and several other outlets. These are fixes on top of other customizations that need to be done.
The next template to be deployed was the case management template. It’s ok, no bugs, just a lot customizations and some bad design choices. Case in point, the Department for a new case. This should have been defined as a look up column instead of a single line of text. This structure allows users to specify different iterations of the same department on how they choose to enter the data. Enforcing uniform data by using a choice column type or preferably a look up list would allow for uniform data input.
The time spend going through and redesigning the structure, template calls and customizations is not worth the effort I am seeing. The best approach is to use these templates as a baseline for end users. If a user likes the Lending Library template, open it up analyze what it does and build a new site collection from scratch employing good design practices. In the long run, it’ll take less time getting the site up from scratch instead of reworking someone else’s vision of how your business practice will work.
What I’d like to see out of this is the templates brought down, redesigned/fixed and redeployed so that that are more usable out of the box.
Plurk This Post
Buzz This Post
Delicious
Digg This Post Stumble This Post



