Skip to content

Commit

Permalink
Merge pull request #175 from plone/barceloneta
Browse files Browse the repository at this point in the history
Barceloneta
  • Loading branch information
bloodbare committed Oct 9, 2014
2 parents 9c9a472 + 0633bf8 commit 6680122
Show file tree
Hide file tree
Showing 13 changed files with 112 additions and 93 deletions.
18 changes: 9 additions & 9 deletions plone/app/contenttypes/browser/templates/folder_tabular_view.pt
Expand Up @@ -8,12 +8,12 @@

<body>

<metal:content-core fill-slot="content-core">
<metal:block define-macro="listing" extend-macro="context/folder_listing/macros/content-core">
<metal:entries fill-slot="entries">

<div metal:use-macro="context/batch_macros/macros/navigation" />
<metal:content-core fill-slot="content-core">
<metal:block define-macro="listing" extend-macro="context/folder_listing/macros/content-core">
<metal:entries fill-slot="entries">

<div metal:use-macro="context/batch_macros/macros/navigation" />
<div class="has-table">
<table class="listing"
summary="Content listing"
i18n:attributes="summary summary_content_listing;">
Expand Down Expand Up @@ -86,11 +86,11 @@
</metal:block>
</tbody>
</table>
</div>
</metal:entries>
</metal:block>

</metal:entries>
</metal:block>

</metal:content-core>
</metal:content-core>

</body>
</html>
33 changes: 13 additions & 20 deletions plone/app/contenttypes/browser/templates/image.pt
Expand Up @@ -10,27 +10,20 @@
<metal:content-core fill-slot="content-core">
<metal:block define-macro="content-core"
tal:define="size context/image/getSize">

<a class="discreet"
tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen"
tal:define="scale context/@@images;
img_tag python:scale.scale('image', scale='preview').tag()"
tal:on-error="string: Image cannot be displayed">
<figure class="image-product">
<a class="discreet"
tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen"
tal:define="scale context/@@images;
img_tag python:scale.scale('image', scale='large').tag()"
tal:on-error="string: Image cannot be displayed">
<img tal:replace="structure img_tag" />
<br />
<span class="visualNoPrint">
<img src="" alt="" tal:replace="structure context/search_icon.png" />
<span i18n:translate="label_click_to_view_full_image">Click to view full-size image&hellip;</span>
</span>
</a>

<span class="discreet visualNoPrint">
&mdash;
<span i18n:translate="label_size">Size</span>:
<span tal:replace="python:size/1024">
File size
</span>KB
</span>

<figcaption class="discreet">
<strong class="sr-only" i18n:translate="label_click_to_view_full_image">Click to view full-size image&hellip;</strong>
<span><tal:span i18n:translate="label_size">Size</tal:span>: <tal:span tal:replace="python:size/1024"> File size </tal:span>KB</span>
</figcaption>
</a>
</figure>
</metal:block>
</metal:content-core>
</body>
Expand Down
38 changes: 22 additions & 16 deletions plone/app/contenttypes/browser/templates/image_view_fullscreen.pt
Expand Up @@ -18,25 +18,27 @@
body {
background-color: white;
color: black;
font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
font-size: 69%;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
padding:0;
margin:0;
}

a {
display:block;
margin: 0.5em;
color: #436976;
text-decoration: underline;
line-height:1.5em;
color: #08c;
text-decoration: none;
text-align:center;
}
a:hover {text-decoration:underline;}
a span {
display:block;
line-height:1.5em;
padding:12px;
}

img {
border: 0px;
padding: 5px;
}

#content-core {
text-align: center;
border: 0;
display:block;
margin:0 auto;
}

</style>
Expand All @@ -50,12 +52,16 @@
<a href=""
tal:attributes="href request/HTTP_REFERER"
tal:condition="request/HTTP_REFERER"
><span i18n:translate="label_back_to_site">Back to site</span><br /><tal:block replace="structure context/@@images/image" /></a>
><span i18n:translate="label_back_to_site">Back to site</span>
<tal:block replace="structure context/@@images/image" />
</a>

<a href=""
tal:attributes="href context/portal_url"
tal:condition="not: request/HTTP_REFERER"
><span i18n:translate="label_home">Home</span><br /><tal:block replace="structure context/@@images/image" /></a>
><span i18n:translate="label_home">Home</span>
<tal:block replace="structure context/@@images/image" />
</a>
</div>

</body>
Expand Down
8 changes: 4 additions & 4 deletions plone/app/contenttypes/browser/templates/newsitem.pt
Expand Up @@ -21,21 +21,21 @@
scale_func context/@@images;
scaled_image python: getattr(context.aq_explicit, 'image', False) and scale_func.scale('image', scale='mini')">

<div class="newsImageContainer"
<figure class="newsImageContainer"
tal:condition="python: scaled_image">
<a href="#"
tal:define="here_url context/@@plone_context_state/object_url;
large_image python: scale_func.scale('image', scale='large');"
tal:attributes="href large_image/url">
<img tal:replace="structure python: scaled_image.tag(css_class='newsImage')" />

<p class="discreet"
<figcaption
tal:condition="context/image_caption|nothing"
tal:content="structure context/image_caption" >
</p>
</figcaption>

</a>
</div>
</figure>


<div id="parent-fieldname-text"
Expand Down
82 changes: 48 additions & 34 deletions plone/app/contenttypes/tests/robot/keywords.txt
@@ -1,11 +1,13 @@
*** Settings ***

Library Remote ${PLONE_URL}/RobotRemote

Variables plone/app/contenttypes/tests/robot/variables.py

*** Keywords ***

I am logged in as site owner
# TODO: Replace with autologin
Log in admin secret
Wait until page contains You are now logged in
Enable autologin as Site Administrator

Click Edit
Click Link xpath=//a[contains(., "Edit")]
Expand All @@ -16,27 +18,33 @@ Click Edit

a collection
[Arguments] ${title}
Go to ${PLONE_URL}/++add++Collection
Wait until page contains Add Collection
Input text name=form.widgets.IDublinCore.title ${title}
Click Button Save
Wait until page contains Item created
[Return] ${uid}
${uid} = Create content type=Collection title=${title}
# Go to ${PLONE_URL}/++add++Collection
# Wait until page contains Add Collection
# Input text name=form.widgets.IDublinCore.title ${title}
# Click Button Save
# Wait until page contains Item created

a document
[Arguments] ${title}
Go to ${PLONE_URL}/++add++Document
Wait until page contains Add Page
Input text name=form.widgets.IDublinCore.title ${title}
Click Button Save
Wait until page contains Item created
[Return] ${uid}
${uid} = Create content type=Document title=${title}
# Go to ${PLONE_URL}/++add++Document
# Wait until page contains Add Page
# Input text name=form.widgets.IDublinCore.title ${title}
# Click Button Save
# Wait until page contains Item created

a event
[Arguments] ${title}
Go to ${PLONE_URL}/++add++Event
Wait until page contains Add Event
Input text name=form.widgets.IDublinCore.title ${title}
Click Button Save
Wait until page contains Item created
[Return] ${uid}
${uid} = Create content type=Event title=${title}
# Go to ${PLONE_URL}/++add++Event
# Wait until page contains Add Event
# Input text name=form.widgets.IDublinCore.title ${title}
# Click Button Save
# Wait until page contains Item created

a file
[Arguments] ${title}
Expand All @@ -49,11 +57,13 @@ a file

a folder
[Arguments] ${title}
Go to ${PLONE_URL}/++add++Folder
Wait until page contains Add Folder
Input text name=form.widgets.IDublinCore.title ${title}
Click Button Save
Wait until page contains Item created
[Return] ${uid}
${uid} = Create content type=Folder title=${title}
# Go to ${PLONE_URL}/++add++Folder
# Wait until page contains Add Folder
# Input text name=form.widgets.IDublinCore.title ${title}
# Click Button Save
# Wait until page contains Item created

a image
[Arguments] ${title}
Expand All @@ -66,11 +76,13 @@ a image

a link
[Arguments] ${title}
Go to ${PLONE_URL}/++add++Link
Wait until page contains Add Link
Input text name=form.widgets.IDublinCore.title ${title}
Click Button Save
Wait until page contains Item created
[Return] ${uid}
${uid} = Create content type=Link title=${title}
# Go to ${PLONE_URL}/++add++Link
# Wait until page contains Add Link
# Input text name=form.widgets.IDublinCore.title ${title}
# Click Button Save
# Wait until page contains Item created

a news item
[Arguments] ${title}
Expand Down Expand Up @@ -131,17 +143,19 @@ fill date field

