Skip to content

Commit

Permalink
Merge branch 'master' into 259-add-link-checker-to-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones-plip committed Aug 7, 2020
2 parents 8158771 + 23d7a4a commit dac03c2
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 14 deletions.
8 changes: 6 additions & 2 deletions assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
9 changes: 8 additions & 1 deletion content/en/apps/concepts/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion content/en/apps/concepts/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions content/en/apps/tutorials/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
40 changes: 37 additions & 3 deletions layouts/shortcodes/workflow-table.html
Original file line number Diff line number Diff line change
@@ -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
*/}}
<div class="container workflow align-items-center">
<div class="row d-none d-sm-flex text-center">
<div class="col-3"><img src="{{ .Get "condition-image" }}" alt="Condition" /><h5><strong>Condition</strong></h5></div>
<div class="col-3 align-self-end">
{{ template "col-header" ( dict "context" . "title" "Condition" "file" (.Get "condition-image" ) ) }}
</div>
<div class="col-1"></div>
<div class="col-3"><img src="{{ .Get "task-image" }}" alt="Task" /><h5><strong>Task</strong></h5></div>
<div class="col-3 align-self-end">
{{ template "col-header" ( dict "context" . "title" "Task" "file" (.Get "task-image" ) ) }}
</div>
<div class="col-1"></div>
<div class="col-3"><img src="{{ .Get "resolution-image" }}" alt="Resolution" /><h5><strong>Resolution</strong></h5></div>
<div class="col-3 align-self-end">
{{ template "col-header" ( dict "context" . "title" "Resolution" "file" (.Get "resolution-image" ) ) }}
</div>
</div>
{{ .Inner }}
</div>
{{- 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 -}}
<img src="{{ . }}" alt="{{ $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 -}}
<h4>{{ title $title }}</h4>
{{- end -}}
16 changes: 9 additions & 7 deletions layouts/shortcodes/workflow.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<div class="row">
<div class="col-12 col-sm-3">{{ .Get "condition" | markdownify }}</div>
<div class="d-none d-sm-flex col-1 align-self-center"><div><i class="fas fa-arrow-alt-circle-right"></i></div></div>
<div class="d-flex d-sm-none col-1"><i class="fas fa-long-arrow-alt-right"></i></div>
<div class="col-11 col-sm-3">{{ .Get "task" | markdownify }}</div>
<div class="d-none d-sm-flex col-1 align-self-center"><div><i class="fas fa-arrow-alt-circle-right"></i></div></div>
<div class="d-flex d-sm-none col-1"><i class="fas fa-long-arrow-alt-right"></i></div>
<div class="col-11 col-sm-4">{{ .Get "resolution" | markdownify }}</div>
<div class="col-12 col-sm-3 text"><h4 class="d-sm-none">Condition</h4>{{ .Get "condition" | markdownify }}</div>

<div class="col-1 d-none d-sm-flex align-self-center"><i class="fas fa-arrow-alt-circle-right"></i></div>
<div class="col-1 d-sm-none"><i class="fas fa-long-arrow-alt-right fa-rotate-45"></i></div>
<div class="col-11 col-sm-3 text"><h4 class="d-sm-none">Task</h4>{{ .Get "task" | markdownify }}</div>

<div class="col-1 d-none d-sm-flex align-self-center"><i class="fas fa-arrow-alt-circle-right"></i></div>
<div class="col-1 d-sm-none"><i class="fas fa-long-arrow-alt-right fa-rotate-45"></i></div>
<div class="col-11 col-sm-4 text"><h4 class="d-sm-none">Resolution</h4>{{ .Get "resolution" | markdownify }}</div>
</div>

0 comments on commit dac03c2

Please sign in to comment.