Needs work
Project:
Views data export
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2011 at 08:53 UTC
Updated:
24 Oct 2025 at 15:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnv+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.
Comment #2
nagy.balint commentedI'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).
Comment #3
nagy.balint commentedchanged status.
Comment #4
johnvHi 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.
Comment #5
nagy.balint commentedSorry 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.
Comment #6
emorency commentedWe 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:
Comment #8
abhi.sharma commented5: styleable_export_links-1379672-5.patch queued for re-testing.
Comment #11
brandy.brown commentedI don't understand why there is a hard-coded image associated by default anyway ... ??? If a person wants an image, they can css a background image.
Comment #12
pancho29 commentedI've rerolled the patch for 7.x-3.0-beta8.
Comment #13
lolandese commentedI get some errors when trying to apply the #12 patch. Can you have a look what I am doing wrong? See attachment for my terminal output.
Thanks.
Comment #14
darvanenI'm not familiar enough with git patching to help you but it did work for me using 'patch -p1 < filename' against the 7.x-3.x branch.
No errors with the patch that I can see.
Comment #16
rooby commentedHere is the exact patch from #12 rerolled to apply cleanly to latest dev version.
Also I'm guessing this is no longer assigned to nagy.balint since that was 3 years ago, so unassigning.
Comment #17
rooby commentedPatch works fine for me.
I had a quick look over the code and there are no obvious coding standards issues but I haven't reviewed it technically.
Comment #18
Sborsody commentedThe only issue I ran into after applying this patch was an undefined index error when looking at the view. Basically the "link only" setting isn't set until after explicitly setting it and re-saving the view.
Comment #19
Sneakyvv commentedWhen you attach two (or more) views_data_export displays to one page display, it's impossible to make a distinction between them (except by the title attribute on the XLS-icon). So, I've expanded the patch from #16 to make it possible to add extra CSS classes to the link which allows to distinct the links or simply allows to add styling to them.
I also fixed the issue Sborsody described.
Comment #20
philyHello,
In release 7.x-3.0-beta8, the feed icon link is fully themable as indicated in theme/views_data_export.theme.inc file (lines 22 to 50).
For example, to change all XLS export icon:
in which
$image_pathand$image_classvariables were added and$imagevariable is altered to use added variables.Comment #21
andileco commentedThe last patch in the related issue that I added does the same thing as this patch, but approaches it in another way...perhaps a simpler way? Please check it out.
Comment #22
steven jones commentedI prefer this patch and approach to the one in: #2261167: Option for non-image link display, I wonder if we couldn't just reduce it down to sending some classes to the theme function though, singling out a specific option for making the link use the 'default icon' or something, which just adds a class to the set of classes to add.
Happy to work on this in bit, unless someone else wants to pick it up.
Comment #23
andileco commentedHey @Steven Jones--one of the things I liked about the other patch is that the alt text (which became the text displayed within the button/link) and the class options were both in the same location, so a site builder would only need to go to one place to do everything related to this. If you work on this patch, could you try to incorporate that same idea? Last time I tried this patch, it seemed less user-friendly in that way, so I continued to work on the other patch.
Comment #24
steven jones commentedComment #25
vali hutchison commentedAny update on this one - seems to have ground to a halt, likewise for #2261167: Option for non-image link display
Comment #26
capysara commentedPatch #19 works for me.
Comment #27
Rafal LukawieckiPatch #19 works for me. It would be nice to have it committed.
Comment #31
legato commentedCSS classes must be added as array elements, not as a concatenated string.
Comment #32
anoopsingh92Hi,
I am assigning this issue to me. Let me try once to fix that. I will update you soon as I can fix it or not.
Thanks
Comment #33
anoopsingh92Comment #34
anoopsingh92Hello @legato, I tried to apply both files of your patch but both are not applying to me.
Getting this error.
Can you please suggest how to fix that issue?
Thanks
Comment #35
anoopsingh92Need work
Comment #36
aaronbauman+1 for this feature request
Comment #39
ant1Seems this module provides templating for the export icon for some time now, so I assume this has been solved.
Comment #40
aaronbaumanThe patch provides detailed changes, and this thread contains a robust discussion about why those changes are necessary.
@ant1, Your comment does not add to the discussion, or provide any response to the proposal.
Resetting to Needs Review.
Comment #41
trickfun commentedWhy doesn't provide a better button? or a button like action?
I don't want override button inside admin theme.
Thank you
Comment #42
luke.leberMoving back to needs work due to...
All in all, I don't think this can be "needs review". There needs to be a written-down plan and one up to date merge request to be eligible for needing review IMHO.
That all said something definitely needs to be done here. The tap area for the current out of the box experience is too small to pass accessibility audits, so tagging with accessibility.
Comment #43
steven jones commented