I set the criteria ${type} in row ${number} to the option '${label}'
${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})
Wait until page contains Element css=${criteria_row} .querystring-criteria-${type} .select2-choice
Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choice
Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choice
Wait until page contains Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]
Click Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]
Wait until page contains element css=.select2-input.select2-focused
Input text css=.select2-input.select2-focused ${label}\n
# Click Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]

I set the criteria ${type} in row ${number} to the options '${label}'
${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})
Wait until page contains Element css=${criteria_row} .querystring-criteria-${type} .select2-choices
Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choices
Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choices
Wait until page contains Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]
Click Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]
Wait until page contains element css=.select2-input.select2-focused
Input text css=.select2-input.select2-focused ${label}\n
# Click Element xpath=//div[@class='select2-result-label']/descendant-or-self::*[contains(text(), '${label}')]

I set the criteria ${type} in row ${number} to the text '${label}'
${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})
Expand Down
Expand Up @@ -38,6 +38,7 @@ a test user document

I set the collection's creator criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit
Wait until page contains Edit Collection
I set the criteria index in row 1 to the option 'Creator'
Expand Down
Expand Up @@ -47,6 +47,7 @@ a folder '${folder-id}' with a document '${document-title}'

I set the collection's relative location criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit

I set the criteria index in row 1 to the option 'Location'
Expand All @@ -58,6 +59,7 @@ I set the collection's relative location criterion to

I set the collection's absolute location criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit

I set the criteria index in row 1 to the option 'Location'
Expand Down
Expand Up @@ -24,16 +24,16 @@ Scenario: Test Review state Criterion

a published document
[Arguments] ${title}
a document ${title}
Click link css=#plone-contentmenu-workflow a.actionMenuHeader
Click Link workflow-transition-publish
${uid} = a document ${title}
Fire transition ${uid} publish

a private document
[Arguments] ${title}
a document ${title}

I set the collection's review state criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit

I set the criteria index in row 1 to the option 'Review state'
Expand Down
Expand Up @@ -24,9 +24,10 @@ Test Short name (id) Criterion

I set the collection short name (id) criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit

I set the criteria index in row 1 to the option 'Short name (id)'
I set the criteria index in row 1 to the option 'Short name'
I set the criteria operator in row 1 to the option 'Is'
I set the criteria value in row 1 to the text '${criterion}'

Expand Down
Expand Up @@ -24,6 +24,7 @@ Test Type Criterion

I set the collection's type criterion to
[Arguments] ${criterion}
Go to ${PLONE_URL}/my-collection
Click Edit

I set the criteria index in row 1 to the option 'Type'
Expand Down
Expand Up @@ -67,4 +67,4 @@ def test_toc_viewlet_shows_up(self):
toc_ctl.value = [u"selected"]
# Submit form
self.browser.getControl('Save').click()
self.assertTrue('<dl id="document-toc"' in self.browser.contents)
self.assertTrue('<section id="document-toc"' in self.browser.contents)
7 changes: 4 additions & 3 deletions plone/app/contenttypes/tests/test_setup.py
Expand Up @@ -39,7 +39,8 @@ def test_browserlayer_available(self):
)

def test_css_registered(self):
cssreg = getattr(self.portal, 'portal_css')
stylesheets_ids = cssreg.getResourceIds()
resreg = getattr(self.portal, 'portal_registry')
from Products.CMFPlone.interfaces import IResourceRegistry
resources_ids = resreg.collectionOfInterface(IResourceRegistry, prefix="plone.resources").keys()
self.assertTrue(
'++resource++collection.css' in stylesheets_ids)
'resource-collection-css' in resources_ids)
4 changes: 2 additions & 2 deletions test-plone-4.3.x.cfg
Expand Up @@ -115,11 +115,11 @@ plone.app.jquery = 1.8.3

# testing
plone.app.testing = 4.2.4
plone.app.robotframework = 0.8.1
plone.app.robotframework = 0.9.5
robotframework = 2.8.4
robotframework-selenium2library = 1.5.0
robotsuite = 1.4.3
selenium = 2.39.0
selenium = 2.43.0
robotframework-selenium2screenshots = 0.4.0
sphinxcontrib-robotframework = 0.4.3
Pygments = 1.6
Expand Down

0 comments on commit 6680122

Please sign in to comment.