The current export button uses an image with a hardcoded image path:

<a href="....">
           <img src="/sites/all/modules/views_data_export/images/csv.png"
                   alt="Download CSV File"
                   title="Download CSV File" height="14" width="36">
</a>

That is hard for a themer to overwrite; you'd have to use jQuery to manipulate the dom directly.

It would be great if this was stylable instead with CSS. Instead of the imgage tag, you could use some inner divs and then set the background image using CSS.

Files: 
CommentFileSizeAuthor
#5 styleable_export_links-1379672-5.patch7.52 KBnagy.balint
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch styleable_export_links-1379672-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 vde-download_link.jpg13.59 KBjohnv
#2 styleable_export_links-1379672-2.patch6.28 KBnagy.balint
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

Comments

Version:7.x-3.x-dev» 6.x-2.0-beta5
Status:Needs review» Active

+1 ,
an alternative is to generate a link, like the following modules do:
- print: 'print this page', 'send this page'
- nodereference_url: 'create node'
They support a link with only title, or include an icon, too.

Version:6.x-2.0-beta5» 7.x-3.x-dev
StatusFileSize
new6.28 KB
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

I've made this patch to solve this issue for version 7.x-3.x-dev.

After you apply this patch the export links will only contain the Attach text, not an image, and the new css file will provide the proper background and will hide the Attach text from the link. Also i added a shared option which lets you select whether to have the image or just simple text link (basically the link gets a different class).

Status:Active» Needs review

changed status.

Version:6.x-2.0-beta5» 7.x-3.x-dev
Status:Active» Needs work
StatusFileSize
new13.59 KB

Hi Bálint, I tested your patch, I like it, and I have the following comments:

- there is no need to put the css-file in a separate directory.

- the new setting is now under the FORMAT section. IMO this sets the file settings; it would be better to put it under DATA EXPORT SETTINGS, in the list "Path:, Attach to:, Batched export:"

- the default layout is now out-of-style. It would be nice if one could choose for one of both standard options:
-- action-link (like admin/content/node )
-- inline-link (like print moduleprint module )
See attached printscreen.

Assigned:Unassigned» nagy.balint
Status:Needs work» Needs review
StatusFileSize
new7.52 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch styleable_export_links-1379672-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Sorry for the time it took me to get back to this.

I updated my patch to the latest dev, and reworked it according to your feedback, except your last point.

Im not sure how i could change the html structure of the feed_icon part of the template around the links, without overwriting the whole views-view.tpl template which is in the views module.

I attached the updated patch.

We export our views with Features. When I export the vies after applying the patch #5, I don't have the attribute 'link_only' so I have an error when reimporting my views... Would it be possible to have a default behavior to show only icons if the attribute is not found ?

In plugins/views_data_export_plugin_style_export.inc, change the line to this:

   'link_only' => isset($this->display->display_options['link_only']) ? $this->display->display_options['link_only'] : FALSE;

The last submitted patch, styleable_export_links-1379672-5.patch, failed testing.

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 5: styleable_export_links-1379672-5.patch, failed testing.

The last submitted patch, 5: styleable_export_links-1379672-5.patch, failed testing.