MDL-75498 mod_data: add new tags to presets
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
<div class="imagegallery-addentry">
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Title</div>
|
||||
<div class="font-weight-bold">[[title#name]]</div>
|
||||
[[title]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Image</div>
|
||||
<div class="font-weight-bold">[[image#name]]</div>
|
||||
[[image]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Description</div>
|
||||
<div class="font-weight-bold">[[description#name]]</div>
|
||||
[[description]]
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Title</div>
|
||||
<div class="font-weight-bold mb-2">[[title#name]]</div>
|
||||
[[title]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Description</div>
|
||||
<div class="font-weight-bold mb-2">[[description#name]]</div>
|
||||
[[description]]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,5 +27,6 @@
|
||||
<div class="row singleentry-image">
|
||||
<div class="col">[[image]]</div>
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,3 +90,29 @@ Feature: Users can use the Image gallery preset
|
||||
And I press "Save"
|
||||
Then I should see "New image"
|
||||
And I should see "This is the description for the new image."
|
||||
|
||||
@javascript
|
||||
Scenario: Image gallery. Renaming a field should affect the template
|
||||
Given I am on the "Mountain landscapes" "data activity" page logged in as teacher1
|
||||
And I navigate to "Fields" in current page administration
|
||||
And I open the action menu in "title" "table_row"
|
||||
And I choose "Edit" in the open action menu
|
||||
And I set the field "Field name" to "Edited field name"
|
||||
And I press "Save"
|
||||
And I should see "Field updated"
|
||||
When I navigate to "Database" in current page administration
|
||||
Then I click on "Advanced search" "checkbox"
|
||||
And I should see "Edited field name"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Edited field name"
|
||||
|
||||
@javascript
|
||||
Scenario: Image gallery. Has otherfields tag
|
||||
Given the following "mod_data > fields" exist:
|
||||
| database | type | name | description |
|
||||
| data1 | text | Extra field | Test field description |
|
||||
And I am on the "Mountain landscapes" "data activity" page logged in as teacher1
|
||||
When I select "Single view" from the "jump" singleselect
|
||||
Then I should see "Extra field"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Extra field"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<div class="journal-addentry">
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Title</div>
|
||||
<div class="font-weight-bold">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Content</div>
|
||||
<div class="font-weight-bold">[[Content#name]]</div>
|
||||
[[Content]]
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Title</div>
|
||||
[[title]]
|
||||
<div class="font-weight-bold mb-2">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Content</div>
|
||||
[[content]]
|
||||
<div class="font-weight-bold mb-2">[[Content#name]]</div>
|
||||
[[Content]]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
<div class="singleentry-content">
|
||||
[[Content]]
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,3 +76,27 @@ Feature: Users can use the Journal preset
|
||||
And I press "Save"
|
||||
Then I should see "This is the title"
|
||||
And I should see "This is the content for the new entry."
|
||||
|
||||
@javascript
|
||||
Scenario: Journal. Renaming a field should affect the template
|
||||
Given I am on the "Student reflections" "data activity" page logged in as teacher1
|
||||
And I navigate to "Fields" in current page administration
|
||||
And I open the action menu in "Content" "table_row"
|
||||
And I choose "Edit" in the open action menu
|
||||
And I set the field "Field name" to "Edited field name"
|
||||
And I press "Save"
|
||||
And I should see "Field updated"
|
||||
When I navigate to "Database" in current page administration
|
||||
Then I click on "Advanced search" "checkbox"
|
||||
And I should see "Edited field name"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Edited field name"
|
||||
|
||||
@javascript
|
||||
Scenario: Journal. Has otherfields tag
|
||||
Given the following "mod_data > fields" exist:
|
||||
| database | type | name | description |
|
||||
| data1 | text | Extra field | Test field description |
|
||||
And I am on the "Student reflections" "data activity" page logged in as teacher1
|
||||
When I click on "Add entry" "button"
|
||||
Then I should see "Extra field"
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<div class="proposals-addentry">
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Title</div>
|
||||
<div class="font-weight-bold">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Status</div>
|
||||
<div class="font-weight-bold">[[Status#name]]</div>
|
||||
[[Status]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Summary</div>
|
||||
<div class="font-weight-bold">[[Summary#name]]</div>
|
||||
[[Summary]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Content</div>
|
||||
<div class="font-weight-bold">[[Content#name]]</div>
|
||||
[[Content]]
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Title</div>
|
||||
<div class="font-weight-bold mb-2">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Status</div>
|
||||
<div class="font-weight-bold mb-2">[[Status#name]]</div>
|
||||
[[Status]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Summary</div>
|
||||
<div class="font-weight-bold mb-2">[[Summary#name]]</div>
|
||||
[[Summary]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Content</div>
|
||||
<div class="font-weight-bold mb-2">[[Content#name]]</div>
|
||||
[[Content]]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
|
||||
<div class="proposals-single-body">
|
||||
<div class="row my-3">
|
||||
<div class="col-3 col-md-1"><strong>Status</strong></div>
|
||||
<div class="col-3 col-md-1"><strong>[[Status#name]]</strong></div>
|
||||
<div class="col">[[Status]]</div>
|
||||
</div>
|
||||
<div class="row singleentry-summary">
|
||||
<div class="col">
|
||||
<h3 class="my-5">Summary</h3>
|
||||
<h3 class="my-5">[[Summary#name]]</h3>
|
||||
[[Summary]]
|
||||
</div>
|
||||
</div>
|
||||
<div class="row singleentry-content">
|
||||
<div class="col">
|
||||
<h3 class="my-5">Content</h3>
|
||||
<h3 class="my-5">[[Content#name]]</h3>
|
||||
[[Content]]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,21 +23,22 @@
|
||||
<div class="proposals-single-body">
|
||||
<div class="row singleentry-status">
|
||||
<div class="col">
|
||||
<h3 class="my-5">Status</h3>
|
||||
<h3 class="my-5">[[Status#name]]</h3>
|
||||
[[Status]]
|
||||
</div>
|
||||
</div>
|
||||
<div class="row singleentry-summary">
|
||||
<div class="col">
|
||||
<h3 class="my-5">Summary</h3>
|
||||
<h3 class="my-5">[[Summary#name]]</h3>
|
||||
[[Summary]]
|
||||
</div>
|
||||
</div>
|
||||
<div class="row singleentry-content">
|
||||
<div class="col">
|
||||
<h3 class="my-5">Content</h3>
|
||||
<h3 class="my-5">[[Content#name]]</h3>
|
||||
[[Content]]
|
||||
</div>
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,3 +94,31 @@ Feature: Users can use the Proposals preset
|
||||
And I should see "Approved"
|
||||
And I should see "This is the summary for the new entry."
|
||||
And I should see "This is the content for the new entry."
|
||||
|
||||
@javascript
|
||||
Scenario: Proposals. Renaming a field should affect the template
|
||||
Given I am on the "Student projects" "data activity" page logged in as teacher1
|
||||
And I navigate to "Fields" in current page administration
|
||||
And I open the action menu in "Summary" "table_row"
|
||||
And I choose "Edit" in the open action menu
|
||||
And I set the field "Field name" to "Edited field name"
|
||||
And I press "Save"
|
||||
And I should see "Field updated"
|
||||
When I navigate to "Database" in current page administration
|
||||
Then I click on "Advanced search" "checkbox"
|
||||
And I should see "Edited field name"
|
||||
And I select "Single view" from the "jump" singleselect
|
||||
And I should see "Edited field name"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Edited field name"
|
||||
|
||||
@javascript
|
||||
Scenario: Proposals. Has otherfields tag
|
||||
Given the following "mod_data > fields" exist:
|
||||
| database | type | name | description |
|
||||
| data1 | text | Extra field | Test field description |
|
||||
And I am on the "Student projects" "data activity" page logged in as teacher1
|
||||
When I select "Single view" from the "jump" singleselect
|
||||
Then I should see "Extra field"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Extra field"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="resources-addentry">
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Title</div>
|
||||
<div class="font-weight-bold">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -8,7 +8,7 @@
|
||||
[[Author]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Cover</div>
|
||||
<div class="font-weight-bold">[[Cover#name]]</div>
|
||||
[[Cover]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -16,11 +16,12 @@
|
||||
[[Description]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Web link</div>
|
||||
<div class="font-weight-bold">[[Web link#name]]</div>
|
||||
[[Web link]]
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="font-weight-bold">Type</div>
|
||||
<div class="font-weight-bold">[[Type#name]]</div>
|
||||
[[Type]]
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Title</div>
|
||||
<div class="font-weight-bold mb-2">[[Title#name]]</div>
|
||||
[[Title]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
@@ -22,11 +22,11 @@
|
||||
[[Description]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Link</div>
|
||||
<div class="font-weight-bold mb-2">[[Web link#name]]</div>
|
||||
[[Web link]]
|
||||
</div>
|
||||
<div class="form-group col">
|
||||
<div class="font-weight-bold mb-2">Type</div>
|
||||
<div class="font-weight-bold mb-2">[[Type#name]]</div>
|
||||
[[Type]]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="col-9 col-md-11">[[Author]]</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-3 col-md-1"><strong>Type</strong></div>
|
||||
<div class="col-3 col-md-1"><strong>[[Type#name]]</strong></div>
|
||||
<div class="col-9 col-md-11">[[Type]]</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="col-9 col-md-auto">[[Author]]</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-3 col-md-2 font-weight-bold">Type</div>
|
||||
<div class="col-3 col-md-2 font-weight-bold">[[Type#name]]</div>
|
||||
<div class="col-9 col-md-auto">[[Type]]</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
@@ -45,5 +45,6 @@
|
||||
[[Description]]
|
||||
</div>
|
||||
</div>
|
||||
##otherfields##
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,3 +99,29 @@ Feature: Users can use the Resources preset
|
||||
And I should see "This is the author"
|
||||
And I should see "https://thisisthelink.cat"
|
||||
And I should see "Type2"
|
||||
|
||||
@javascript
|
||||
Scenario: Resources. Renaming a field should affect the template
|
||||
Given I am on the "Student resources" "data activity" page logged in as teacher1
|
||||
And I navigate to "Fields" in current page administration
|
||||
And I open the action menu in "Type" "table_row"
|
||||
And I choose "Edit" in the open action menu
|
||||
And I set the field "Field name" to "Edited field name"
|
||||
And I press "Save"
|
||||
And I should see "Field updated"
|
||||
When I navigate to "Database" in current page administration
|
||||
Then I click on "Advanced search" "checkbox"
|
||||
And I should see "Edited field name"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Edited field name"
|
||||
|
||||
@javascript
|
||||
Scenario: Resources. Has otherfields tag
|
||||
Given the following "mod_data > fields" exist:
|
||||
| database | type | name | description |
|
||||
| data1 | text | Extra field | Test field description |
|
||||
And I am on the "Student resources" "data activity" page logged in as teacher1
|
||||
When I select "Single view" from the "jump" singleselect
|
||||
Then I should see "Extra field"
|
||||
And I click on "Add entry" "button"
|
||||
And I should see "Extra field"
|
||||
|
||||
Reference in New Issue
Block a user