Commit graph

530 commits

Author SHA1 Message Date
euromark
e94d307ee1 code conventions 2012-02-25 19:46:05 -05:00
Tigran Gabrielyan
95ba5f45a5 Keeping code dry in HtmlHelper::getCrumbs/getCrumbList 2012-02-21 11:38:13 -08:00
Mark Story
f138c73a77 Merge pull request #483 from tigrang/getCrumbList-enhancement
Added `startText` feature to HtmlHelper::getCrumbList()
2012-02-21 18:24:16 -08:00
Kyle Robinson Young
45ec5d73c5 Add missing visibility keywords 2012-02-16 23:13:12 -08:00
Jose Lorenzo Rodriguez
715c848577 Bringing theme code up to date with 2.0, cleaning logic a bit 2012-02-20 17:21:04 -04:30
Jose Lorenzo Rodriguez
02fa1ae60b Fixing a few failing test cases 2012-02-20 16:17:59 -04:30
Jose Lorenzo Rodriguez
ea79ba81a4 Adding a simpler solution to the missing view files problem without altering the built paths in App 2012-02-20 15:39:03 -04:30
Jose Lorenzo Rodriguez
cec9d2e615 Revert "Adding bake skeleton's view directory to view paths list to avoid promlems with existing installation due to file moving done in earlier commit."
This reverts commit 5c792aa831.
2012-02-20 15:21:03 -04:30
Majna
0cd9a93e9e Remove unused variables and statements. 2012-02-17 21:10:43 +01:00
Majna
1dbafe1d4f Fix docblocks. 2012-02-17 13:51:20 +01:00
Tigran Gabrielyan
af2fd03590 Added startText feature to HtmlHelper::getCrumbList() 2012-02-16 19:17:43 -08:00
ADmad
5c792aa831 Adding bake skeleton's view directory to view paths list to avoid promlems with existing installation due to file moving done in earlier commit. 2012-02-16 18:15:12 +05:30
Mark Story
df0d1d681f Merge pull request #479 from slygoncito/0dace174a79b87a2a196cc2bc94dbb009b705878
Option 'currentClass' always defaults to 'current'.
2012-02-15 20:05:50 -08:00
Slygoncito
0dace174a7 Option 'currentClass' always defaults to 'current'. 2012-02-16 00:11:43 -03:00
ADmad
90f4c03627 Moving view files from core to app 2012-02-16 01:58:11 +05:30
ADmad
55f63bbd5b Fixing error message. Closes #2579 2012-02-15 12:41:01 +05:30
mark_story
27367b491a Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/View/Helper/TextHelperTest.php
	lib/Cake/View/Helper/TextHelper.php
