Problem/Motivation

We need full views integration.
Admin pages and reports should also use views.

Remaining tasks

Basic Views integration has been done.
But admin pages and reports, etc... are not using views yet.
We should convert all reports to views.

List of functions that need to be converted to views:

  • referral_admin_view_details()
  • referral_admin_view_unflagged()
  • referral_admin_view_roles()
  • referral_admin_view_summary()
  • referral_block_content()
  • referral_view() - Default views created. TODO: Test it and if it's OK, redirect referral/view to the views page: 'my-referrals'

User interface changes

If we delete old URLS, and replace them with views, some urls such as ''referral/view" will become unavailable.

Comments

josebc’s picture

StatusFileSize
new4.73 KB
qasimzee’s picture

is it ready?

josebc’s picture

StatusFileSize
new5.54 KB

you can apply this file against 7.x-1.x-dev

drone.ah’s picture

patch applies cleanly and works as advertised...

Is it worth checking if the entity api module is available and passing off the views integration to that since it does all of it fairly automatically...?

josebc’s picture

Status: Needs work » Needs review

we would still need to add the relations to the views data so i don't think this step will be really important

josebc’s picture

Issue summary: View changes
paul.moloney’s picture

The patch from #6 is working well for me. It would be good to include flag support too.

mrded’s picture

Status: Needs review » Needs work

I've checked #3 patch and there are a few things I noticed:

  • I don't understand you why do you need to wrap 'referral' table with an entity. Moreover you cannot use 'uid' as a key, because it's not unique
  • With current implementation of integration, there is no way to get invited users if base table is 'users'. You must always use 'referral' as a base table.
  • Based on 'referral' schema 'uid' points on the user who was invited. In your patch it points the referral user
  • Why do you use these extra fields 'created_fulldate', 'created_year_month' and 'created_year', 'created_month' and 'created_day' if you can apply a formatter for 'created' field?
  • integration with 'flag_timestamp' and 'flag' fields is missing
mrded’s picture

Status: Needs work » Needs review
StatusFileSize
new8.55 KB
new12.4 KB

Please, take a look at a new version of the patch. I've also included an example of a view.

mrded’s picture

Assigned: josebc » Unassigned
mrded’s picture

I'm sorry, @josebc just read you patch more carefully. It makes more sense now. Ignore my previous patch.

mrded’s picture

StatusFileSize
new8.73 KB
new4.53 KB

Please take a look new version of a patch.
I've cleaned it up a bit and added an integration with 'flag_timestamp' and 'flag' fields.

mrded’s picture

StatusFileSize
new4.56 KB
new674 bytes

Just a few small fixes.

destinationsound’s picture

A Few things. First of all, #13 works without any issues.

Second, Will this allow me to create a Views Block with the users unique code, so I can place it anywhere on the site? If not, how can i get that option?

josebc’s picture

@mrded , can you please explain what changed from patch in #3?

hejazee’s picture

Assigned: Unassigned » hejazee
Issue summary: View changes
Status: Needs review » Needs work

I'm working on this module and changing many things.
I will add full views integration for the next release of this module.

Thanks for your patches.
However since the source of this module is being changed significantly, some patches may need re-creation.

Another thing: Why do you add entity hooks for this module in your patches?
It is not necessary for this module to use entities. nor for views integration.

hejazee’s picture

I have created a new patch with full views integration. This is the same as #13, but with a little modification and also support for other fields and more.
I will push it.

Extended views integration will come soon. (Issue status will still remain "Needs work")

  • hejazee committed b58fc57 on 7.x-1.x
    Issue #1792720 by mrded, josebc, hejazee: Views Integration
    
hejazee’s picture

Issue summary: View changes

Updated issue summary.

hejazee’s picture

Issue summary: View changes

Updated issue summary

  • hejazee committed 060bcd7 on 7.x-1.x
    Issue #1792720 by hejazee: Views Integration: Added default view for My...
hejazee’s picture

Issue summary: View changes

Added default view for My referrals page. (Address: my-referrals)
Added a block: a list of my referrals.

socialnicheguru’s picture

should this be closed? if so why didn't the system close it?

hejazee’s picture

@SocialNicheGuru, Please see the issue summary.