parsav  Diff

Differences From Artifact [09fa445b20]:

To Artifact [4bed391611]:


    97     97   			end
    98     98   			cinp:lpush('<div class="elem"><label for="epithet">epithet</label><input type="text" id="epithet" name="epithet" value="'):ppush(sanitized):lpush('"></div>')
    99     99   			if user.ptr.epithet ~= nil then sanitized:free() end
   100    100   		end
   101    101   		if co.who.rights.powers.invite() or co.who.rights.powers.discipline() then
   102         -			var min = 0
          102  +			var min: uint32 = 0
   103    103   			if not (co.who.rights.powers.discipline() or
   104    104   				co.who.rights.powers.demote() and co.who.rights.powers.invite())
   105    105   					then min = user.ptr.rights.invites end
   106         -			var max = co.srv.cfg.maxinvites
          106  +			var max: uint32 = co.srv.cfg.maxinvites
   107    107   			if not co.who.rights.powers.invite() then max = user.ptr.rights.invites end
   108    108   
   109    109   			push_num_field(cinp, 'invites', 'invites', min, max, user.ptr.rights.invites, false)
   110    110   		end
          111  +		if co.who.rights.powers.elevate() or co.who.rights.powers.demote() then
          112  +			var max: uint32 = 5000
          113  +			if not co.who.rights.powers.elevate() then max = user.ptr.rights.quota end
          114  +			var min: uint32 = 0
          115  +			if not co.who.rights.powers.demote() then min = user.ptr.rights.quota end
          116  +
          117  +			push_num_field(cinp, 'quota', 'quota', min, max, user.ptr.rights.quota, user.ptr.id == co.who.id and co.who.rights.rank ~= 1)
          118  +		end
   111    119   		cinp:lpush('</div><div class="elem"><div class="check-panel">')
   112    120   
   113    121   		if user.ptr.id ~= co.who.id and
   114    122   		   ((user.ptr.rights.rank == 0 and co.who.rights.powers.elevate()) or
   115    123   		    (user.ptr.rights.rank >  0 and co.who.rights.powers.demote())) then
................................................................................
   152    160   		if user(0).origin ~= 0 then unym:lpush('@') end
   153    161   		do var sanxid = lib.html.sanitize(user(0).xid, true)
   154    162   			unym:ppush(sanxid)
   155    163   			sanxid:free() end
   156    164   		unym:lpush('" class="id">')
   157         -		lib.render.nym(user.ptr,0,&unym)
          165  +		lib.render.nym(user.ptr,0,&unym,false)
   158    166   		unym:lpush('</a>')
   159    167   		var pg = data.view.conf_user_ctl {
   160    168   			name = unym:finalize();
   161    169   			inputcontent = cinpp;
   162    170   			linkcontent = clnkp;
................................................................................
   204    212   				regalia(&ulst, usr.rights.rank)
   205    213   				ulst:lpush('</span>')
   206    214   			end
   207    215   			if co.who:overpowers(usr) then
   208    216   				ulst:lpush('<a class="id" href="users/'):push(&idbuf[0],idlen):lpush('">')
   209         -				lib.render.nym(usr, 0, &ulst)
          217  +				lib.render.nym(usr, 0, &ulst, false)
   210    218   				ulst:lpush('</a></li>')
   211    219   			else
   212    220   				ulst:lpush('<span class="id">')
   213         -				lib.render.nym(usr, 0, &ulst)
          221  +				lib.render.nym(usr, 0, &ulst, false)
   214    222   				ulst:lpush('</span></li>')
   215    223   			end
   216    224   		::skip::end
   217    225   		ulst:lpush('</ul>')
   218    226   		return ulst:finalize()