path = _.compact [ @urlRoot, slug, action ] .join '/'
"#path?#{@toKV { keepSlug: !!slug }}"
+ /**
+ * @returns {String} Path portion of slug URL, e.g. /graphs/:slug
+ */
+ toLink: ->
+ "#{@urlRoot}/#{@get('slug')}"
+
+ /**
+ * @returns {String} Permalinked URI, e.g. http://reportcard.wmflabs.org/:slug
+ */
+ toPermalink: ->
+ "#{window.location.protocol}//#{window.location.host}#{@toLink()}"
+
+
toString: -> "#{@ctorName}(id=#{@id}, cid=#{@cid})"
# }}}
.graph-legend
.graph-details-row.row-fluid
- .graph-desc
+ .graph-desc.span6
!= jade.filters.markdown(desc)
- //-
- .graph-notes.span6
+ .span8
+ .graph-permalink
+ a(href='#{model.toLink()}') Permalink:
+ input.span6(value='#{model.toPermalink()}')
+
+ //-
+ .graph-notes
!= jade.filters.markdown(notes)
+