Commit 9d0fcd43 authored by Joachim Schunk's avatar Joachim Schunk

Beautyfications and help-texts for show-view

parent 1493459b
......@@ -42,7 +42,7 @@
{:sign "Not" :subtext "properly configured"})))
(defn var-symbol [{:keys [sign subtext var-sign match-set]}]
[:div (when match-set
[ (when match-set
{:class (if (contains? match-set var-sign) "green lighten-4" "red lighten-4")})
[sign-with-subtext {:sign sign :subtext subtext}]])
......@@ -67,7 +67,8 @@
[:span (phrase-fn next-position)]]
[:span (phrase-fn next-position)]]]
[ {:on-click #(on-click-fn next-position)}
[:span.icon [:i.fas.fa-arrow-right]]]]]]]))
......@@ -217,7 +218,6 @@
{:title (:title exercise)
:class (get-result-color-class result)}
#_[:span.card-title [:b (:title exercise)]]
[b-crumb {:positions positions
:current-position @current-position
:phrase-fn phrase-fn
......@@ -85,18 +85,16 @@
{:disabled last-step?
:on-click #(when-not last-step? ;;;disable event on disabled button
(step-delete change-fn path answer step-id))}
[:span.icon [:i.fas.fa-minus]]])]]]))
[:span.icon [:i.fas.fa-trash]]])]]]))
(defn answer-steps [{:keys [answer change-fn phrase-fn result description-id descriptions assocs params
assignments number-of-steps number-of-answer-steps modal-state-atom
(when description-id
(get-in descriptions [(name description-id) :content])]]])
(get-in descriptions [(name description-id) :content])])
[:th (phrase-fn :assoc)]
......@@ -122,4 +120,7 @@
:selectable-units selectable-units}])
(range number-of-answer-steps))
(when (and (not result) (< number-of-answer-steps number-of-steps))
[step-add-tr {:add-fn #(change-fn [:steps] (conj answer (get-new-answer-step assocs)))}])]]])
[step-add-tr {:add-fn #(change-fn [:steps] (conj answer (get-new-answer-step assocs)))}])]]
(when (empty? answer)
(str "Zum Hinzufügen von " (phrase-fn :steps) " auf die Linie mit dem '+' klicken ...")])])
......@@ -271,7 +271,7 @@
(reduce (fn [res category] (conj res (update category :id keyword)))
[] assignment-categories)))]
(when (not-empty var-ids)
(if (not-empty var-ids)
[:h5 "Gewählte Größen:"]
......@@ -293,8 +293,9 @@
{:on-click #(change-fn (conj path :vars) (vec-remove vars index)
[:span.icon [:i.fas.fa-trash]]]]])) var-ids)]]])
(when (< number-of-selected-vars number-of-vars)
[:span.icon [:i.fas.fa-trash]]]]])) var-ids)]]]
[:div.has-text-grey.mb-4 "Größe auswählen durch anklicken ..."])
(if (< number-of-selected-vars number-of-vars)
[:h5 "Wählbare Größen:"]
......@@ -326,7 +327,8 @@
:collats-fn collats-fn
:vars vars
:var-type :step}]])
[:div.has-text-grey.mb-3 "Maximale Anzahl von Größen gewählt ..."])]))
(defn formula-calculator [{:keys [id phys-val change-fn with-oom with-units formula formula-vec
var-mapping calc-mapping var-phys-val-map formula-change-fn
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment