aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default')
-rw-r--r--mod/file/views/default/file/embed_upload.php8
-rw-r--r--mod/file/views/default/file/group_module.php22
-rw-r--r--mod/file/views/default/file/typecloud.php2
-rw-r--r--mod/file/views/default/forms/file/upload.php15
-rw-r--r--mod/file/views/default/object/file.php10
-rw-r--r--mod/file/views/default/river/object/file/create.php30
6 files changed, 24 insertions, 63 deletions
diff --git a/mod/file/views/default/file/embed_upload.php b/mod/file/views/default/file/embed_upload.php
deleted file mode 100644
index e5076b052..000000000
--- a/mod/file/views/default/file/embed_upload.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- * Files upload form for embed
- */
-
-echo elgg_view_form('file/upload', array('id' => 'file_embed_upload'), array('ajax' => TRUE));
-
-
diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php
index 830b1096c..c37b13927 100644
--- a/mod/file/views/default/file/group_module.php
+++ b/mod/file/views/default/file/group_module.php
@@ -14,10 +14,6 @@ $all_link = elgg_view('output/url', array(
'text' => elgg_echo('link:view:all'),
));
-$header = "<span class=\"groups-widget-viewall\">$all_link</span>";
-$header .= '<h3>' . elgg_echo('file:group') . '</h3>';
-
-
elgg_push_context('widgets');
$options = array(
'type' => 'object',
@@ -34,12 +30,14 @@ if (!$content) {
$content = '<p>' . elgg_echo('file:none') . '</p>';
}
-if ($group->canWriteToContainer()) {
- $new_link = elgg_view('output/url', array(
- 'href' => "file/add/$group->guid",
- 'text' => elgg_echo('file:add'),
- ));
- $content .= "<span class='elgg-widget-more'>$new_link</span>";
-}
+$new_link = elgg_view('output/url', array(
+ 'href' => "file/add/$group->guid",
+ 'text' => elgg_echo('file:add'),
+));
-echo elgg_view_module('info', '', $content, array('header' => $header));
+echo elgg_view('groups/profile/module', array(
+ 'title' => elgg_echo('file:group'),
+ 'content' => $content,
+ 'all_link' => $all_link,
+ 'add_link' => $new_link,
+));
diff --git a/mod/file/views/default/file/typecloud.php b/mod/file/views/default/file/typecloud.php
index ce4d6c127..4253bf674 100644
--- a/mod/file/views/default/file/typecloud.php
+++ b/mod/file/views/default/file/typecloud.php
@@ -15,7 +15,7 @@ function file_type_cloud_get_url($type, $friends) {
}
if ($type->tag == "image") {
- $url .= "&listtype=gallery";
+ $url .= "&list_type=gallery";
}
if (elgg_get_page_owner_guid()) {
diff --git a/mod/file/views/default/forms/file/upload.php b/mod/file/views/default/forms/file/upload.php
index 001e66674..f637a419e 100644
--- a/mod/file/views/default/forms/file/upload.php
+++ b/mod/file/views/default/forms/file/upload.php
@@ -11,13 +11,17 @@ $desc = elgg_extract('description', $vars, '');
$tags = elgg_extract('tags', $vars, '');
$access_id = elgg_extract('access_id', $vars, ACCESS_DEFAULT);
$container_guid = elgg_extract('container_guid', $vars);
+if (!$container_guid) {
+ $container_guid = elgg_get_logged_in_user_guid();
+}
$guid = elgg_extract('guid', $vars, null);
-$ajax = elgg_extract('ajax', $vars, FALSE);
if ($guid) {
$file_label = elgg_echo("file:replace");
+ $submit_label = elgg_echo('save');
} else {
$file_label = elgg_echo("file:file");
+ $submit_label = elgg_echo('upload');
}
?>
@@ -49,21 +53,16 @@ if ($categories) {
<label><?php echo elgg_echo('access'); ?></label><br />
<?php echo elgg_view('input/access', array('name' => 'access_id', 'value' => $access_id)); ?>
</div>
-<div>
+<div class="elgg-foot">
<?php
echo elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $container_guid));
-//@todo this should not be necessary in 1.8... -- ajax actions can be auto-detected
-if ($ajax) {
- echo elgg_view('input/hidden', array('name' => 'ajax', 'value' => 1));
-}
-
if ($guid) {
echo elgg_view('input/hidden', array('name' => 'file_guid', 'value' => $guid));
}
-echo elgg_view('input/submit', array('value' => elgg_echo("save")));
+echo elgg_view('input/submit', array('value' => $submit_label));
?>
</div>
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 93a21c8e6..95e190d35 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -67,12 +67,6 @@ if ($full && !elgg_in_context('gallery')) {
$extra = elgg_view("file/specialcontent/$base_type/default", $vars);
}
- $download = elgg_view('output/url', array(
- 'href' => "mod/file/download.php?file_guid=$file->guid",
- 'text' => elgg_echo("file:download"),
- 'class' => 'elgg-button elgg-button-action',
- ));
-
$header = elgg_view_title($file->title);
$params = array(
@@ -82,17 +76,16 @@ if ($full && !elgg_in_context('gallery')) {
'subtitle' => $subtitle,
'tags' => $tags,
);
+ $params = $params + $vars;
$list_body = elgg_view('object/elements/summary', $params);
$file_info = elgg_view_image_block($file_icon, $list_body);
echo <<<HTML
-$header
$file_info
<div class="file elgg-content">
$body
$extra
- <p>$download</p>
</div>
HTML;
@@ -112,6 +105,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
+ $params = $params + $vars;
$list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($file_icon, $list_body);
diff --git a/mod/file/views/default/river/object/file/create.php b/mod/file/views/default/river/object/file/create.php
index 620d1d18c..dad629120 100644
--- a/mod/file/views/default/river/object/file/create.php
+++ b/mod/file/views/default/river/object/file/create.php
@@ -7,29 +7,7 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->title,
-);
-$link = elgg_view('output/url', $params);
-
-$group_string = '';
-$container = $object->getContainerEntity();
-if ($container instanceof ElggGroup) {
- $params = array(
- 'href' => $container->getURL(),
- 'text' => $container->name,
- );
- $group_link = elgg_view('output/url', $params);
- $group_string = elgg_echo('river:ingroup', array($group_link));
-}
-
-echo elgg_echo('file:river:create');
-
-echo " $link $group_string";
-
-if ($excerpt) {
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => $excerpt,
+)); \ No newline at end of file