Section 2.4. Library Web Parts


2.4. Library Web Parts

Quite often you will want to add a Web Part to share documents between the members of the site. The library Web Parts are enhanced lists specifically designed for storing, controlling, and maintaining various types of documents. A SharePoint Services library displays all the files stored in the library. The library also lists the properties for each file and provides a hyperlink to open the file. Using the library Web Parts, a site administrator can also implement version control on the items in the library. That is, an end user will have to specifically "check out" a document before editing it. When the editing is complete, the user can "check in" the document, incrementing the version number. Any user can see all the versions of the document and compare changes between versions.

In this section, you will learn about:

  • The views associated with library Web Parts

  • The specific features of a document library

  • The specific features of a picture library

  • Version control

2.4.1. The Home Page

Every library Web Part presents a home page view that includes the links necessary to work with the library and one of several views of the content in the library. From the library home page, you can:

  • Add files and folders to the library

  • Sort and filter files contained in the library

  • Switch the library view

  • Change the design of the library

  • Create alerts so users are notified of any changes in the library or specific files within a library

When you add or remove files from the library, the associated hyperlinks are automatically updated.

2.4.2. Document Libraries

Document libraries are collections of files that allow a team to share files. A document library is basically a file repository for any documents that you want to share with your team. You can upload documents to the library, as well as edit existing documents in a controlled versioning environment. Document libraries allow you to create and save documents in standard templates. One possible use of a document library is to store all customer invoices. Figure 2-11 shows a standard document library.

Figure 2-11. A document library (all documents view)


2.4.2.1 The all documents view

The default view displays all documents in the library in a simple table. You can either work with each document in this view or click the Edit in Datasheet link if you need to make mass changes to the library. The datasheet view provides you with an Excel-like interface with improved features for copying, pasting, mass selecting, and deleting library components.

2.4.2.2 The explorer view

All libraries include an explorer view that mirrors the functionality of the Microsoft Windows Explorer. The explorer view lets you delete, rename, or copy and paste files and folders. Figure 2-12 shows a standard document library in explorer view.

Figure 2-12. Library in explorer view


Within the explorer view you can drag and drop files from a regular Windows Explorer instance into your SharePoint site. However, your site administrator may have set up permissions that restrict the use of this view.

2.4.2.3 Creating a document library

To create a document library:

  1. Click Create on the top link bar.

  2. Click "Document library" on the Create Page page.

  3. In the Name text field, type a name for the library.

  4. On the Description text field, type a brief description for the library. The description field is not required.

  5. If you want the document library to appear in the Quick Launch bar, select the Yes radio button in the Navigation section.

  6. If you want to create a backup or new version each time the file is edited, selected the Yes radio button in the document Versions section. Site users can access either the latest version or any previous version. See the Section 2.4.4 for more details on what this setting means.

  7. Select a default document template from the document template dropdown menu. The default document template determines the format of any new file created in the document library.

  8. Click Create.

Figure 2-13 shows the New Document Library page that is used to create new document libraries on your team site.

Figure 2-13. Create a document library


Your document library will be added to your site. You can now add files to the library using either the upload button or the explorer view.

2.4.2.4 Document templates

To enforce consistency for your document library, you can specify a template to be used anytime a new document is created. You can create templates for any SharePoint Services-compatible program. To use a template, the template must be stored in the site template gallery.

For example, you can attach a Microsoft Word template to a document library. Whenever a user creates a new Microsoft Word document within the library, he will automatically be forced to use the attached template. If you have a Microsoft PowerPoint template for slides, you could attach it to the document library so that all Microsoft PowerPoint presentations will automatically have the same look and feel.

2.4.2.5 Adding documents to a document library

To add a document to a document library:

  1. Click Documents and Lists in the top bar link.

  2. Click on the document library in which you want to add the document.

  3. Click "Upload document."

  4. In the Upload document page, click the Browse button and navigate to the file you want to upload.

  5. If a document with the same name already exists in the document library and you want to overwrite the file each time a new version is saved, click the "Overwrite existing file(s)?" checkbox.

As an alternative, you can use the explorer view and drag and drop, or copy and paste your files from a Windows Explorer instance into the document library (or vice versa).

2.4.2.6 File formats in a document library

When you create a document library, you can save your files in binary format or in a web-based format. Both options have advantages and disadvantages. If you use a program-specific format (for example, .doc, .or .xls) you retain the runtime features of the program, but users must have the appropriate program installed to view the files.

If you use a web-based format, team members aren't required to have the appropriate program installed, but some runtime functionality might be lost.

2.4.3. Picture Libraries

Picture libraries provide the functionality for you to share and organize images in a corporate server environment. Picture libraries mirror the functionality of document libraries. Both types of libraries allow users to edit, copy, and delete files from the repository.

Picture libraries display photos in three different styles. A picture can be displayed as a thumbnail (a small version of the picture), filmstrip (displays both a smaller version of the picture and a larger, more detailed version of the picture) or as picture details (the actual picture is not displayed, just the associated picture information).

For example, several picture libraries could be used to store all the photos taken by photographers at a newspaper. By creating a picture library for each photographer, any reporter working on a story related to the pictures could access the picture library without having to search for the correct files. Figure 2-14 shows a standard picture library.

Figure 2-14. Standard picture library


Although pictures can be stored in other types of SharePoint lists, using a picture library lets users:

  • Look at pictures in different views (All pictures, Selected pictures, and Explorer)

  • Share pictures using slide shows

  • Send pictures directly to Microsoft Office 2003 programs

  • Download pictures directly to your computer

  • Edit pictures with a Windows SharePoint Services-compatible image editor

2.4.3.1 Creating a picture library

To create a picture library:

  1. Click Create on the top link bar.

  2. Click "Picture library."

  3. Type the name of the picture library in the Name text field.

  4. Type a brief description of the picture library in the Description text field. This step is optional.

  5. If you want the picture library to be visible in the Quick Launch bar, select the Yes radio button in the Navigation section.

  6. If you want to create a backup of a picture every time it is checked into the picture library, select the Yes radio button in the picture Versions section. See the Section 2.4.4 for more details on what this setting means.

  7. Click Create.

Figure 2-15 shows the New Picture Library page that is used to create new picture libraries on your team site.

Figure 2-15. Create a picture library page


2.4.3.2 Adding pictures to a picture library

To add a picture to a picture library:

  1. Click Documents and Lists in the top link bar.

  2. Click the name of the specific picture library.

At this point, you can upload a single picture or multiple pictures.

2.4.3.3 Adding a single picture

To add a single picture to a picture library:

  1. Click "Add picture" in the picture library.

  2. Click Browse and navigate to the picture you want to add to the library.

  3. Click Open.

  4. If a file with the same name already exists in the library, you must decide if you want to overwrite the existing file.

  5. Click Save and Close.

2.4.3.4 Adding multiple pictures

To add multiple pictures to a picture library:

  1. Click "Add picture" in the picture library.

  2. Click Add Multiple Files.

  3. Select the pictures you want to add.

  4. Click Upload and Close to add the pictures in their original size.

If you want to add pictures with smaller file sizes, click "Send pictures optimized for viewing on the Web." By reducing the file size, pictures will load faster in a web browser.


2.4.3.5 Download a picture from a picture library

To download a picture to your computer:

  1. Click Documents and Lists in the top link bar.

  2. Select a picture library.

  3. Select the checkbox next to the pictures you want to download.

  4. You must decide if you want to download the photos with the default picture settings or if you want to download the pictures with customized settings (for example, setting the width and height properties).

  5. Click Download.

  6. If you want to download the pictures to a specific location (as opposed to the default location), click Browse and navigate to the location where you want to store the files.

2.4.4. Version Control

Implementing version control allows you to save multiple versions of a document on your server. When you enable document versioning for a document library, a backup copy of your file is saved each time the file is saved to the library. This feature is useful in case you have to revert to an older copy of the file or you want to keep a history of any changes that are made to the document. If you have documents that need to be edited by several users, saving the original version of the file is very helpful to keep track of each user's modifications.

By turning on versioning, you can:

  • View previous versions of the file

  • Restore a file to a previous version

  • Delete all previous versions of a file

  • Restore deleted files

  • Force document check-in

Versioning can be applied to all files except HTML. In order to version web documents, you must use the MHTML format.

2.4.4.1 Implementing version control

If you are the site administrator and did not enable version control when you created your library, you can turn it on later by adjusting the settings for your library.

To enable version control:

  1. Navigate to your library.

  2. Click on the Modify Settings and Columns link.

  3. In the General Settings section, click on the Change General Settings link.

  4. In the Document Versions section, select the Yes radio button.

  5. Click OK to apply the changes.

2.4.4.2 Viewing a previous version of a file

A user can view previous versions of any document in the document library. Figure 2-16 shows the Versions saved page that contains all versioning information for a specific document. To view a previous version of a file:

  1. Point to the file in your library.

  2. Click the triangle that appears.

  3. Click Version History.

  4. In the Modified column, click your desired version.

Figure 2-16. Version history for the test.doc document


2.4.4.3 Restore a file to a previous version

In certain cases, you may want to revert to a previous version of a file. For example, if a user makes unacceptable edits or overwrites important changes, you may need to return to the previous version of the file. To restore a previous version:

  1. Point to the file in your document library.

  2. Click on the triangle that appears.

  3. Click Version History.

  4. In the Modified column, point to the version you wish to restore.

  5. Click the triangle that appears.

  6. Click Restore in the menu that appears.

  7. Click OK when asked if you want to replace the file.

2.4.4.4 Delete previous versions of a file

If you have permission, you can delete one version or all of the previous versions of a file. Previous versions take up space on the hosting server, so although you may want to save previous versions, documents that undergo numerous changes over an extended life cycle can take up large amounts of space. To delete a previous version of a file:

  1. Point to the file in your document library.

  2. Click on the triangle that appears.

  3. Click Version History.

  4. In the Modified column, point to the version you want to delete.

  5. Click the triangle that appears.

  6. Click Delete in the menu that appears.

  7. Click OK to confirm that you want to delete the file.

If you delete the file directly, you will also delete all saved versions. The above procedure lets you selectively delete old versions of a file without deleting all of the file history.




    SharePoint User's Guide
    SharePoint 2007 Users Guide: Learning Microsofts Collaboration and Productivity Platform
    ISBN: 1590598296
    EAN: 2147483647
    Year: 2005
    Pages: 62

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net