diff --git a/_attachments/Artgruppenliste.html b/_attachments/Artgruppenliste.html index 039483c..12e7660 100644 --- a/_attachments/Artgruppenliste.html +++ b/_attachments/Artgruppenliste.html @@ -54,16 +54,18 @@

Art-Gruppe wählen

var OrtId = get_url_param("OrtId") || ""; var ZeitId = get_url_param("ZeitId") || ""; - var viewname = "evab/Artgruppen"; + var viewname = "evab/ArtgruppenAnzArten?group=true"; $db.view(viewname, { success: function(data) { var i; var ListItemContainer = ""; var ArtGruppe; + var AnzArten; for(i in data.rows) { ArtGruppe = data.rows[i].key; + AnzArten = data.rows[i].value; ListItemContainer += "
  • "; - ListItemContainer += "

    " + ArtGruppe + "<\/h3><\/a><\/li>"; + ListItemContainer += "

    " + ArtGruppe + "" + AnzArten + "<\/h3><\/a><\/li>"; } $("#ArtgruppenListe").html(ListItemContainer); //$("#ArtgruppenListe").listview(); diff --git a/_attachments/hProjektliste.html b/_attachments/hProjektliste.html index 3e67365..b8a14ae 100644 --- a/_attachments/hProjektliste.html +++ b/_attachments/hProjektliste.html @@ -32,6 +32,7 @@

    Projekte

      +
    @@ -119,14 +120,12 @@

    Projekte

    key = data.rows[i].key; pName = key[1]; externalPage = "_show/hProjektEdit/" + Proj._id; - listItem = "
  • " + - "" + - "

    " + pName + "<\/h3>" + - "<\/a> <\/li>"; + listItem = "
  • "; + listItem += ""; + listItem += "

    " + pName + "<\/h3><\/a> <\/li>"; ListItemContainer += listItem; } } - ListItemContainer += "<\/ul>"; $("#Projekte").html(ListItemContainer); $("#Projekte").listview(); $("#Projekte").listview("refresh"); diff --git a/couchapp.json b/couchapp.json index 0cc524d..ab01f5a 100644 --- a/couchapp.json +++ b/couchapp.json @@ -1,4 +1,4 @@ { - "name": "Name of your CouchApp", + "name": "EvAB", "description": "CouchApp" } \ No newline at end of file diff --git a/views/ArtgruppenAnzArten/map.js b/views/ArtgruppenAnzArten/map.js new file mode 100644 index 0000000..f0fbf74 --- /dev/null +++ b/views/ArtgruppenAnzArten/map.js @@ -0,0 +1,5 @@ +function(doc) { + if((doc.Typ == 'Art' || doc.Typ == 'Unbekannte Art' || doc.Typ == 'Eigene Art') && doc.ArtGruppe){ + emit (doc.ArtGruppe, 1); + } +} \ No newline at end of file diff --git a/views/ArtgruppenAnzArten/reduce.js b/views/ArtgruppenAnzArten/reduce.js new file mode 100644 index 0000000..901c87e --- /dev/null +++ b/views/ArtgruppenAnzArten/reduce.js @@ -0,0 +1,3 @@ +function (key, values) { + return sum(values); +} \ No newline at end of file diff --git a/views/hProjAnzhArt/map.js b/views/hProjAnzhArt/map.js new file mode 100644 index 0000000..ac1d025 --- /dev/null +++ b/views/hProjAnzhArt/map.js @@ -0,0 +1,5 @@ +function(doc) { + if(doc.Typ == 'hArt' && doc.ProjektId){ + emit (doc.ProjektId, 1); + } +} \ No newline at end of file diff --git a/views/hProjAnzhArt/reduce.js b/views/hProjAnzhArt/reduce.js new file mode 100644 index 0000000..901c87e --- /dev/null +++ b/views/hProjAnzhArt/reduce.js @@ -0,0 +1,3 @@ +function (key, values) { + return sum(values); +} \ No newline at end of file