{
  "Branch_Active_User_Listing": {
    "layout":"grid",
    "table":"{schema}.v_my_branch_desc",
    "actions":"B",
    "roles": {"*": "B"},
    "sqlwhere":"branch_type='USER' and branch_sts='ACTIVE' and (branch_user_id = jsharmony.my_sys_user_id()) and (site_id={schema}.my_current_site_id())",
    "caption":["Revision","Revisions"],
    "title":"My Revisions In-Progress",
    "hide_system_buttons":["search","export"],
    "rowlimit":1000,
    "tablestyle":"min-width:600px;",
    "noresultsmessage":"No active user revisions.  Please clone a Release.",
    "rowclass": "<%=xejs.iif(datarow['branch_is_checked_out']==1,'branch_checked_out')%>",
    "css":[
      ".xform<%=model.class%> .submitPublishReview a { background-image: url('/images/icon_ok.png'); background-repeat: no-repeat; padding-left: 24px; background-position: 2px -2px; }",
      ".xform<%=model.class%> .branch_checkout_button .text_checked_out { display:none; }",
      ".xform<%=model.class%> .branch_checked_out .branch_checkout_button .text_not_checked_out { display:none; }",
      ".xform<%=model.class%> .branch_checked_out .branch_checkout_button .text_checked_out { display:inline; }",
      ".xform<%=model.class%> .branch_checked_out .jsHarmonyCms_action_button.branch_checkout_button a { background-color:transparent; color:#333; border-color:transparent; padding-right:0; padding-left:0; cursor:default; pointer-events:none; }",
    ],
    "fields": [
      {"name":"branch_id","control":"hidden"},
      {"name":"branch_is_checked_out","control":"hidden"},
      {"name":"branch_desc","caption":"Name","cellstyle":"min-width:200px;","link":"update:Branch_Summary"},
      {"name":"branch_data_mtstmp_fmt","type":"datetime","caption":"Last Modified","sqlselect":"$ifnull(branch_data_mtstmp,branch_mtstmp)","control":"label","actions":"B","format":["date","MM/DD/YYYY h:mm a"]},
      {"name":"branch_data_muser_fmt","caption":"Modified By","sqlselect":"(jsharmony.my_db_user_fmt($ifnull(branch_data_muser,branch_muser)))","control":"label","actions":"B"},
      {"control":"label","caption":"Checkout","cellstyle":"vertical-align:middle;text-align:center;","controlstyle":"position:relative;top:-1px;","captionstyle":"text-align:center;",
        "link":"update:Branch_Checkout&branch_id","cellclass":"jsHarmonyCms_action_button branch_checkout_button",
        "value":"<span class='text_not_checked_out'>Checkout</span><span class='text_checked_out'>(Checked Out)</span>"},
      {"caption":"Details","control":"html","link":"update:Branch_Summary","captionstyle":"text-align:center;","cellstyle":"text-align:center;",
        "value":"<img src='/images/icon_browse.png' class='xicon' style='top:4px;' />"},
      {"caption":"Clone","control":"linkbutton","link":"update:Branch_Clone&branch_id","captionstyle":"text-align:center;","cellstyle":"text-align:center;","roles":{"PUBLISHER":"*","AUTHOR":"*"}},
      {"caption":"Submit for Publish Review","control":"linkbutton","link":"js:jsh.System.SubmitBranch(xmodel, xmodel.get('branch_id', this))","captionstyle":"text-align:center;","cellclass":"submitPublishReview","cellstyle":"text-align:center;","roles":{"PUBLISHER":"*","AUTHOR":"*"}},
    ]
  }
}