2012-02-14 21:55:21 -05:00
Rachman Chavik
89d4b58073 fix indentation and add __construct() docblocks 2012-02-14 23:28:57 +07:00
Rachman Chavik
5eb1979b04 rename protected variable to $_engine 2012-02-14 23:28:57 +07:00
Rachman Chavik
fe479c636c adding tests for engine overrides 2012-02-14 23:28:57 +07:00
Vinícius Krolow
07adcfe2f7 fixing regex of autoLinks to work with urls that have www 2012-02-14 11:08:37 -02:00
Rachman Chavik
d6fd051fb4 changing methods in CakeTime class to static 2012-02-14 09:34:36 +07:00
Rachman Chavik
9624c27ef4 changing methods in CakeNumber class to static 2012-02-14 09:34:36 +07:00
Rachman Chavik
abd6d22445 changing methods in String class to static 2012-02-14 09:34:36 +07:00
mark_story
afecb713ab Make button type nullable.
Fixes #GH365
2012-02-13 21:00:57 -05:00
mark_story
2afb05b590 Merge branch '2.0' into 2.1
Conflicts:
	app/View/Pages/home.ctp
	lib/Cake/Config/config.php
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/NumberHelper.php
2012-02-12 10:06:13 -05:00
ADmad
e1dba6798f Added missing echos 2012-02-11 13:53:46 +05:30
Kyle Robinson Young
730ac10ae4 Add missing options to NumberHelper docblocks 2012-02-10 22:17:58 -08:00
ADmad
83e8d436f8 Fixing docbloc and adding tests for FormHelper::tagIsInvalid(). Refs #2562 2012-02-11 06:09:58 +05:30
Rachman Chavik
2dc9986fad moving methods from TextHelper to String 2012-02-10 22:25:59 +07:00
Rachman Chavik
6fdaef10c8 moving NumberHelper to CakeNumber 2012-02-10 22:25:59 +07:00
Rachman Chavik
04cdef9126 moving TimeHelper to CakeTime 2012-02-10 22:25:59 +07:00
ADmad
e2b273e891 Renaming option type to tag to avoid potential conflict in future with html attribute. 2012-02-10 19:44:55 +05:30
ADmad
7a42290021 $options param in Helper::assetUrl() now defaults to empty array. 2012-02-10 19:05:15 +05:30
ADmad
be694d8d6b Allowed specifying media path using 'src' attribute 2012-02-10 13:06:55 +05:30
mark_story
bea50f5246 Fix whitespace. 2012-02-09 20:00:25 -05:00
Mark Story
ae9ff9fbd0 Merge pull request #421 from tigrang/plugin-assets
Plugin.asset support for HtmlHelper::css , script, and image
2012-02-08 17:31:44 -08:00
Yasushi Ichikawa
e8a9d93eb5 Add params option to logQuery()
Parameters for prepared statements are now part of the
logged query data.
2012-02-08 20:15:40 -05:00
Tigran Gabrielyan
7fe6a4d5ea Added Plugin.asset support for HtmlHelper css(), script(), and image() with tests 2012-02-07 20:20:50 -08:00
ADmad
bf700c826a Made specifying 'extension' optional. Fixed bug where downloaded file did not have extension when 'name' was specified. Fixes #2554 2012-02-08 01:08:04 +05:30
ADmad
b6f99bc0b9 Refactored Helper::assetUrl() a bit and added test cases. 2012-02-07 03:25:59 +05:30
ADmad
c0690a3eff Added reponse object as property of View class View::$response. Refactored HtmlHelper::media() a bit. 2012-02-06 20:45:00 +05:30
ADmad
c57275636c Replacing HtmlHelper::video() with HtmlHelper::media() which can generate either audio or video element 2012-02-06 18:57:16 +05:30
ADmad
2f7f00daa2 "preload" is not a minimized attribute 2012-02-06 12:37:13 +05:30
Jose Lorenzo Rodriguez
5886b25345 Releasing 2.0.6 2012-02-05 19:33:52 -04:30
ADmad
22220074f2 Added HtmlHelper::video() for html5 video element generation. Extracted asset url generation code to new function Helper::assetUrl(). 2012-02-06 01:30:38 +05:30
ADmad
12bf1348f5 Merge branch '2.0' into 2.1 2012-02-05 17:55:46 +05:30
ADmad
b5c7ca2ee9 Added self closing tag format. 2012-02-05 17:43:23 +05:30
mark_story
94778ef673 Add block option to HtmlHelper::scriptBlock() 2012-01-31 22:20:21 -05:00
Stefano Zoffoli
edeca2fd3c Fix for extending plugin's view
Signed-off-by: mark_story <mark@mark-story.com>
2012-01-31 21:04:21 -05:00
mark_story
a275555297 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/CakeSession.php
2012-01-29 15:38:56 -05:00
Tigran Gabrielyan
30d6341e7f Fixed bug in CacheHelper where PluginAppController was not being loaded
Signed-off-by: mark_story <mark@mark-story.com>
2012-01-28 22:35:42 -05:00
Majna
d7b06194a4 Add option for 'current' class to PaginationHelper::numbers(). 2012-01-28 18:24:28 +01:00
Ceeram
7eda0affe3 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/View/ThemeView.php
2012-01-26 21:40:18 +01:00
ADmad
00649cbdde Updating minimum PHP version requirement to 5.2.8 due to PHP bugs #44251 and #45748. Closes #2509 2012-01-26 17:56:42 +05:30
mark_story
5b9d69fcc8 Update image() docs. 2012-01-25 21:14:01 -05:00
Mark Story
7cfd27e7f6 Merge pull request #419 from radig/2.1
Fix HtmlHelper::link test and extend HtmlHelper::image (issue #2476)
2012-01-25 18:05:56 -08:00
AD7six
ecbe337052 Make extending a missing element throw an exception
A layout extending a missing layout throws a missing-layout exception
A view extendinga missing view throws a missing-view exception
Now, an element extending a missing element throws a logic exception

in addition "absolute" paths can be used such that (using elements as an
example)

$this->extend('foo') - extends View/Elements/foo.ctp
$this->extend('/foo') - extends View/foo.ctp

Closes #2504
2012-01-25 13:04:45 +01:00
AD7six
11ed1e6ea5 Merge branch '2.1' of github.com:cakephp/cakephp into 2.1 2012-01-24 13:55:56 +01:00
AD7six
def96c0460 throw an exception if the view you try to extend doesn't exist
or element, or layout
2012-01-24 13:54:39 +01:00
Ceeram
95aa7e32c3 include theme in _passedVars array 2012-01-24 10:42:18 +01:00
mark_story
354716cf60 Fix issues with sparse arrays in ThemeView.
Fixes #2500
2012-01-23 20:22:06 -05:00
Kyle Robinson Young
f69edb5c80 Remove incorrect parameter in HtmlHelper::script docblock example
Fixes #76
2012-01-23 16:01:38 -08:00
José Lorenzo Rodríguez
5cc2860c41 Merge pull request #437 from josegonzalez/2.1-theme-view
2.1 theme view
2012-01-22 12:52:00 -08:00
Jose Diaz-Gonzalez
c2519e702d Merging ThemeView and View class
In 2.1, the ThemeView is merely a small wrapper around View with extra paths set. Merging these two classes means there is one less property for developers to set to enable themes in their applications.
2012-01-22 15:45:26 -05:00
mark_story
df5d9ac3d1 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Routing/RouterTest.php
2012-01-20 20:28:15 -05:00
wnasich
c95ab282dc Test case and Fix for: Number::currency() issue
Fixes currency() for custom formats and numbers between -1 and 1.

Fixes #2489

Conflicts:

	lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
	lib/Cake/View/Helper/NumberHelper.php
2012-01-19 21:07:27 -05:00
Cauan Cabral
03bac42366 Change fullPath option to fullBase in HtmlHelper::image for consistency
Updated test cases for that.
Included doc block about that option.
2012-01-18 08:32:40 -03:00
Cauan Cabral
90426674cb Merge branch 'master' into 2.1 2012-01-17 23:18:54 -03:00
Cauan Cabral
0c0135ff5e Option to return img src with fullpath address 2012-01-17 22:55:24 -03:00
Bob Fanger
5cb974ee70 Fixes the MethodNotAllowed when deleting a model from an scaffolding view.ctp page 2012-01-16 16:21:06 +01:00
AD7six
67f4fa0f20 Merge branch '2.1' of github.com:cakephp/cakephp into 2.1 2012-01-15 01:03:48 +01:00
AD7six
22f844c48f prevent block="css" when using inline=false css 2012-01-15 01:03:17 +01:00
mark_story
c89c49c310 Enhance HtmlHelper::getCrumbs() $startText param
It now accepts an array which gives more control and flexibilibity
over the first breadcrumb link.

Fixes #2475
2012-01-14 13:14:26 -05:00
Ceeram
7badb1d252 fix magic __isset() 2012-01-14 12:42:10 -05:00
mark_story
0f8e1500de Ensure helpers are loaded in data views.
Both XmlView and JsonView should load helpers when
they use view files.

Fixes #2465
2012-01-11 20:21:56 -05:00
mark_story
d238d8c0bb Fix incorrect __isset().
There was a missing $ before name.  Fixes issues
with dynamic properties not being handled correctly.

Fixes #2450
2012-01-09 21:47:57 -05:00
Jose Lorenzo Rodriguez
fa99b58622 Ensuring the javascript provider class is loaded before checking method on it 2012-01-07 18:03:22 -04:30
mark_story
9562638610 Merge branch '2.0' into 2.1 2012-01-04 07:39:35 -05:00
mark_story
3e1c567f08 Remove duplicate methods.
Fix regression where #1345 was re-introduced.
Fixes #2434
2012-01-03 21:11:45 -05:00
mark_story
6c902a19b3 Fix issue with rendering elements inside blocks.
Fixes exceptions being raised when you tried to render
elements inside blocks.  Instead compare the number of open blocks.
This should not change before/after rendering a view.
2011-12-30 14:56:31 -05:00
mark_story
3478f8a627 Merge branch '2.0' into 2.1 2011-12-30 10:19:51 -05:00
Mark Story
a4e3790196 Merge pull request #387 from shama/patch-text-truncate
Prevent TextHelper::truncate() from breaking HTML
2011-12-30 07:15:35 -08:00
mark_story
23178df504 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/FormHelper.php
2011-12-29 20:03:42 -05:00
mark_story
9cdf8042bf Fix issue with scripts_for_layout compatibility. 2011-12-29 11:58:05 -05:00
Ceeram
929a40364f adding magic method__isset() for overloaded properties 2011-12-29 16:22:08 +01:00
mark_story
339259c841 Update version to 2.0.5 2011-12-28 22:00:12 -05:00
Jose Lorenzo Rodriguez
a47c8160dd Merge remote-tracking branch 'origin/2.1' into 2.1 2011-12-28 19:29:48 -04:30
mark_story
0b9b23fe38 Fix caching of paths when a plugin param is used.
Plugin paths should not be cached as it makes subsequent look-ups
behave incorrectly.
2011-12-27 19:24:16 -05:00
mark_story
69b1c33f1f Fix extending in loops. 2011-12-27 19:24:16 -05:00
mark_story
70981d05ca Throw an exception when a view extends itself. 2011-12-27 19:24:15 -05:00
mark_story
047e93e285 Clean up internal API's
- There was some duplication in element() for handing plugins.
- Deprecate options[plugin] for element()
- Add file omitted in previous commit.
2011-12-27 19:24:15 -05:00
Ceeram
d8cbe8a1f7 Cleaning up
- Adding docblock
- Adding visibility keyword
- Update assertion methods.
- Split up tests into smaller methods.
2011-12-27 19:23:52 -05:00
Ceeram
a72ccf28e3 accept dot syntax for element,view and layout filename from plugins fixes #2247 2011-12-27 19:22:21 -05:00
Mark Story
7f46ede097 Add more complete api docs for label()
Fixes #2415
2011-12-27 10:08:54 -05:00
Jose Lorenzo Rodriguez
35ecbfebde Making the CakeEvent -> ObjectCollection bridge more intelligent, adding tests 2011-12-25 23:17:08 -04:30
Jose Lorenzo Rodriguez
078a2dfd72 Migrating View and Helpers events to use the CakeEvenManager 2011-12-25 19:00:19 -04:30
Kyle Robinson Young
acca796d10 Fix tag order when closing open tags with TextHelper::truncate() 2011-12-25 09:10:50 -08:00
Kyle Robinson Young
4e7e06fa9f Prevent TextHelper::truncate() from breaking HTML
Fixes #2397
2011-12-24 21:25:07 -08:00
mark_story
2c0e030831 Move call to tagIsInvalid to FormHelper
tagIsInvalid() doesn't exist in Helper, and shouldn't be
called from that class.

Fixes #2411
2011-12-23 20:41:16 -05:00
ADmad
389072708a Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Utility/Debugger.php
2011-12-22 03:15:04 +05:30
euromark
a41539dfa4 Indentation fix (tab instead of spaces)
Fixes #2398

Conflicts:

	lib/Cake/Test/Case/Console/Command/ShellTest.php

Signed-off-by: mark_story <mark@mark-story.com>
2011-12-20 22:26:43 -05:00
mark_story
c272a8b3ca Update doc blocks. 2011-12-19 22:13:02 -05:00
mark_story
c13e6588f5 Datetime labels should point at the first input.
Label elements generated for datetime/date/time inputs should point
at the first generated input. Apply + update patch from MrRio.

Fixes #427
2011-12-19 22:09:46 -05:00
mark_story
866177f37d Fix issue with link generation and no title.
Fix urlencoded text from being displayed in text of links.

Fixes #2387
2011-12-19 20:49:01 -05:00
Kyle Robinson Young
5225fe2b5c Ability to set hiddenField value with FormHelper::checkbox
Fixes #1811
2011-12-18 23:34:19 -08:00
Kyle Robinson Young
c34bf673d5 Remove extra space in HtmlHelper radio tag 2011-12-18 09:40:23 -08:00
Kyle Robinson Young
c93dab69a3 Correct placement of between on FormHelper radio and input
Fixes #1992
2011-12-18 08:25:42 -08:00
mark_story
0607437abd Fix various failing tests. 2011-12-17 23:50:41 -05:00
mark_story
e9779e7126 Fix failing test in Debugger test case. 2011-12-17 22:53:21 -05:00
mark_story
3b57704a27 Update doc blocks. 2011-12-17 22:23:37 -05:00
mark_story
0b0a69de1e Update default layouts to use blocks. 2011-12-17 22:23:37 -05:00
mark_story
46bb6c8ad6 Adding tests and functionality for nested blocks. 2011-12-17 22:23:37 -05:00
mark_story
f0f3eb9ba9 Fix a few outstanding issues with blocks.
- Blocks left open after rendering files should trigger
  an exception.
- Fix strict errors.
- Correct doc blocks.
2011-12-17 22:23:37 -05:00
mark_story
bcb8444ab1 Make CacheHelper able to handle nocache tags in elements.
Using afterRenderFile() instead of afterRender() allows
CacheHelper to parse content in elements and extended views.
2011-12-17 22:23:37 -05:00
mark_story
fb20841d25 Doing some internal re-factoring in CacheHelper.
cache() should only do one thing.
It shouldn't do more work than is necessary each time its called.
Flatten some of the conditions by extracting methods.
2011-12-17 22:23:37 -05:00
mark_story
a8f0eb2b49 Making afterViewFile callbacks able to modify the rendered content
CacheHelper will need this.
2011-12-17 22:23:36 -05:00
mark_story
dcf8c0fd04 Re-factoring duplicated code out. 2011-12-17 22:23:36 -05:00
mark_story
44a8d7907e Deprecating View::$output.
Replacing it with a magic __get/__set to the content block.
This helps deprecate $content_for_layout as well.
2011-12-17 22:23:36 -05:00
mark_story
c49e261eba Adding new callbacks into View. 2011-12-17 22:23:36 -05:00
mark_story
3fe79564b5 Adding new callbacks - testing them out. 2011-12-17 22:23:35 -05:00
mark_story
d8c6594ff6 Adding constants and a property to track the current type.
This helps with resolving parent elements.
2011-12-17 22:23:35 -05:00
mark_story
9b2fd8f251 Extracting ViewBlock from View.
View was getting too fat.
2011-12-17 22:23:35 -05:00
mark_story
e06895ef91 Adding view files for tests.
Adding test case for elements + extending
Making elements extend each other.
2011-12-17 22:23:35 -05:00
mark_story
b6919a0268 Starting the extend() feature.
Adding a simple test case.
Still need to add callbacks around every view fragment rendered.
Without that CacheHelper will not be able to cache extended views
correctly.
2011-12-17 22:23:35 -05:00
mark_story
b866c00318 Renaming methods so they are shorter and still make sense. 2011-12-17 22:23:35 -05:00
mark_story
82139fe8f6 Updating HtmlHelper to allow custom blocks.
Adding tests for blocks.
Adding missing tests.
2011-12-17 22:23:34 -05:00
mark_story
7854f9dd52 Add View::getBlock()
View::get() had two jobs.  That's almost always a bad thing.
Add a new method instead.
2011-12-17 22:23:34 -05:00
Mark Story mark@mark-story.com
90f035c54d Updating block appending to work better. 2011-12-17 22:23:34 -05:00
Mark Story
6d425dfbcb Adding Backwards compatibility for $scripts_for_layout. 2011-12-17 22:23:34 -05:00
Mark Story
4606ea39a9 Updating HtmlHelper and its tests to use View::append(). 2011-12-17 22:23:34 -05:00
Mark Story
bd4ee41e24 Deprecating addScript() its replaced by blocks feature.
Adding View::blocks() for getting the list of blocks.
2011-12-17 22:23:33 -05:00
Mark Story
9107913c07 Implementing basic features of view 'blocks' 2011-12-17 22:23:33 -05:00
mark_story
78325a13b9 Remove un-used variable.
Fixes #2382
2011-12-16 23:02:27 -05:00
Kyle Robinson Young
d794084d38 More code standards formatting 2011-12-15 23:00:07 -08:00
Kyle Robinson Young
51f9837db4 Code standards formatting 2011-12-15 22:52:07 -08:00
Kyle Robinson Young
5110b976f8 Update api link to 2.0 on default home page 2011-12-13 04:47:08 -08:00
mark_story
2e8498e166 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Console/TaskCollectionTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
mark_story
8bb6f8803c Fix infinite loop when minYear/maxYear are not int.
Refs #2361
2011-12-11 22:11:14 -05:00
Kyle Robinson Young
c836ba08a3 Add/move docblocks to make text available in the API docs 2011-12-08 07:35:02 -08:00
ADmad
df097796c4 Fixing incorrect setting of default value for 'onDomReady' option in JsHelper::writeBuffer() 2011-12-08 14:03:39 +05:30
mark_story
64eb38a953 Fix disabled + SecurityComponent
Disabled inputs should be omitted from the secured fields.
This will enable forms to submit successfully as long as those
inputs stay excluded from the form submission.

Fixes #2333
2011-12-07 22:30:40 -05:00
mark_story
123a1a21ba Fix issues with stack trace output.
Traces without files and without classes caused errors in printing
the fancy trace.
2011-12-07 21:19:57 -05:00
Kyle Robinson Young
1e1c7a036d Code consistency formatting tweaks 2011-12-06 12:52:48 -08:00
Kyle Robinson Young
7f22fcdbf5 Fix TextHelper excerpt method to work as documented
Fixes #2339
2011-12-05 12:12:09 -08:00
ADmad
72497147bd Changing default docType to 'html5' 2011-12-05 07:04:00 +05:30
mark_story
457dd73ed0 Move viewVars assignment after callbacks.
Assigning the controller viewVars after callbacks
allows the controller callbacks to assign additional
viewVars, or manipulate existing ones.

Fixes #2335
2011-12-03 14:45:21 -05:00
mark_story
6d269ce25d Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Console/Command/TestsuiteShell.php
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Model/Datasource/Database/Sqlite.php
	lib/Cake/Test/Case/Model/ModelTestBase.php
	lib/Cake/Test/Case/Routing/DispatcherTest.php
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2011-12-03 13:45:28 -05:00
Kyle Robinson Young
8197f87dbc Spelling and grammar fixes 2011-12-01 21:58:09 -08:00
Kyle Robinson Young
94e119fe67 Adhere to code formatting standard 2011-11-30 23:21:31 -08:00