Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] integrate export-to-csv directive into ng-admin #316

Merged
merged 8 commits into from
Apr 3, 2015
Merged

Conversation

ThieryMichel
Copy link
Contributor

feature: #230

  • integrate export-to-csv into ng-admin @fzaninotto @manuquentin what do you think?
  • allow to configure the view used for the fields
  • use current list order for the export
  • add test

@endel
Copy link
Contributor

endel commented Feb 19, 2015

Hi @ThieryMichel, I'm trying to test your branch, and the following error is occurring:

Unknown provider: clEntryFormaterProvider <- clEntryFormater <- maExportToCsvButtonDirective

Am I missing something?

@ThieryMichel
Copy link
Contributor Author

@endel No it was a mistake on my part. Corrected it.

case 'template':
map[order] = {name: attr, type: 'Field'};
break;
case 'Reference':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be reference with a lowercase c. Same for referenced_list (refs #307).

@fzaninotto
Copy link
Member

Very nice. For the configurability, I suggest that you use a smart setter comparable to fields():

// by default, the csv export should use the field list from the list view
myEntity.listView()
  .exportFields(myEntity.listView.fields())
// developers can customize it with a custom field list
myEntity.listView()
  .exportFields([
    nga.field('foo'),
    nga.field('bar')
  ])

@fzaninotto
Copy link
Member

Bump

@ThieryMichel ThieryMichel force-pushed the csv_export branch 2 times, most recently from c2b32ee to 223cb15 Compare April 1, 2015 21:37
@lucval
Copy link

lucval commented Apr 2, 2015

Hi @ThieryMichel, is there any commit to solve the problem pointed out by @endel on February 19?
I am still getting this:
"Unknown provider: clEntryFormaterProvider <- clEntryFormater <- maExportToCsvButtonDirective"

Thanks in advance

@ThieryMichel
Copy link
Contributor Author

Just fixed it.

fzaninotto added a commit that referenced this pull request Apr 3, 2015
[WIP] integrate export-to-csv directive into ng-admin
@fzaninotto fzaninotto merged commit 328485a into master Apr 3, 2015
@fzaninotto fzaninotto deleted the csv_export branch April 3, 2015 08:21
@fzaninotto
Copy link
Member

Thanks for this great feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants