Skip to content
Snippets Groups Projects
Commit 71e00937 authored by Chris Gross's avatar Chris Gross
Browse files

daily build

parent 743a75ee
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 79 deletions
The following patches have been applied to this project:
- http://drupal.org/files/issues/file_entity-file-size-limit-per-file-type-2530656-3.patch
- http://drupal.org/files/issues/file_entity-notice_undefined_offset_menu_translate-2533816-4.patch
- http://drupal.org/files/issues/2537982-fix-changing-file-scheme.patch
This file was automatically generated by Drush Make (http://drupal.org/project/drush).
......@@ -906,7 +906,7 @@ function file_entity_edit_submit($form, &$form_state) {
}
if (file_uri_scheme($file->uri) != $form_state['values']['scheme']) {
$file_destination = $form_state['storage']['scheme'] . '://' . file_uri_target($file->uri);
$file_destination = $form_state['values']['scheme'] . '://' . file_uri_target($file->uri);
$file_destination = file_stream_wrapper_uri_normalize($file_destination);
if ($moved_file = file_move($file, $file_destination, FILE_EXISTS_RENAME)) {
// Only re-assign the file object if file_move() did not fail.
......
......@@ -978,6 +978,45 @@ class FileEntityAltTitleTestCase extends FileEntityTestHelper {
}
}
/**
* Test changing the scheme of a file.
*/
class FileEntityChangeSchemeTestCase extends FileEntityTestHelper {
public static function getInfo() {
return array(
'name' => 'Changing file scheme',
'description' => 'Test changing the scheme of a file.',
'group' => 'File entity',
);
}
function testChangeScheme() {
// Select the first text test file to use.
$file = $this->createFileEntity(array('type' => 'document'));
$this->assertEqual(file_uri_scheme($file->uri), 'public', 'File is public.');
// Create a user with file edit permissions.
$user = $this->drupalCreateUser(array('edit any document files'));
$this->drupalLogin($user);
$this->drupalGet('file/' . $file->fid . '/edit');
$this->assertNoFieldByName('scheme');
// Create a user with file admin permissions.
$user = $this->drupalCreateUser(array('edit any document files', 'administer files'));
$this->drupalLogin($user);
$this->drupalGet('file/' . $file->fid . '/edit');
$this->assertFieldByName('scheme', 'public');
$this->drupalPost(NULL, array('scheme' => 'private'), 'Save');
$file = entity_load_unchanged('file', $file->fid);
$this->assertEqual(file_uri_scheme($file->uri), 'private', 'File has changed to private.');
}
}
/**
* Tests replacing the file associated with a file entity.
*/
......
......@@ -10,8 +10,8 @@
* Handles file specific functionality for Panelizer.
*/
class PanelizerEntityFile extends PanelizerEntityDefault {
public $entity_admin_root = 'admin/structure/file-types/manage/%';
public $entity_admin_bundle = 4;
public $entity_admin_root = 'admin/structure/file-types/%';
public $entity_admin_bundle = 3;
public $views_table = 'file_managed';
public function entity_access($op, $entity) {
......
......@@ -479,6 +479,8 @@ function wcm_permissions_user_default_permissions() {
'name' => 'administer files',
'roles' => array(
'administrator' => 'administrator',
'site builder' => 'site builder',
'site manager' => 'site manager',
),
'module' => 'file_entity',
);
......@@ -1790,6 +1792,7 @@ function wcm_permissions_user_default_permissions() {
'name' => 'delete revisions',
'roles' => array(
'administrator' => 'administrator',
'site manager' => 'site manager',
),
'module' => 'node',
);
......@@ -3205,6 +3208,7 @@ function wcm_permissions_user_default_permissions() {
'name' => 'revert revisions',
'roles' => array(
'administrator' => 'administrator',
'site manager' => 'site manager',
),
'module' => 'node',
);
......
name = OCIO 2 (in progress)
description = Please provide a description for your theme.
name = Blocks (OCIO 2)
description = A modern-looking theme with headers and many entities within blocks. Includes OSU Navbar, Masthead, and Menu Bar color customization options.
base theme = ocio_omega_base
screenshot = screenshot.png
engine = phptemplate
......
profiles/wcm_base/themes/ocio_omega_2/screenshot.png

4.5 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_2/screenshot.png

75.4 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_2/screenshot.png
profiles/wcm_base/themes/ocio_omega_2/screenshot.png
profiles/wcm_base/themes/ocio_omega_2/screenshot.png
profiles/wcm_base/themes/ocio_omega_2/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
name = Traditional (OCIO 3)
description = A traditional looking theme with color and font customization options.
description = A traditional looking theme with a max-width container element. Includes Menu Bar and Body color customization options. Font customization options coming soon.
base theme = ocio_omega_base
screenshot = screenshot.png
engine = phptemplate
......
profiles/wcm_base/themes/ocio_omega_3/screenshot.png

4.5 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_3/screenshot.png

66.6 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_3/screenshot.png
profiles/wcm_base/themes/ocio_omega_3/screenshot.png
profiles/wcm_base/themes/ocio_omega_3/screenshot.png
profiles/wcm_base/themes/ocio_omega_3/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/template.php';
* Implements hook_form_FORM_alter().
*/
function ocio_3_form_system_theme_settings_alter(&$form, $form_state) {
// You can use this hook to append your own theme settings to the theme
// settings form for your subtheme. You should also take a look at the
// 'extensions' concept in the Omega base theme.
//unset options from the base theme that we don't want for this site
unset($form['ocio_omega']['ocio_omega_color_navbar']);
unset($form['ocio_omega']['ocio_omega_color_masthead']);
}
name = Modern (OCIO 4)
description = Please provide a description for your theme.
description = A modern, clean-looking, theme. Includes OSU Navbar, Masthead, Menu Bar, and Body color customization options.
base theme = ocio_omega_base
screenshot = screenshot.png
engine = phptemplate
......
profiles/wcm_base/themes/ocio_omega_4/screenshot.png

4.5 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_4/screenshot.png

78.7 KiB | W: | H:

profiles/wcm_base/themes/ocio_omega_4/screenshot.png
profiles/wcm_base/themes/ocio_omega_4/screenshot.png
profiles/wcm_base/themes/ocio_omega_4/screenshot.png
profiles/wcm_base/themes/ocio_omega_4/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -61,23 +61,6 @@ function ocio_omega_base_form_system_theme_settings_alter(&$form, $form_state) {
)
)
),
/*
'ocio_omega_color_accent' => array(
'#type' => 'radios',
'#title' => t('Accent Color'),
'#default_value' => theme_get_setting('ocio_omega_color_accent'),
'#options' => ocio_omega_base_generate_color_swatches(
array(
'green' => t('Green'),
'yellow' => t('Yellow'),
'purple' => t('Purple'),
'blue' => t('Blue'),
'none' => t('None'),
)
),
'#description' => "Choose which accent color you'd like to use.",
)
*/
);
$form['#attached']['css'][] = drupal_get_path('theme', 'ocio_omega_base') . '/css/ocio-omega-base.settings.css';
......@@ -85,63 +68,20 @@ function ocio_omega_base_form_system_theme_settings_alter(&$form, $form_state) {
}
function ocio_omega_base_form_system_theme_settings_validate(&$form, &$form_state) {
if ($form_state['values']['ocio_omega_color_navbar'] == 'dk-gray' && $form_state['values']['ocio_omega_color_masthead'] == 'dk-gray') {
form_set_error('ocio_omega_color_masthead', t('Dark masthead cannot be used with dark navbar.'));
$form['ocio_omega']['ocio_omega_color_masthead']['dk-gray']['#attributes']['class'][] = 'form-radio-error';
}
if (!empty($form['ocio_omega']['ocio_omega_color_navbar'])) {
if ($form_state['values']['ocio_omega_color_navbar'] == 'dk-gray' && $form_state['values']['ocio_omega_color_masthead'] == 'dk-gray') {
form_set_error('ocio_omega_color_masthead', t('Dark masthead cannot be used with dark navbar.'));
$form['ocio_omega']['ocio_omega_color_masthead']['dk-gray']['#attributes']['class'][] = 'form-radio-error';
}
}
}
function ocio_omega_base_color_schemes() {
$color_scheme = array(
'scheme-default' => array(
'scheme_name' => 'Default',
'class_name' => 'scheme-default-option',
'colors' => 5,
),
'scheme-1' => array(
'scheme_name' => 'Scheme 1',
'class_name' => 'scheme-1-option',
'colors' => 5,
),
'scheme-2' => array(
'scheme_name' => 'Scheme 2',
'class_name' => 'scheme-2-option',
'colors' => 5,
),
'scheme-3' => array(
'scheme_name' => 'Scheme 3',
'class_name' => 'scheme-3-option',
'colors' => 5,
),
);
return $color_scheme;
}
/**
* Generates an array with HTML-formatted color swatches for the color scheme
* picking section in the config form.
*
* @return array
* Generate Color swatches for settings
*/
function ocio_omega_base_generate_scheme_swatches() {
$schemes = ocio_omega_base_color_schemes();
$options = array();
foreach ($schemes as $scheme_id => $scheme) {
$option = '<span class="' . $scheme['class_name'] . ' swatch-panel">';
$option .= '<span class="label">' . $scheme['scheme_name'] . '</span>';
$option .= '<div class="swatches">';
for ($i = 1; $i <= $scheme['colors']; $i++) {
$option .= '<div class="swatch color' . $i . '"></div>';
}
$option .= '</div>';
$option .= '</span>';
$options[$scheme_id] = $option;
}
return $options;
}
function ocio_omega_base_generate_color_swatches($options = array()) {
foreach ($options as $name => $title) {
$option = '<span class="' . $name . '-option swatch-panel">';
......
......@@ -57,6 +57,7 @@ projects[file_entity][version] = 2.0-beta2
projects[file_entity][subdir] = contrib
projects[file_entity][patch][2530656] = http://drupal.org/files/issues/file_entity-file-size-limit-per-file-type-2530656-3.patch
projects[file_entity][patch][2533816] = http://drupal.org/files/issues/file_entity-notice_undefined_offset_menu_translate-2533816-4.patch
projects[file_entity][patch][2533816] = http://drupal.org/files/issues/2537982-fix-changing-file-scheme.patch
projects[file_entity_swf][version] = 1.0-rc2
projects[file_entity_swf][subdir] = contrib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment