Change view of SharePoint Calendar for multi-day events - sharepoint

I have SharePoint calendar control with multi day events:
Calendar http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG
http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG
Here, the calendar shows "A multi day event". Actually it's an event that starts on the 4th and ends on the 7th.
Requirement: I need to hide the "A multi day event" bar and have it show only on the 4th with the end date.

for hiding something like that you might want to look at a more lightweight solution like jquery or CSS. unfortunately I can't see the rendered html code at the moment but if ou are familiar jquery or css id imagine it wouldnt be that difficult.

As far as I know, it is not possible without customizing the sharepoint template (list definition) for the Calendar list.

Please refer to the out of the box list definition feature:
(12\TEMPLATE\FEATURES\EventLists)
Do not modify the files in this directory... if you wish to create your own feature, then simply copy/paste the contents to a new directory in FEATURES (and change the feature GUID), or add the contents to your Visual Studio project (depends on how you want to deploy).
You will need to modify the schema.xml file in the \Events directory. You can refer to this link to help you with that:
http://msdn.microsoft.com/en-us/library/ms459356.aspx

Related

Suggestions for a custom web part in SharePoint 2010

I have a list created for the purpose of displaying news. So, the columns are: Title, Content and Created. For example, I'd like the list to let people know when there is a server outage planned.
What I want for the functionality of the web part is to display the title only and only the month/day the news item created in the list. I'd like a picture of a small arrow in the front of the items also (left side).
Example:
"
News Web Part
=> Server outage planned for this Saturday (06/23)
=> Server updates today (06/22)
"
I would like the user to be able to click on the titles of these items and it will go to a page that gives more information (Content column, rich text), instead of pop that AJAX window like what happens by default when you click on a list item.
Does this require Visual Studio? If not, is something like this possible?
Thank you!
I would recommend making a list to store the information that you want to provide to the end user via the SharePoint UI. Once you have your list create a view, Order it by most recently created and limit the number of items displayed to as many as you wish to display to the user.
Add a list web part(XSLTListViewWebPart) and point that at a view you have created.
This will give you something pretty basic visually.
You will then need to look in to XSLT to apply a style to that web part. There are loads of articles on google of how to do this.
You do not need to do this in visual studio, I sometimes just use notepad ++ for small things like this. The above should be enough for you to get started.
Cheers
Truez

Adding a WebPart to a SharePoint 2013 Master Page

Have looked on here plenty but this is the first time I've asked a question, so please bear with me.
Within my SharePoint site collection, I have a list of links to other systems within the business - this list is hidden to all users apart from Admins. There is a department column, indicating the department each link belongs to. There are two filter columns in this list - one is "active", the other is "show in System Links".
On each departmental page, there is a Content by Query Web Part (CQWP) showing the list, filtering to show:
- Specific departmental links
- Only where active
Separately to this, there is another CQWP on the homepage of the site collection showing all those links that have "show in System Links" ticked.
What this allows me to do is if for some reason a system is offline for maintenance, I can change the "active" value in the list and all links will vanish (preventing users going to the external system). It also allows me to add prominence to a link on the homepage if it's of particular focus that day / week / month (i.e. link to HR system to book leave if there's a leave deadline coming up).
What I want to do is move the homepage System Links CQWP to under the Quick Links on the left hand side, so they appear on every page. I did this with no problems in 2010, by literally dragging and dropping in the visual view for the master page, but seem to be struggling in 2013.
I've tried following the advice here:
http://ramisharepointblog.blogspot.co.uk/2013/01/how-to-add-custom-webpart-within.html
When I add these to the .html master file, I get an error message saying that I need to change the file extension of my HTML file to something else.
I get this message whether I copy and paste the code, or whether I use the button "insert web part". (Obviously doing this in SPD 2013)
When I do this, it seems to lose the reference to the .master file (or explode!)
As an alternative, I tried adding the code into the .master file, but of course I can't do this, as it won't let me move / edit / copy a .master file.
Any help in this would be MUCH appreciated, as I seem to be banging my head against a wall here.
On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010.
Please use the Design Manager -> Snippet Gallery.
In short:
You must wrap the Register tag with: <!--SPM: register tag -->
Like this:
<!--SPM:<%#Register Tagprefix="Publishing" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
You should wrap the opening tag of your Web Part with: <!--MS: tag -->
And the closing tag with: <!--ME: tag -->
The Web Part would look like this:
<!--MS:<asp:SiteMapDataSource ShowStartingNode="True" SiteMapProvider="SPNavigationProvider" ID="topSiteMap" runat="server" StartingNodeUrl="sid:1002">-->
…
<!--ME:</asp:SiteMapDataSource>-->
(Snippet Gallery will automatically create the tags in the right way and you can copy it to your master page.)
Possibly related to my question, have a look at the detailed answer given here: How to embed SharePoint 2013 webparts directly in aspx layout page as default webparts for that layout
I know this is an old question, but users get encouraged to search, and this is what came up, so I thought I'd help out fellow other users find an answer :P

One of X number of colums must contain data

HI all,
I am creating a timesheep app and I have five colums that can contain hours worked. When the user enters a new form how do I check to see if at least one of the columns contains data. I must admit I am not a developer just a Sharepoint/Sharepoint designer hack so be nice. Thanks
Glenn Thibeault
The only bullet-proof way would be to create a SharePoint event receiver using C# (lots of examples on the web).
I'm not really sure how you could accomplish this with SPD.
If you don't want to write any C# code, that really only leaves JavaScript. It will still take development work (this is a programming site after all). You could probably take advantage of SPUtility.js (full disclosure, this is a library I maintain).
The basic steps would be:
Edit your NewForm.aspx and add a Content Editor web part
Inside the Content Editor web part, write your JavaScript:
Attach a new onClick handler to the NewForm.aspx's "OK" buttons
Use SPUtility's GetValue method to get the value of your 5 fields, validate one has a value, and display a message if invalid

