From d07e36453f92e55fa0eb34da4162bca04e588225 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 6 Aug 2018 12:15:46 +0100 Subject: [PATCH 1/7] Delete widget now suppressed unless there's a valid record. Delete still doesn't work, of course... --- src/adl/to_selmer_templates.clj | 48 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/adl/to_selmer_templates.clj b/src/adl/to_selmer_templates.clj index 5dbb407..5ce3439 100644 --- a/src/adl/to_selmer_templates.clj +++ b/src/adl/to_selmer_templates.clj @@ -201,28 +201,34 @@ (defn delete-widget "Return an appropriate 'save' widget for this `form` operating on this - `entity` taken from this `application`. - TODO: should be suppressed unless member of a group which can delete." + `entity` taken from this `application`." [form entity application] - (wrap-in-if-member-of - {:tag :p - :attrs {:class "widget action-dangerous"} - :content [{:tag :label - :attrs {:for "delete-button" - :class "action-dangerous"} - :content [(str - "To delete this " - (:name (:attrs entity)) - " record")]} - {:tag :input - :attrs {:id "delete-button" - :name "delete-button" - :class "action-dangerous" - :type "submit" - :value (str "Delete!")}}]} - :editable - entity - application)) + (flatten + (list + (str "{% if all " + (s/join " " (map #(str "params." %) (key-names entity))) + " %}") + + (wrap-in-if-member-of + {:tag :p + :attrs {:class "widget action-dangerous"} + :content [{:tag :label + :attrs {:for "delete-button" + :class "action-dangerous"} + :content [(str + "To delete this " + (:name (:attrs entity)) + " record")]} + {:tag :input + :attrs {:id "delete-button" + :name "delete-button" + :class "action-dangerous" + :type "submit" + :value (str "Delete!")}}]} + :editable + entity + application) + "{% endif %}"))) (defn select-property From ead6bdae6779b4e993942407ec7070e5321ddc90 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 09:52:23 +0100 Subject: [PATCH 2/7] lein-release plugin: preparing 1.4.4 release --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 7624344..138e6b3 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject adl "1.4.4-SNAPSHOT" +(defproject adl "1.4.4" :description "An application to transform an ADL application specification document into skeleton code for a Clojure web-app" :url "https://github.com/simon-brooke/adl" From a6b2309518618bb0da75f2c805c21571de218dea Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 11:16:41 +0100 Subject: [PATCH 3/7] Preparing for dummy run release. --- RELEASENOTES.md => CHANGELOG.md | 4 ++++ project.clj | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) rename RELEASENOTES.md => CHANGELOG.md (70%) diff --git a/RELEASENOTES.md b/CHANGELOG.md similarity index 70% rename from RELEASENOTES.md rename to CHANGELOG.md index 2cb9c4c..e4b94b3 100644 --- a/RELEASENOTES.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Release 1.4.5 + +Generation of skeleton Clojure webapp is now largely complete; this release is not the final 'beta' release of this functionality, but is a dummy run towards that release. + # Release 1.4.1 Release 1.4.1 adds a 'magnitude' element to entities, in order to provide a pragma for when diff --git a/project.clj b/project.clj index 138e6b3..9ef1f54 100644 --- a/project.clj +++ b/project.clj @@ -1,11 +1,11 @@ -(defproject adl "1.4.4" +(defproject adl "1.4.5-SNAPSHOT" :description "An application to transform an ADL application specification document into skeleton code for a Clojure web-app" :url "https://github.com/simon-brooke/adl" :license {:name "GNU Lesser General Public License, version 3.0 or (at your option) any later version" :url "https://www.gnu.org/licenses/lgpl-3.0.en.html"} - :dependencies [[adl-support "0.1.4-SNAPSHOT"] + :dependencies [[adl-support "0.1.4"] [bouncer "1.0.1"] [clojure-saxon "0.9.4"] [environ "1.1.0"] @@ -24,9 +24,6 @@ ;; [uncomplexor "0.1.0-SNAPSHOT"] ] -;; :lein-release {:scm :git -;; :deploy-via :clojars} ;; :deploy-via :clojars fails - with an scp error. - ;; `lein release` doesn't work with `git flow release`. To use ;; `lein release`, first merge `develop` into `master`, and then, in branch ;; `master`, run `lein release` From 07f1ff5073eb96f8f837ac58c38d7518a5e74377 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 11:17:13 +0100 Subject: [PATCH 4/7] lein-release plugin: preparing 1.4.5 release --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 9ef1f54..c981722 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject adl "1.4.5-SNAPSHOT" +(defproject adl "1.4.5" :description "An application to transform an ADL application specification document into skeleton code for a Clojure web-app" :url "https://github.com/simon-brooke/adl" From 04ec02d5abf6ba73c8bf8d55841ccf3086d87b71 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 11:20:30 +0100 Subject: [PATCH 5/7] lein-release plugin: bumped version from 1.4.5 to 1.4.6-SNAPSHOT for next development cycle --- project.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index c981722..85df47a 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject adl "1.4.5" +(defproject adl "1.4.6-SNAPSHOT" :description "An application to transform an ADL application specification document into skeleton code for a Clojure web-app" :url "https://github.com/simon-brooke/adl" @@ -28,8 +28,8 @@ ;; `lein release`, first merge `develop` into `master`, and then, in branch ;; `master`, run `lein release` - :deploy-repositories [["clojars" {:url "https://clojars.org/repo" - :sign-releases true}]] + :deploy-repositories [["releases" :clojars] + ["snapshots" :clojars]] :release-tasks [["vcs" "assert-committed"] ["clean"] From 4fc2110831479d709aa7207c44bc9dcb1009a6c5 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 11:23:35 +0100 Subject: [PATCH 6/7] Updated release documentation comment. --- project.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index 85df47a..82d19a4 100644 --- a/project.clj +++ b/project.clj @@ -24,9 +24,8 @@ ;; [uncomplexor "0.1.0-SNAPSHOT"] ] - ;; `lein release` doesn't work with `git flow release`. To use - ;; `lein release`, first merge `develop` into `master`, and then, in branch - ;; `master`, run `lein release` + ;; `lein release` doesn't play nice with `git flow release`. Run `lein release` in the + ;; `develop` branch, then merge the release tag into the `master` branch. :deploy-repositories [["releases" :clojars] ["snapshots" :clojars]] From ef7c13fadc7369f89c62d207f5683120ae2f90a1 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 20 Sep 2018 11:23:35 +0100 Subject: [PATCH 7/7] Updated release documentation comment. --- CHANGELOG.md | 12 +++++++----- project.clj | 5 ++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b94b3..ebded1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ -# Release 1.4.5 +# Change Log +All notable changes to this project will be documented in this file. This change log is intended to follow the conventions of [keepachangelog.com](http://keepachangelog.com/). + +## Release 1.4.5, 2018-09-20 Generation of skeleton Clojure webapp is now largely complete; this release is not the final 'beta' release of this functionality, but is a dummy run towards that release. -# Release 1.4.1 +## Release 1.4.1 Release 1.4.1 adds a 'magnitude' element to entities, in order to provide a pragma for when to switch to asynchronous select widgets. @@ -10,7 +13,6 @@ to switch to asynchronous select widgets. It also provides a family of transforms, written in Clojure, to generate a skeleton Clojure web app from an ADL specification. -# Release 1.4 +## Release 1.4 -Release 1.4 adds an 'order' element as a possible child of the 'list' element, in order to specify -the default order of lists. Otherwise unchanged from 1.3. +Release 1.4 adds an 'order' element as a possible child of the 'list' element, in order to specify the default order of lists. Otherwise unchanged from 1.3. diff --git a/project.clj b/project.clj index 85df47a..4e49efb 100644 --- a/project.clj +++ b/project.clj @@ -24,9 +24,8 @@ ;; [uncomplexor "0.1.0-SNAPSHOT"] ] - ;; `lein release` doesn't work with `git flow release`. To use - ;; `lein release`, first merge `develop` into `master`, and then, in branch - ;; `master`, run `lein release` + ;; `lein release` doesn't play nice with `git flow release`. Run `lein release` in the + ;; `develop` branch, then reset the `master` branch to the release tag. :deploy-repositories [["releases" :clojars] ["snapshots" :clojars]]