extends layout

append styles
  link(href='/styles/plug.css',rel='stylesheet')
  link(href='/styles/icons.css',rel='stylesheet')

block content
  .infocard
    img(src=plug.images[720]).plugimage
    h2.plugvenue= plug.venue
    h3.plugname= plug.name
    .ownercredit
      ="mapped by "
      //- if the currently logged-in user mapped this
      if currentUser && plug.owner._id == currentUser._id
        a(href='/user/'+plug.owner.username).ownername you
      else
        a(href='/user/'+plug.owner.username).ownername
          = plug.owner.username
          img(src='//gravatar.com/avatar/'+plug.owner.emailMD5).owneravatar

  userUpvolted = currentUser && ~plug.upvolters.indexOf(currentUser._id)

  #upvolt-button(class = (userUpvolted ? 'upvolted' : ''))
    span.icon-upvolt
    =' '
    span#upvolt-count= plug.upvolters.length
    =' Upvolts'
  if currentUser
    script var csrfToken = !{JSON.stringify(csrfToken)};
    script(src="/upvolt.js")

extends layout

append styles
  link(href='/styles/plug.css',rel='stylesheet')
  link(href='/styles/icons.css',rel='stylesheet')

block content
  .infocard
    img(src=plug.images[720]).plugimage
    h2.plugvenue= plug.venue
    h3.plugname= plug.name
    .ownercredit
      ="mapped by "
      //- if the currently logged-in user mapped this
      if currentUser && plug.owner._id == currentUser._id
        a(href='/user/'+plug.owner.username).ownername you
      else
        a(href='/user/'+plug.owner.username).ownername
          = plug.owner.username
          img(src='//gravatar.com/avatar/'+plug.owner.emailMD5).owneravatar

  - var userUpvolted = currentUser && ~plug.upvolters.indexOf(currentUser._id)

  #upvolt-button(class = (userUpvolted ? 'upvolted' : ''))
    span.icon-upvolt
    =' '
    span#upvolt-count= plug.upvolters.length
    =' Upvolts'
  if currentUser
    script var csrfToken = !{JSON.stringify(csrfToken)};
    script(src="/upvolt.js")

Fix obsolete variable declaration in jade view
Fix obsolete variable declaration in jade view