How to hide, disable calendar list item fields in Sharepoint

I want to hide or make some fields read only on editform.aspx. I follwed the example on this page, but without deliting the "original" webpart list. I hide the original webpart and created a new custom list from the original list. Then i was able to apply xsl on the custom list to hide or to make the field "read only". Unfortunately the recurring events stopped working or where totaly messed up. Some times i've got error messages when I clicked on specific event in calendar view. The calendar list works fine and the fields are hidden or disabled in "Edit mode" when the event is not recurring. My question is. Is there any other way to hide or disable the items for specific security group or sharepoint group on calendar list?
If SharePoint Designer is an option, then this blog post from Laura Rogers shows how you can display SharePoint fields by permission level. It should work with a calendar list.
This will give you complete control over the solution without the need for a third-party product.
Two tools I've run across to do what you're looking for:
SPListDisplaySetting - "SharePoint feature (for WSS 3.0 and MOSS) providing advanced settings to customize list form rendering in new, display and edit mode."
You can specify that certain fields only show up on edit, new, or display pages and only for certain groups, or to hide them completely.
My only problem with this is that the installer doesn't quite work. However, a user has posted working instructions on the discussion board.
SharePoint Tool Basket - List Columns Manager - "This feature allows site collection administrators to view all the columns of a list including hidden/read-only ones and gives column details such as the internal name, Guid, Type.."
I found a pretty nice solution at Cleverworkarounds. The code is writen in javascript so the script does not actually remove the fields, which in my case is necessery, but it does hide the fields. Me, I need to stick to SharePoint List Form Extensions due to some sensitive data our customers have and want to be remove for some users. Laura Rogers solutions is good too, but with Cleverworkarounds you don't need to use Sharepoint Designer.
One option is to download the Sharepoint Manager from CodePlex. Install it on the server (it uses the object model) and you get simple access to a whole heap of stuff including, on a per-field-per-list basis, whether a specific column is hidden in it's entirety (even from the list settings), or hidden from the display form, the edit form or both. It's a matter of setting a true/false dropdown and clicking save. There is also the option for making columns readonly too.
It's all or nothing in terms of permissions though - whatever you choose applies to everyone who can access that area.
You can hide items in the calendar list using JQuery. Please follow the steps below:
- From the Calendar tab Customize List category select -> Form Web Parts -> Default New Form
- Select the Insert tab and from Web Parts category -> click Web Part.
- Choose Media and Content, then choose Content Editor and click Add.
- Place the Content Editor below your form and click inside the Content Editor
- Click on Format Text tab -> Markup category -> Click on HTML -> Edit HTML Source
Add the following code:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function() {
$("td.ms-dttimeinput").hide();
$("span[title='All Day Event'] > input").attr("checked","checked");
$("tr:has(span[title='Recurrence'])").not("tr:has(tr)").hide();
$("tr:has(span[title='All Day Event'])").not("tr:has(tr)").hide();
$("tr:has(span[title='Workspace'])").not("tr:has(tr)").hide();
});
</script>
The above code also puts the "All Day Event" to be checked true.
Hope this would be useful ..
I think it is little bit hard to do that. Otherwise there should be not so much such third party tools like SharePoint Column View Permission, Bamboo also has such tool.
Take a look at this if you want make it happen through code stackoverflow.com/questions/1058232. But I am not sure it works in calender.

xsl for sharepoint calendar

I need to create a calendar which will join together data from a number of separate sharepoint team calendars (it's so that the press office in my organisation can see what's happening in each department side-by-side on the same page - what they would like is something like the ui for a shared google calendar).
I have discovered that I can create a linked source in Sharepoint which combines the various calendars and will provide xml output of the data I need. So what I would like now is an example of how to consume some xml and create the standard day/week/month views in a read-only calendar to my users.
What I have discovered is the following:
You can't attach a listviewwebpart - they use caml instead of xslt - they can't consume xml data. They use the object model to consume the list that it belongs to.
No source code for that web part. It's locked in a dll.
The dataformwebpart can consume any xml data source.
Some listviewwebparts can be changed to dataformwebparts but not the calendar.
Is there an example of an xslt calendar which can consume some xml and create the standard day/week/month views to get me going?
This is a common request, and not very easy with the standard web parts. You could try Ton Stegeman's Content by Type web part which I think allows you to roll up list items into a calendar, or alternatively take a look at (commercial) list rollup and calendar+ webparts from Bamboo Solutions.
http://www.ideseg.com/SharePointXSLToRenderCalendarsWithCsegRollUp.aspx
From Carlos Segura Blog, excelent way to do the Calendar Join.
It is very common now to expect you can add another calendar as a 'layer' along with an existing one. E.g. that is what we do in Google calendar, in outlook, on android. I believe this is how it is intended, and it ends the quest for sync tools, query questions, data webparts.
The same thing can be done in OOTB Sharepoint; see link below where they seem to have found the right answer. It is very easy to load an additional calendar once you vreated a calendar view.
http://weblogs.asp.net/sharadkumar/archive/2010/03/12/aggregate-sharepoint-event-items-into-your-calendar-view-using-calendar-overlay.aspx

Resources