diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index 1a999d913..0d5109e9c 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -103,7 +103,11 @@ h2, h3 { padding: 0.5rem 0; } - > .row > div { - padding-top: 0.5rem; + > .row > div.text { + padding-bottom: 0.5rem; } +} + +.fa-rotate-45 { + transform: rotate(45deg); } \ No newline at end of file diff --git a/content/en/apps/concepts/forms.md b/content/en/apps/concepts/forms.md index d92bc5bd3..de56d6042 100644 --- a/content/en/apps/concepts/forms.md +++ b/content/en/apps/concepts/forms.md @@ -5,11 +5,18 @@ weight: 3 description: > Building block for all CHT apps keywords: app-forms contact-forms collect-forms json-forms +relatedContent: > + apps/concepts/care-guides + apps/guides/forms + apps/reference/forms + apps/reference/app-settings/forms --- Forms are a building block of all CHT apps. They are used when creating or editing contacts, and when completing a care guide or survey within the app. Forms are also used to interpret SMS interactions with the CHT. -There are different types of forms: +When a completed form is submitted, it is treated as a Report in the app. All reports can be viewed in the [Reports tab]({{< ref "apps/features/reports" >}}) by those with the proper access within the [hierarchy]({{< ref "apps/concepts/hierarchy" >}}). + +There are four different types of forms: - [**Contact Forms**]({{< ref "apps/reference/forms/contact" >}}): used to create and edit contacts. Defined as CHT-enhanced XForms. - [**App Forms**]({{< ref "apps/reference/forms/app" >}}): serve as actions within the app, such as a task or an action. Defined as CHT-enhanced XForms. - [**Collect Forms**]({{< ref "apps/reference/forms/collect" >}}): used to render forms in Medic Collect. Defined as ODK XForms and need a corresponding JSON form to receive data in CHT. diff --git a/content/en/apps/concepts/prerequisites.md b/content/en/apps/concepts/prerequisites.md index c42256123..9a17435df 100644 --- a/content/en/apps/concepts/prerequisites.md +++ b/content/en/apps/concepts/prerequisites.md @@ -6,11 +6,12 @@ description: > Tools and background skills that are helpful for developing CHT apps relatedContent: > apps/tutorials/local-setup + core/guides/docker-setup --- There are no set prerequisites for users of CHT apps, yet the following are helpful for developing CHT applications. ## Test Instance -To build your own application using the Core Framework you will need an instance set up for testing. You can set up a local instance by [following these instructions](https://github.com/medic/cht-core/blob/master/INSTALL.md)). +To build your own application using the Core Framework you will need an instance set up for testing. You can set up a local instance by [following these instructions]({{< ref "apps/tutorials/local-setup" >}}). ## Build tool The build tool for applications using the Core Framework is `medic-conf`. To set it up, follow the [installation instructions](https://github.com/medic/medic-conf/blob/master/README.md#installation). To properly use the tool you will need your application files in set locations within a folder. Once you are set up with the basic file structure you can edit the files, and rebuild the application by compiling or converting components as needed, and uploading them to your test instance. diff --git a/content/en/apps/tutorials/local-setup.md b/content/en/apps/tutorials/local-setup.md index 1e3e9eaa2..5113a9093 100644 --- a/content/en/apps/tutorials/local-setup.md +++ b/content/en/apps/tutorials/local-setup.md @@ -94,6 +94,14 @@ Once you have run the above command it should complete with the message: `INFO A ![all actions completed](all-actions-completed.png "All actions completed") +### 4. Upload Test Data + +By default the CHT will have the [Maternal & Newborn Health Reference Application]({{< ref "apps/examples/anc" >}}) installed. To upload demo data you can use `medic-conf`: + +- Check out the [cht-core respository](https://github.com/medic/cht-core) to your local machine, either by using the [Github Desktop app](https://desktop.github.com/) or by running the following command in the directory you want to check the code out into: `git clone https://github.com/medic/cht-core.git`. This will create a `cht-core` directory. +- Navigate your terminal to the `cht-core/config/default` directory. This is where the reference application is stored. +- Run the following `medic-conf` command to compile and upload default test data to your local instance: `medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs`. + ## Frequently Asked Questions - [How do I upgrade to a higher version of the webapp?](https://forum.communityhealthtoolkit.org/t/cant-upgrade-to-3-8-version/608) diff --git a/layouts/shortcodes/workflow-table.html b/layouts/shortcodes/workflow-table.html index ae4a7da37..7ab75e238 100644 --- a/layouts/shortcodes/workflow-table.html +++ b/layouts/shortcodes/workflow-table.html @@ -1,10 +1,44 @@ +{{/* + Three predefined header titles are shown, with optional images above. + Image paths relative to permalink are passed in named arguments: + - condition-image + - task-image + - resolution-image +*/}}
-
Condition
Condition
+
+ {{ template "col-header" ( dict "context" . "title" "Condition" "file" (.Get "condition-image" ) ) }} +
-
Task
Task
+
+ {{ template "col-header" ( dict "context" . "title" "Task" "file" (.Get "task-image" ) ) }} +
-
Resolution
Resolution
+
+ {{ template "col-header" ( dict "context" . "title" "Resolution" "file" (.Get "resolution-image" ) ) }} +
{{ .Inner }}
+{{- define "col-header" -}} + {{- $context := .context -}} + {{- $title := .title -}} + {{- $file := .file -}} + {{- with $file -}} + {{- $fullpath := "" -}} + {{- if ne $context.Page.File.TranslationBaseName "_index" -}} + {{- $fullpath = path.Join $context.Page.File.Dir $context.Page.File.ContentBaseName $file -}} + {{- else -}} + {{- $fullpath = path.Join $context.Page.File.Dir $file -}} + {{- end -}} + {{- if fileExists $fullpath -}} + {{ $title }} + {{- else -}} + {{ errorf "File '%s' not found with '%s-image=\"%s\"': %s" $fullpath (lower $title) . $context.Position }} + {{- end -}} + {{- else -}} + {{ warnf "Missing value for param '%s-image': %s" (lower $title) $context.Position }} + {{- end -}} +

{{ title $title }}

+{{- end -}} \ No newline at end of file diff --git a/layouts/shortcodes/workflow.html b/layouts/shortcodes/workflow.html index 0fe86c879..07b05de63 100644 --- a/layouts/shortcodes/workflow.html +++ b/layouts/shortcodes/workflow.html @@ -1,9 +1,11 @@
-
{{ .Get "condition" | markdownify }}
-
-
-
{{ .Get "task" | markdownify }}
-
-
-
{{ .Get "resolution" | markdownify }}
+

Condition

{{ .Get "condition" | markdownify }}
+ +
+
+

Task

{{ .Get "task" | markdownify }}
+ +
+
+

Resolution

{{ .Get "resolution" | markdownify }}
\ No newline at end of file