AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Feature request: Add ReadOnly option to the Form #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add ReadOnly option to the Form

The Form would be the same, except
- in Grid, only one button/link View (or leave existing Edit, same picture)
- no Submit button
- Fields have just corresponding value, and no select option 
  (such as list, set, enum). 
  Or maybe to leave this as is, so user can see what the field values can
be, and maybe to ease the further search/filtering?

Original issue reported on code.google.com by vlatko.b...@gmail.com on 14 Feb 2010 at 6:11

GoogleCodeExporter commented 9 years ago
Hi,

This is for view record details?

Maybe something like this would help:

$grid->setViewDetail(true);
$grid->setFieldsForDetailView(array('id','name','country'));

And using the same layout from the form.

???!!!

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 6:19

GoogleCodeExporter commented 9 years ago
Yes, just that. The same form, just disable submitting it.

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 6:28

GoogleCodeExporter commented 9 years ago
I wasn't aware you already implemented this. You really are fast and productive.

66% works nice. View action/icon is displayed, clicking it displays the 
detailed Form
with readonly (just text) fields, however, the return link is not working.

Return link looks like this:
http://.../site/index/gridDetailcountries_zfGrid/1

As I figured out, $this->_getPkFromUrl() can't handle this URL, returns false, 
at
select ends up with empty where (i.e. WHERE() )

The example application runs correctly, but it hasn't got the GridID set.
When you set it, (i.e. $grid = $this->grid('countries_zfGrid');)
the same happens.
http://localhost/zfDatagrid/site/basic

Original comment by vlatko.b...@gmail.com on 15 Feb 2010 at 8:35

GoogleCodeExporter commented 9 years ago
Hi,

When running it on table with reference fields, and I'm getting error
 - Mysqli prepare error: Column 'id' in where clause is ambiguous

The "normal" Form works, but View Form does not. I think table reference is 
missing.

Simple Grid with no reference fields displays correctly, but Return still not 
working.

Original comment by vlatko.b...@gmail.com on 16 Feb 2010 at 8:48

GoogleCodeExporter commented 9 years ago
Hi,

Please check now.

Revision 615

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 16 Feb 2010 at 5:07

GoogleCodeExporter commented 9 years ago
Hi,

1. New: I'm getting Notice when displaying Grid:
Notice: Undefined index: add in C:\...\Bvb\Grid\Deploy\Table.php on line 1666
The line does looks strange. ;-)

The above displays only for View, not for Form (Edit)

2. the Return link is still
http://.../site/basic/gridDetailaddressbook_zfGrid/1
and that causes

Mysqli prepare error: You have an error in your SQL syntax; check the manual 
that
corresponds to your MySQL server version for the right syntax to use near ')' 
at line 3

Original comment by vlatko.b...@gmail.com on 16 Feb 2010 at 7:05

GoogleCodeExporter commented 9 years ago
Hi,

Any changes?

Made some changes that may have interfered...

About the URL, The only thing I do is remove the gridDetail and comm params. 
I'm not
setting the base HTTP_HOST...

Best Regards,
Bento Vilas Boas 

Original comment by pao.fre...@gmail.com on 17 Feb 2010 at 2:12

GoogleCodeExporter commented 9 years ago
Hi,

No changes.

1. Still occurs.

2. I was trying to simplify the URL. The base URL is correct, but the 
gridDetail is
not removed.
Now:        http://localhost/site/basic/gridDetailaddressbook_zfGrid/1
Should be:  http://localhost/site/basic/

This happens only if gridID is set.

In example app, in basicAction change first line to 
        $grid = $this->grid('someGridId');

Original comment by vlatko.b...@gmail.com on 17 Feb 2010 at 6:20

GoogleCodeExporter commented 9 years ago
Hi,

Figured out.

:)

Revision 626

thanks
Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 17 Feb 2010 at 4:35

GoogleCodeExporter commented 9 years ago
Hi,

the Return URL is fixed, :-)

but I'm still getting Notice from Comment 6 above, but the line is 1726 now.

Original comment by vlatko.b...@gmail.com on 17 Feb 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Hi,

Can you check now. 

And if the problem persists, please tell me the line again... 

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 17 Feb 2010 at 5:03

GoogleCodeExporter commented 9 years ago
Solved,

No Notice any more. Tried with Filtered and Paged, works perfectly.

Confirmed and Verified

Original comment by vlatko.b...@gmail.com on 17 Feb 2010 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56