You are here

function scald_admin_actions in Scald: Media Management made easy 6

The Scald Admin page for Scald Actions

1 string reference to 'scald_admin_actions'
scald_menu in ./scald.module
Implementation of hook_menu().

File

./scald.admin.inc, line 536

Code

function scald_admin_actions() {
  $content_first = t('
    <h3>Scald Actions</h3>

    <p>Scald Actions are akin to Drupal Permissions.  Each is something which can be done <em>to</em> or <em>with</em> an Atom.  They are assigned to Drupal user roles.  Only roles which have the "use scald" permission can have Actions assigned to them.</p>
  ');
  $content = t('
    <ol>
      <li>
        <strong>Admin Mode</strong>
        <ul>
          <li><em>The Admin Mode Action is not an Action but a characteristic of a Role\'s permitted actions.  If it is given to a Role, that Role\'s Actions will be permitted for <strong>all</strong> Atoms, even if the Actions settings for an Atom indicate that those Actions are not permitted.  Permitting this pseudo-action does <strong>not</strong> grant the Role the ability to administer Scald.  That must be granted through the Drupal User Permissions interface (permission \'adminster scald\').  Assign this pseudo-action with caution as it can lead to licensing violations.</em></li>
          <li>Provided by <code>scald.module</code></li>
        </ul>
      </li>
      <li>
        <strong>Fetch</strong>
        <ul>
          <li><em>The Fetch Action is the an internal Action.  Without this Action permitted, a Role cannot effectively use Scald.  Without this Action permitted for an Atom, that Atom cannot even be loaded, effectively masking it from everyone who does not have Admin Mode permitted.</em></li>
          <li>Provided by <code>scald.module</code></li>
        </ul>
      </li>
  ');
  $actions_results = db_query("\n    SELECT\n      provider,\n      title,\n      description\n    FROM\n      {scald_actions}\n  ");
  while ($action_raw = db_fetch_array($actions_results)) {
    $content .= '
      <li>
        <strong>' . $action_raw['title'] . '</strong>
        <ul>
          <li><em>' . $action_raw['description'] . '</em></li>
          <li>Provided by <code>' . $action_raw['provider'] . '.module</code></li>
        </ul>
      </li>
    ';
  }
  $content .= '</ol>';
  return $content_first . drupal_get_form('scald_admin_actions_form') . $content;
}