Difference between revisions of "Drupal Calendar"
From Stadm
Jump to navigationJump to searchLine 1: | Line 1: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
− | The calendar module is currently installed on [http:// | + | The calendar module is currently installed on [http://eri7a-dev.eri.ucsb.edu/ eri7a-dev], and can be moved to any other drupal installation when necessary using the "Features" module. Below is a short guide on the structure, functionality and use of the current setup. |
===Location=== | ===Location=== | ||
− | *The current calendar/resources setup is located at: http:// | + | *The current calendar/resources setup is located at: http://eri7a-dev.eri.ucsb.edu/events_resources |
===Structure=== | ===Structure=== |
Revision as of 15:18, 20 July 2012
The calendar module is currently installed on eri7a-dev, and can be moved to any other drupal installation when necessary using the "Features" module. Below is a short guide on the structure, functionality and use of the current setup.
Contents
Location
- The current calendar/resources setup is located at: http://eri7a-dev.eri.ucsb.edu/events_resources
Structure
- Calendar view is a page with location "events_resources"
- Resources is a view placed under "Main Page content" in the "Content" block
- Set to only be displayed on "events_resources/*" and "events_resources"
Advanced Information for Calendar
- It should be noted that, to create a new calendar page or block, you must use the "Add view from template" feature rather than "Add new view," as doing the latter will produce an error and not display the calendar
- Once you have clicked "Add view from template," chose the "Calendar" option with the description "A calendar view of the 'field_date_time' field in the 'node' base table."
- To filter content into the Calendar, the "Filter Criteria" in the Calendar view is used.
- It checks to make sure that:
- The content is published
- The type of the content is "Event"
- It does not contain the term "Resource" in its taxonomy
- This is done with the "Has taxonomy term" filter, with the "Is none of" operator.
- The value "Content: Type" under the "Fields" heading is necessary to color-code events based on their taxonomy term. If you would like to change the taxonomy vocabulary, this item must be kept and updated to match the new terms of the vocabulary
Advanced Information for Resources Table
- The resources table has a slightly more complicated filter than that of the calendar (filter settings are located in Structure->Views->Resources).
- Has taxonomy term is equal to "Resources"
- Start date of Resource will be filtered by the date the user selects in the year and date drop-down menus.
- "Expose this filter to visitors, to allow them to change it" must be checked for user to be able to select their month. If this checkbox is disabled, the date filter should be turned off to display all Resources.
- AJAX must be turned on for this to work
- Global Text area is set to display "Resources" as a padded header above the table because the default Header styling was a little cramped. This could be accomplished by editing the stylesheet instead.
Terms/Taxonomy
- Vocabulary: Event Type
- Terms:
- ERI Meeting
- ERI Seminar
- ERI General Event
- General UCSB Event
- Resource
- Shows up in "Resources" block under calendar
- These events should contain a link to the resource in the description
To Add New Event/Resource
- Click "Add Event" under "Administration" in Sidebar Menu
- Enter title, description (which should include a link if possible), date (this has multiple options, and can span a range), event location, and finally category
- Be sure to only select "Resource" if you don't want the event to show up in the Calendar, and would instead like it to appear as a link in the table below the Calendar
- If item is a resource, you should input the dates that the resource will be relevant. For example, if you are posting a restaurant menu for the month of July, put 07/1/12 as the start date and 07/31/12 as the end date. If you do not want the item to expire, select today as the start date, and some time far in the future as the end date. This is a workaround, and the CMS student assistant should work to find a cleaner method of setting a non expiring resource.
- Click "Save"
Customizations/Additions
The events and references are filtered through taxonomy terms -- in the future, it is likely new terms will be added, and ERI staff will decide to change the color scheme.
To Add New Terms
- You can add new event types by going to Structure->Taxonomy->Event Type =>Add Terms
To Change or Add Color
- To define the color that an Event type should show up as in the calendar, go to Structure->Views->Calendar => edit-> Format -> Settings next to Calendar Entities
- Scroll down to the bottom and use the color selector next to the term you have just added
- Click "Apply"
- Click "Save" at the top of the Calendar menu
Usage
- Calendar month can be changed by clicking "Next" or "Prev" at the top right of the page above the Calendar
- You can check resources applicable to a given month by selecting the "Year" and "Date" under the "date" heading above the table of resources. For example, if this month is July, and I want to see a menu for this month, I would select 2012 and July.
Portability Notes
- Since there are many components necessary for this page to function, it seems like the easiest way to move the entire page to another site would be to export all of the elements as a module using the "Features" module that is on both the eri7-dev and eri7a-dev sites.
- To create a feature, go to "Structure"->"Features" and then click the "Create Feature" tab at the top of the box that appears.
- Below is a non-comprehensive list of all the elements that should be included when exporting the "Feature." If this is not the first time exporting the feature, check the last version name to avoid naming confusion. The Update XML field can be left blank for now.
- Content types
- Event
- Dependencies
- Block
- Calendar
- Color
- Chaos Tools
- Date
- Date All Day
- Date API
- Date Popup
- Date Repeat API
- Date Repeat Field
- Date Tools
- Date Views
- Field UI
- List
- Options
- Path
- Taxonomy
- Views
- Views UI
- Fields
- node-event-body
- node-event-field-date-time
- node-event-field-type
- node-event-field-location
- Taxonomy
- Event Type
- Views
- Resources
- calendar
- Once the module is downloaded and installed on the desired drupal installation, events specific to the site must be added using the same content type as mentioned in this tutorial (the content type should be included when exporting the "Feature"). Also, side menu item must be added to reflect location of calendar -- this might not change, but because the module doesn't include the menu item, the new menu link must be added anyway.