Projet

Général

Profil

Révision d1c64ea8

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/file_entity/file_entity.theme.inc
53 53
    $options['attributes']['title'] = check_plain($file->filename);
54 54
  }
55 55

  
56
  return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
56
  $output = '<span class="file">' . $icon . ' ' . l($link_text, $uri['path'], $uri['options']);
57
  $output .= ' ' . '<span class="file-size">(' . format_size($file->filesize) . ')</span>';
58
  $output .= '</span>';
59
  return $output;
57 60
}
58 61

  
59 62
/**
......
131 134
  $audio_attributes = array();
132 135
  if ($variables['controls']) {
133 136
    $audio_attributes['controls'] = 'controls';
137

  
138
    if (!empty($variables['controls_list'])) {
139
      $controls_list = array();
140
      foreach ($variables['controls_list'] as $key => $value) {
141
        if (!$value) {
142
          switch ($key) {
143
            case 'download':
144
              $controls_list[] = 'nodownload';
145
              break;
146
            case 'remote_playback':
147
              $controls_list[] = 'noremoteplayback';
148
              break;
149
          }
150
        }
151
      }
152
      $audio_attributes['controlsList'] = implode(' ', $controls_list);
153
    }
134 154
  }
135 155
  if ($variables['autoplay']) {
136 156
    $audio_attributes['autoplay'] = 'autoplay';
......
177 197
  $video_attributes = array();
178 198
  if ($variables['controls']) {
179 199
    $video_attributes['controls'] = 'controls';
200

  
201
    if (!empty($variables['controls_list'])) {
202
      $controls_list = array();
203
      foreach ($variables['controls_list'] as $key => $value) {
204
        if (!$value) {
205
          switch ($key) {
206
            case 'fullscreen':
207
              $controls_list[] = 'nofullscreen';
208
              break;
209
            case 'download':
210
              $controls_list[] = 'nodownload';
211
              break;
212
            case 'remote_playback':
213
              $controls_list[] = 'noremoteplayback';
214
              break;
215
          }
216
        }
217
      }
218
      $video_attributes['controlsList'] = implode(' ', $controls_list);
219
    }
180 220
  }
181 221
  if ($variables['autoplay']) {
182 222
    $video_attributes['autoplay'] = 'autoplay';

Formats disponibles : Unified diff